[INFO] cloning repository https://github.com/HadrienG2/starpu-sys
[INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/HadrienG2/starpu-sys" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHadrienG2%2Fstarpu-sys", kill_on_drop: false }`
[INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHadrienG2%2Fstarpu-sys'...
[INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }`
[INFO] [stdout] 9ea2b6504e4f8f0c17093139edc4849b7c018ccb
[INFO] checking HadrienG2/starpu-sys against master#5a45ab9738330fb317d49e3594c2db5248b1e971 for pr-136303
[INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FHadrienG2%2Fstarpu-sys" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }`
[INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'...
[INFO] [stderr] done.
[INFO] validating manifest of git repo https://github.com/HadrienG2/starpu-sys on toolchain 5a45ab9738330fb317d49e3594c2db5248b1e971
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+5a45ab9738330fb317d49e3594c2db5248b1e971" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] started tweaking git repo https://github.com/HadrienG2/starpu-sys
[INFO] finished tweaking git repo https://github.com/HadrienG2/starpu-sys
[INFO] tweaked toml for git repo https://github.com/HadrienG2/starpu-sys written to /workspace/builds/worker-5-tc1/source/Cargo.toml
[INFO] crate git repo https://github.com/HadrienG2/starpu-sys already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+5a45ab9738330fb317d49e3594c2db5248b1e971" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]     Updating crates.io index
[INFO] [stderr]     Blocking waiting for file lock on package cache
[INFO] [stderr]  Downloading crates ...
[INFO] [stderr]   Downloaded clang-sys v1.8.0
[INFO] [stderr]   Downloaded cl-sys v0.4.3
[INFO] [stderr]   Downloaded hwlocality-sys v0.4.2
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:c80049f3b88b82089a44e0f06d0d6029d44b96b7257e55a1cd63dbc9f4c33334" "/opt/rustwide/cargo-home/bin/cargo" "+5a45ab9738330fb317d49e3594c2db5248b1e971" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 1bf2d64a5e8ed9cf97f967991abd10d66c91bf5e0af33a991219e4172efc252c
[INFO] running `Command { std: "docker" "start" "-a" "1bf2d64a5e8ed9cf97f967991abd10d66c91bf5e0af33a991219e4172efc252c", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "1bf2d64a5e8ed9cf97f967991abd10d66c91bf5e0af33a991219e4172efc252c", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "1bf2d64a5e8ed9cf97f967991abd10d66c91bf5e0af33a991219e4172efc252c", kill_on_drop: false }`
[INFO] [stdout] 1bf2d64a5e8ed9cf97f967991abd10d66c91bf5e0af33a991219e4172efc252c
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:c80049f3b88b82089a44e0f06d0d6029d44b96b7257e55a1cd63dbc9f4c33334" "/opt/rustwide/cargo-home/bin/cargo" "+5a45ab9738330fb317d49e3594c2db5248b1e971" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 462ace49f839b0b663e64a32052d62437e992bb9a14ab11a6f0285f9105b782e
[INFO] running `Command { std: "docker" "start" "-a" "462ace49f839b0b663e64a32052d62437e992bb9a14ab11a6f0285f9105b782e", kill_on_drop: false }`
[INFO] [stderr]    Compiling proc-macro2 v1.0.84
[INFO] [stderr]    Compiling prettyplease v0.2.20
[INFO] [stderr]    Compiling rustix v0.38.34
[INFO] [stderr]    Compiling libc v0.2.169
[INFO] [stderr]    Compiling minimal-lexical v0.2.1
[INFO] [stderr]    Compiling either v1.12.0
[INFO] [stderr]    Compiling bitflags v2.5.0
[INFO] [stderr]    Compiling linux-raw-sys v0.4.14
[INFO] [stderr]    Compiling memchr v2.7.2
[INFO] [stderr]    Compiling bindgen v0.69.5
[INFO] [stderr]    Compiling home v0.5.9
[INFO] [stderr]    Compiling clang-sys v1.8.0
[INFO] [stderr]    Compiling libloading v0.8.3
[INFO] [stderr]    Compiling hwlocality-sys v0.4.2
[INFO] [stderr]    Compiling rustc-hash v1.1.0
[INFO] [stderr]    Compiling lazycell v1.3.0
[INFO] [stderr]    Compiling itertools v0.12.1
[INFO] [stderr]    Compiling nom v7.1.3
[INFO] [stderr]    Compiling quote v1.0.36
[INFO] [stderr]    Compiling syn v2.0.66
[INFO] [stderr]    Compiling cexpr v0.6.0
[INFO] [stderr]    Compiling which v4.4.2
[INFO] [stderr]    Compiling starpu-sys v1.0.0 (/opt/rustwide/workdir/starpu-sys)
[INFO] [stdout] error[E0412]: cannot find type `cl_program` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:12901
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { ...
[INFO] [stdout]   |                                                      ^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_context` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14290
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p ...
[INFO] [stdout]   |                                                      ^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_device_id` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14484
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device desig...
[INFO] [stdout]   |                                                     ^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_command_queue` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14692
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...: :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_context` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14839
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...tarpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue o...
[INFO] [stdout]   |                                                      ^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_command_queue` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:15002
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The l...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:15754
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc =...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_kernel` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:15778
[INFO] [stdout]   |
[INFO] [stdout] 3 | ..._kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store th...
[INFO] [stdout]   |                                                      ^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_kernel` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:19994
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_p...
[INFO] [stdout]   |                                                      ^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_command_queue` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20020
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...rnel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * cons...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_kernel` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20353
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statis...
[INFO] [stdout]   |                                                      ^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_program` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:12901
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { ...
[INFO] [stdout]   |                                                      ^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_context` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14290
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p ...
[INFO] [stdout]   |                                                      ^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20743
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...tarpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in E...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_device_id` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14484
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device desig...
[INFO] [stdout]   |                                                     ^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20946
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...tarpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error st...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_command_queue` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14692
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...: :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_context` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:14839
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...tarpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue o...
[INFO] [stdout]   |                                                      ^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21442
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...d :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flag...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_command_queue` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:15002
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The l...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21691
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = ...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem_flags` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21723
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...t , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given...
[INFO] [stdout]   |                                                     ^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:15754
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc =...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_kernel` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:15778
[INFO] [stdout]   |
[INFO] [stdout] 3 | ..._kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store th...
[INFO] [stdout]   |                                                      ^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21740
[INFO] [stdout]    |
[INFO] [stdout] 3  | ... : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node t...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:22537
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize ...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_kernel` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:19994
[INFO] [stdout]   |
[INFO] [stdout] 3 | ... pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_p...
[INFO] [stdout]   |                                                      ^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_command_queue` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20020
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...rnel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * cons...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_kernel` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20353
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statis...
[INFO] [stdout]   |                                                      ^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:22635
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20743
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...tarpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in E...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:22691
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on ...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:20946
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...tarpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error st...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:23416
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: ra...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21442
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...d :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flag...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21691
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = ...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:23601
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem_flags` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21723
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...t , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given...
[INFO] [stdout]   |                                                     ^^^^^^^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:23657
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offs...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24372
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:21740
[INFO] [stdout]    |
[INFO] [stdout] 3  | ... : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node t...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24451
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : us...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:22537
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize ...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:22635
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24553
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...size , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:22691
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on ...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:23416
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: ra...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24609
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src o...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:23601
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:25371
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:23657
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offs...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:25384
[INFO] [stdout]    |
[INFO] [stdout] 3  | ... usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pu...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24372
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_mem` in this scope
[INFO] [stdout]  --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24451
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : us...
[INFO] [stdout]   |                                                        ^^^^^^ not found in this scope
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24553
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...size , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:24609
[INFO] [stdout]    |
[INFO] [stdout] 3  | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src o...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:25371
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin...
[INFO] [stdout]      |                                          ^^^^^^^^ help: a struct with a similar name exists: `iw_event`
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_int` in this scope
[INFO] [stdout]   --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:25384
[INFO] [stdout]    |
[INFO] [stdout] 3  | ... usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pu...
[INFO] [stdout]    |                                        ^^^^^^ help: a type alias with a similar name exists: `c_int`
[INFO] [stdout]    |
[INFO] [stdout]   ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/mod.rs:12:1
[INFO] [stdout]    |
[INFO] [stdout] 12 | pub type c_int = i32;
[INFO] [stdout]    | -------------- similarly named type alias `c_int` defined here
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:80195
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...oid , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to c...
[INFO] [stdout]      |                                                                     ^^^^^^^^
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout]      |
[INFO] [stdout] help: a struct with a similar name exists
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut iw_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ~~~~~~~~
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods<cl_event> { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:80195
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...oid , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to c...
[INFO] [stdout]      |                                                                     ^^^^^^^^
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout]      |
[INFO] [stdout] help: a struct with a similar name exists
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut iw_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ~~~~~~~~
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods<cl_event> { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:80984
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...oid , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to c...
[INFO] [stdout]      |                                                                     ^^^^^^^^
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout]      |
[INFO] [stdout] help: a struct with a similar name exists
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut iw_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ~~~~~~~~
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods<cl_event> { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:80984
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...oid , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to c...
[INFO] [stdout]      |                                                                     ^^^^^^^^
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout]      |
[INFO] [stdout] help: a struct with a similar name exists
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut iw_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ~~~~~~~~
[INFO] [stdout] help: you might be missing a type parameter
[INFO] [stdout]      |
[INFO] [stdout] 3    | # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > where Storage : AsRef < [u8] > + AsMut < [u8] >, { # [inline] pub fn get_bit (& self , index : usize) -> bool { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = self . storage . as_ref () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; val |= 1 << index ; } } val } # [inline] pub fn set (& mut self , bit_offset : usize , bit_width : u8 , val : u64) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } # [repr (C)] pub struct __BindgenUnionField < T > (:: std :: marker :: PhantomData < T >) ; impl < T > __BindgenUnionField < T > { # [inline] pub const fn new () -> Self { __BindgenUnionField (:: std :: marker :: PhantomData) } # [inline] pub unsafe fn as_ref (& self) -> & T { :: std :: mem :: transmute (self) } # [inline] pub unsafe fn as_mut (& mut self) -> & mut T { :: std :: mem :: transmute (self) } } impl < T > :: std :: default :: Default for __BindgenUnionField < T > { # [inline] fn default () -> Self { Self :: new () } } impl < T > :: std :: clone :: Clone for __BindgenUnionField < T > { # [inline] fn clone (& self) -> Self { * self } } impl < T > :: std :: marker :: Copy for __BindgenUnionField < T > { } impl < T > :: std :: fmt :: Debug for __BindgenUnionField < T > { fn fmt (& self , fmt : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { fmt . write_str ("__BindgenUnionField") } } impl < T > :: std :: hash :: Hash for __BindgenUnionField < T > { fn hash < H : :: std :: hash :: Hasher > (& self , _state : & mut H) { } } impl < T > :: std :: cmp :: PartialEq for __BindgenUnionField < T > { fn eq (& self , _other : & __BindgenUnionField < T >) -> bool { true } } impl < T > :: std :: cmp :: Eq for __BindgenUnionField < T > { } pub const STARPU_MAJOR_VERSION : u32 = 1 ; pub const STARPU_MINOR_VERSION : u32 = 3 ; pub const STARPU_RELEASE_VERSION : u32 = 9 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_HAVE_VALGRIND_H : u32 = 1 ; pub const STARPU_HAVE_MEMCHECK_H : u32 = 1 ; pub const STARPU_NON_BLOCKING_DRIVERS : u32 = 1 ; pub const STARPU_USE_MPI : u32 = 1 ; pub const STARPU_USE_MPI_MPI : u32 = 1 ; pub const STARPU_SYSTEM_BLAS : u32 = 1 ; pub const STARPU_HAVE_BLAS : u32 = 1 ; pub const STARPU_OPENGL_RENDER : u32 = 1 ; pub const STARPU_HAVE_X11 : u32 = 1 ; pub const STARPU_HAVE_POSIX_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MEMALIGN : u32 = 1 ; pub const STARPU_HAVE_MALLOC_H : u32 = 1 ; pub const STARPU_HAVE_SYNC_BOOL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_FFTW : u32 = 1 ; pub const STARPU_HAVE_FFTWF : u32 = 1 ; pub const STARPU_HAVE_FFTWL : u32 = 1 ; pub const STARPU_MAXNODES : u32 = 16 ; pub const STARPU_NMAXBUFS : u32 = 8 ; pub const STARPU_MAXCPUS : u32 = 64 ; pub const STARPU_MAXNUMANODES : u32 = 2 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMICDEVS : u32 = 0 ; pub const STARPU_NMAXWORKERS : u32 = 80 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; pub const STARPU_MAXMPKERNELS : u32 = 10 ; pub const STARPU_HAVE_GLPK_H : u32 = 1 ; pub const STARPU_HAVE_LIBNUMA : u32 = 1 ; pub const STARPU_LINUX_SYS : u32 = 1 ; pub const STARPU_HAVE_SETENV : u32 = 1 ; pub const STARPU_HAVE_UNSETENV : u32 = 1 ; pub const STARPU_HAVE_UNISTD_H : u32 = 1 ; pub const STARPU_QUICK_CHECK : u32 = 1 ; pub const STARPU_USE_DRAND48 : u32 = 1 ; pub const STARPU_USE_ERAND48_R : u32 = 1 ; pub const STARPU_HAVE_NEARBYINTF : u32 = 1 ; pub const STARPU_HAVE_RINTF : u32 = 1 ; pub const STARPU_HAVE_HWLOC : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SPIN_LOCK : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_BARRIER : u32 = 1 ; pub const STARPU_HAVE_PTHREAD_SETNAME_NP : u32 = 1 ; pub const STARPU_HAVE_STRUCT_TIMESPEC : u32 = 1 ; pub const STARPU_HAVE_HELGRIND_H : u32 = 1 ; pub const HAVE_MPI_COMM_F2C : u32 = 1 ; pub const STARPU_HAVE_CXX11 : u32 = 1 ; pub const STARPU_HAVE_STRERROR_R : u32 = 1 ; pub const STARPU_HAVE_STATEMENT_EXPRESSIONS : u32 = 1 ; pub const CL_TARGET_OPENCL_VERSION : u32 = 100 ; pub const STARPU_BACKTRACE_LENGTH : u32 = 32 ; pub const STARPU_CACHELINE_SIZE : u32 = 64 ; pub const STARPU_PTHREAD_BARRIER_SERIAL_THREAD : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE : i32 = - 1 ; pub const STARPU_ACQUIRE_NO_NODE_LOCK_ALL : i32 = - 2 ; pub const STARPU_DISK_SIZE_MIN : u32 = 16777216 ; pub const STARPU_COO_GET_OFFSET : u32 = 0 ; pub const STARPU_CSR_GET_OFFSET : u32 = 0 ; pub const STARPU_BCSR_GET_OFFSET : u32 = 0 ; pub const STARPU_MALLOC_PINNED : u32 = 2 ; pub const STARPU_MALLOC_COUNT : u32 = 4 ; pub const STARPU_MALLOC_NORECLAIM : u32 = 8 ; pub const STARPU_MEMORY_WAIT : u32 = 16 ; pub const STARPU_MEMORY_OVERFLOW : u32 = 32 ; pub const STARPU_MALLOC_SIMULATION_FOLDED : u32 = 64 ; pub const STARPU_NOWHERE : u32 = 1 ; pub const STARPU_CPU : u32 = 2 ; pub const STARPU_CUDA : u32 = 8 ; pub const STARPU_OPENCL : u32 = 64 ; pub const STARPU_MIC : u32 = 128 ; pub const STARPU_MPI_MS : u32 = 512 ; pub const STARPU_CODELET_SIMGRID_EXECUTE : u32 = 1 ; pub const STARPU_CODELET_SIMGRID_EXECUTE_AND_INJECT : u32 = 2 ; pub const STARPU_CODELET_NOPLANS : u32 = 4 ; pub const STARPU_CUDA_ASYNC : u32 = 1 ; pub const STARPU_OPENCL_ASYNC : u32 = 1 ; pub const STARPU_MAIN_RAM : u32 = 0 ; pub const STARPU_TASK_INVALID : u32 = 0 ; pub const STARPU_VARIABLE_NBUFFERS : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_LOCAL : i32 = - 1 ; pub const STARPU_SPECIFIC_NODE_CPU : i32 = - 2 ; pub const STARPU_SPECIFIC_NODE_SLOW : i32 = - 3 ; pub const STARPU_SPECIFIC_NODE_FAST : i32 = - 4 ; pub const STARPU_TASK_TYPE_NORMAL : u32 = 0 ; pub const STARPU_TASK_TYPE_INTERNAL : u32 = 1 ; pub const STARPU_TASK_TYPE_DATA_ACQUIRE : u32 = 2 ; pub const STARPU_MODE_SHIFT : u32 = 17 ; pub const STARPU_VALUE : u32 = 131072 ; pub const STARPU_CALLBACK : u32 = 262144 ; pub const STARPU_CALLBACK_WITH_ARG : u32 = 393216 ; pub const STARPU_CALLBACK_ARG : u32 = 524288 ; pub const STARPU_PRIORITY : u32 = 655360 ; pub const STARPU_EXECUTE_ON_NODE : u32 = 786432 ; pub const STARPU_EXECUTE_ON_DATA : u32 = 917504 ; pub const STARPU_DATA_ARRAY : u32 = 1048576 ; pub const STARPU_DATA_MODE_ARRAY : u32 = 1179648 ; pub const STARPU_TAG : u32 = 1310720 ; pub const STARPU_HYPERVISOR_TAG : u32 = 1441792 ; pub const STARPU_FLOPS : u32 = 1572864 ; pub const STARPU_SCHED_CTX : u32 = 1703936 ; pub const STARPU_PROLOGUE_CALLBACK : u32 = 1835008 ; pub const STARPU_PROLOGUE_CALLBACK_ARG : u32 = 1966080 ; pub const STARPU_PROLOGUE_CALLBACK_POP : u32 = 2097152 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG : u32 = 2228224 ; pub const STARPU_EXECUTE_ON_WORKER : u32 = 2359296 ; pub const STARPU_EXECUTE_WHERE : u32 = 2490368 ; pub const STARPU_TAG_ONLY : u32 = 2621440 ; pub const STARPU_POSSIBLY_PARALLEL : u32 = 2752512 ; pub const STARPU_WORKER_ORDER : u32 = 2883584 ; pub const STARPU_NODE_SELECTION_POLICY : u32 = 3014656 ; pub const STARPU_NAME : u32 = 3145728 ; pub const STARPU_CL_ARGS : u32 = 3276800 ; pub const STARPU_CL_ARGS_NFREE : u32 = 3407872 ; pub const STARPU_TASK_DEPS_ARRAY : u32 = 3538944 ; pub const STARPU_TASK_COLOR : u32 = 3670016 ; pub const STARPU_HANDLES_SEQUENTIAL_CONSISTENCY : u32 = 3801088 ; pub const STARPU_TASK_SYNCHRONOUS : u32 = 3932160 ; pub const STARPU_TASK_END_DEPS_ARRAY : u32 = 4063232 ; pub const STARPU_TASK_END_DEP : u32 = 4194304 ; pub const STARPU_TASK_WORKERIDS : u32 = 4325376 ; pub const STARPU_SEQUENTIAL_CONSISTENCY : u32 = 4456448 ; pub const STARPU_TASK_PROFILING_INFO : u32 = 4587520 ; pub const STARPU_TASK_NO_SUBMITORDER : u32 = 4718592 ; pub const STARPU_CALLBACK_ARG_NFREE : u32 = 4849664 ; pub const STARPU_CALLBACK_WITH_ARG_NFREE : u32 = 4980736 ; pub const STARPU_PROLOGUE_CALLBACK_ARG_NFREE : u32 = 5111808 ; pub const STARPU_PROLOGUE_CALLBACK_POP_ARG_NFREE : u32 = 5242880 ; pub const STARPU_TASK_SCHED_DATA : u32 = 5373952 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 5505024 ; pub const STARPU_SCHED_CTX_POLICY_NAME : u32 = 65536 ; pub const STARPU_SCHED_CTX_POLICY_STRUCT : u32 = 131072 ; pub const STARPU_SCHED_CTX_POLICY_MIN_PRIO : u32 = 196608 ; pub const STARPU_SCHED_CTX_POLICY_MAX_PRIO : u32 = 262144 ; pub const STARPU_SCHED_CTX_HIERARCHY_LEVEL : u32 = 327680 ; pub const STARPU_SCHED_CTX_NESTED : u32 = 393216 ; pub const STARPU_SCHED_CTX_AWAKE_WORKERS : u32 = 458752 ; pub const STARPU_SCHED_CTX_POLICY_INIT : u32 = 524288 ; pub const STARPU_SCHED_CTX_USER_DATA : u32 = 589824 ; pub const STARPU_SCHED_CTX_CUDA_NSMS : u32 = 655360 ; pub const STARPU_SCHED_CTX_SUB_CTXS : u32 = 720896 ; pub const STARPU_DEFAULT_PRIO : u32 = 0 ; pub const STARPU_PROFILING_DISABLE : u32 = 0 ; pub const STARPU_PROFILING_ENABLE : u32 = 1 ; pub const STARPU_NS_PER_S : u32 = 1000000000 ; pub const STARPU_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct drand48_data { pub __x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __old_x : [:: std :: os :: raw :: c_ushort ; 3usize] , pub __c : :: std :: os :: raw :: c_ushort , pub __init : :: std :: os :: raw :: c_ushort , pub __a : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_drand48_data () { const UNINIT : :: std :: mem :: MaybeUninit < drand48_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < drand48_data > () , 24usize , concat ! ("Size of: " , stringify ! (drand48_data))) ; assert_eq ! (:: std :: mem :: align_of :: < drand48_data > () , 8usize , concat ! ("Alignment of " , stringify ! (drand48_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __old_x) as usize - ptr as usize } , 6usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__old_x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __c) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __init) as usize - ptr as usize } , 14usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . __a) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (drand48_data) , "::" , stringify ! (__a))) ; } pub type starpu_ssize_t = isize ; # [doc = "Store the OpenCL programs as compiled for the different OpenCL\ndevices."] # [repr (C)] pub struct starpu_opencl_program { # [doc = " Store each program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [test] fn bindgen_test_layout_starpu_opencl_program () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_opencl_program > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_opencl_program > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_opencl_program))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_opencl_program > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_opencl_program))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . programs) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_opencl_program) , "::" , stringify ! (programs))) ; } impl Default for starpu_opencl_program { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_opencl_program { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_opencl_program {{ programs: {:?} }}" , self . programs) } } extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Return the context of the current worker."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as <c>(size_t size_of_the_argument, cl_mem *\npointer_to_the_argument)</c>. The last argument must be 0. Return the\nnumber of arguments that were successfully set. In case of failure,\nreturn the id of the argument that could not be set and \\p err is set to\nthe error returned by OpenCL. Otherwise, return the number of\narguments that were set.\n\nHere an example:\n\\code{.c}\nint n;\ncl_int err;\ncl_kernel kernel;\nn = starpu_opencl_set_kernel_args(&err, 2, &kernel, sizeof(foo), &foo, sizeof(bar), &bar, 0);\nif (n != 2) fprintf(stderr, \"Error : %d\\n\", err);\n\\endcode"] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Store the contents of the file \\p source_file_name in the buffer\n\\p opencl_program_source. The file \\p source_file_name can be located in the\ncurrent directory, or in the directory specified by the environment\nvariable \\ref STARPU_OPENCL_PROGRAM_DIR, or\nin the directory <c>share/starpu/opencl</c> of the installation\ndirectory of StarPU, or in the source directory of StarPU. When the\nfile is found, \\p located_file_name is the full name of the file as it\nhas been located on the system, \\p located_dir_name the directory\nwhere it has been located. Otherwise, they are both set to the empty\nstring."] pub fn starpu_opencl_load_program_source (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut :: std :: os :: raw :: c_char , located_dir_name : * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Similar to function starpu_opencl_load_program_source() but\nallocate the buffers \\p located_file_name, \\p located_dir_name and\n\\p opencl_program_source."] pub fn starpu_opencl_load_program_source_malloc (source_file_name : * const :: std :: os :: raw :: c_char , located_file_name : * mut * mut :: std :: os :: raw :: c_char , located_dir_name : * mut * mut :: std :: os :: raw :: c_char , opencl_program_source : * mut * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Compile the OpenCL kernel stored in the file \\p source_file_name\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the same filename as\n\\p source_file_name. The compilation is done for every OpenCL device,\nand the filename is suffixed with the vendor id and the device id of\nthe OpenCL device."] pub fn starpu_opencl_compile_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the OpenCL kernel in the string \\p opencl_program_source\nwith the given options \\p build_options and store the result in the\ndirectory <c>$STARPU_HOME/.starpu/opencl</c> with the filename \\p\nfile_name. The compilation is done for every OpenCL device, and the\nfilename is suffixed with the vendor id and the device id of the\nOpenCL device."] pub fn starpu_opencl_compile_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , file_name : * const :: std :: os :: raw :: c_char , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile the binary OpenCL kernel identified with \\p kernel_id.\nFor every OpenCL device, the binary OpenCL kernel will be loaded from\nthe file\n<c>$STARPU_HOME/.starpu/opencl/\\<kernel_id\\>.\\<device_type\\>.vendor_id_\\<vendor_id\\>_device_id_\\<device_id\\></c>."] pub fn starpu_opencl_load_binary_opencl (kernel_id : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a file."] pub fn starpu_opencl_load_opencl_from_file (source_file_name : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Compile an OpenCL source code stored in a string."] pub fn starpu_opencl_load_opencl_from_string (opencl_program_source : * const :: std :: os :: raw :: c_char , opencl_programs : * mut starpu_opencl_program , build_options : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload an OpenCL compiled code."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a kernel \\p kernel for device \\p devid, on its computation\ncommand queue returned in \\p queue, using program \\p opencl_programs\nand name \\p kernel_name."] pub fn starpu_opencl_load_kernel (kernel : * mut cl_kernel , queue : * mut cl_command_queue , opencl_programs : * mut starpu_opencl_program , kernel_name : * const :: std :: os :: raw :: c_char , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Collect statistics on a kernel execution.\nAfter termination of the kernels, the OpenCL codelet should call this\nfunction with the event returned by \\c clEnqueueNDRangeKernel(), to\nlet StarPU collect statistics about the kernel execution (used cycles,\nconsumed energy)."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Given a valid error status, print the corresponding error message on\n\\c stdout, along with the function name \\p func, the filename\n\\p file, the line number \\p line and the message \\p msg."] pub fn starpu_opencl_display_error (func : * const :: std :: os :: raw :: c_char , file : * const :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int , msg : * const :: std :: os :: raw :: c_char , status : cl_int) ; } extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \\p flags must be a valid\ncombination of \\c cl_mem_flags values."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src_node to the\ngiven \\p buffer on OpenCL \\p dst_node. \\p offset is the offset, in\nbytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_ram_to_opencl (ptr : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , buffer : cl_mem , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buffer on OpenCL\n\\p src_node to the given \\p ptr on RAM \\p dst_node. \\p offset is the\noffset, in bytes, in \\p buffer. if \\p event is <c>NULL</c>, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_ram (buffer : cl_mem , src_node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , size : usize , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p src_offset of \\p\nsrc on OpenCL \\p src_node to byte offset \\p dst_offset of \\p dst on\nOpenCL \\p dst_node. if \\p event is <c>NULL</c>, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\n<c>NULL</c>, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns <c>CL_SUCCESS</c>\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to <c>-EAGAIN</c> if the\nasynchronous launch was successful, or to 0 if \\p event was\n<c>NULL</c>."] pub fn starpu_opencl_copy_opencl_to_opencl (src : cl_mem , src_node : :: std :: os :: raw :: c_uint , src_offset : usize , dst : cl_mem , dst_node : :: std :: os :: raw :: c_uint , dst_offset : usize , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p\nsrc_node to byte offset \\p dst_offset of \\p dst on \\p dst_node. if \\p\nevent is <c>NULL</c>, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not <c>NULL</c>, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns <c>-EAGAIN</c> if the asynchronous launch was\nsuccessfull. It returns 0 if the synchronous copy was successful, or\nfails otherwise."] pub fn starpu_opencl_copy_async_sync (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type va_list = __builtin_va_list ; pub type __gnuc_va_list = __builtin_va_list ; pub type starpu_pthread_t = pthread_t ; pub type starpu_pthread_attr_t = pthread_attr_t ; pub type starpu_pthread_mutex_t = pthread_mutex_t ; pub type starpu_pthread_mutexattr_t = pthread_mutexattr_t ; extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_mutex_check_sched (mutex : * mut starpu_pthread_mutex_t , file : * mut :: std :: os :: raw :: c_char , line : :: std :: os :: raw :: c_int) ; } pub type starpu_pthread_key_t = pthread_key_t ; pub type starpu_pthread_cond_t = pthread_cond_t ; pub type starpu_pthread_condattr_t = pthread_condattr_t ; pub type starpu_pthread_rwlock_t = pthread_rwlock_t ; pub type starpu_pthread_rwlockattr_t = pthread_rwlockattr_t ; pub type starpu_pthread_barrier_t = pthread_barrier_t ; pub type starpu_pthread_barrierattr_t = pthread_barrierattr_t ; # [repr (C)] # [repr (align (16))] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_pthread_spinlock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_pthread_spinlock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () , 16usize , concat ! ("Alignment of " , stringify ! (starpu_pthread_spinlock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . taken) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_pthread_spinlock_t) , "::" , stringify ! (taken))) ; } extern "C" { pub fn starpu_pthread_spin_init (lock : * mut starpu_pthread_spinlock_t , pshared : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_pthread_spin_unlock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } pub type starpu_sem_t = sem_t ; extern "C" { pub fn starpu_sem_trywait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sem_wait (arg1 : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Data_Management Data Management\n@brief Data management facilities provided by StarPU. We show how\nto use existing data interfaces in \\ref API_Data_Interfaces, but\ndevelopers can design their own data interfaces if required.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_data_state { _unused : [u8 ; 0] , } # [doc = "StarPU uses ::starpu_data_handle_t as an opaque handle to manage a\npiece of data. Once a piece of data has been registered to StarPU,\nit is associated to a ::starpu_data_handle_t which keeps track of\nthe state of the piece of data over the entire machine, so that we\ncan maintain data consistency and locate data replicates for\ninstance."] pub type starpu_data_handle_t = * mut _starpu_data_state ; # [doc = "< todo"] pub const STARPU_NONE : starpu_data_access_mode = 0 ; # [doc = "< read-only mode"] pub const STARPU_R : starpu_data_access_mode = 1 ; # [doc = "< write-only mode"] pub const STARPU_W : starpu_data_access_mode = 2 ; # [doc = "< read-write mode. Equivalent to ::STARPU_R|::STARPU_W"] pub const STARPU_RW : starpu_data_access_mode = 3 ; # [doc = "< A temporary buffer is allocated\nfor the task, but StarPU does not\nenforce data consistency---i.e. each\ndevice has its own buffer,\nindependently from each other (even\nfor CPUs), and no data transfer is\never performed. This is useful for\ntemporary variables to avoid\nallocating/freeing buffers inside\neach task. Currently, no behavior is\ndefined concerning the relation with\nthe ::STARPU_R and ::STARPU_W modes\nand the value provided at\nregistration --- i.e., the value of\nthe scratch buffer is undefined at\nentry of the codelet function.  It\nis being considered for future\nextensions at least to define the\ninitial value.  For now, data to be\nused in ::STARPU_SCRATCH mode should\nbe registered with node -1 and a\n<c>NULL</c> pointer, since the value\nof the provided buffer is simply\nignored for now."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< todo"] pub const STARPU_REDUX : starpu_data_access_mode = 8 ; # [doc = "<  ::STARPU_COMMUTE can be passed\nalong ::STARPU_W or ::STARPU_RW to\nexpress that StarPU can let tasks\ncommute, which is useful e.g. when\nbringing a contribution into some\ndata, which can be done in any order\n(but still require sequential\nconsistency against reads or\nnon-commutative writes)."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_insert_task() to\nspecify the data has to be sent using\na synchronous and non-blocking mode\n(see starpu_mpi_issend())"] pub const STARPU_SSEND : starpu_data_access_mode = 32 ; # [doc = "< used to tell the scheduler which\ndata is the most important for the\ntask, and should thus be used to\ntry to group tasks on the same core\nor cache, etc. For now only the ws\nand lws schedulers take this flag\ninto account, and only when rebuild\nwith \\c USE_LOCALITY flag defined in\nthe\nsrc/sched_policies/work_stealing_policy.c\nsource code."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< The purpose of ::STARPU_ACCESS_MODE_MAX is to\nbe the maximum of this enum."] pub const STARPU_ACCESS_MODE_MAX : starpu_data_access_mode = 512 ; # [doc = "Describe a StarPU data access mode\n\nNote: when adding a flag here, update\n_starpu_detect_implicit_data_deps_with_handle\n\nNote: other STARPU_* values in include/starpu_task_util.h"] pub type starpu_data_access_mode = :: std :: os :: raw :: c_uint ; extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the size of the \\p dims array. This can be\nfor instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) ; } extern "C" { # [doc = "Set the coordinates of the data, to be shown in various profiling\ntools. \\p dimensions is the number of subsequent \\c int parameters.\nThis can be for instance the tile coordinates within a big matrix."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Get the coordinates of the data, as set by a previous call to\nstarpu_data_set_coordinates_array() or starpu_data_set_coordinates()\n\\p dimensions is the size of the \\p dims array.\nThis returns the actual number of returned coordinates."] pub fn starpu_data_get_coordinates_array (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , dims : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Unregister a data \\p handle from StarPU. If the data was\nautomatically allocated by StarPU because the home node was -1, all\nautomatically allocated buffers are freed. Otherwise, a valid copy\nof the data is put back into the home node in the buffer that was\ninitially registered. Using a data handle that has been\nunregistered from StarPU results in an undefined behaviour. In case\nwe do not need to update the value of the data in the home node, we\ncan use the function starpu_data_unregister_no_coherency() instead."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unregister(), except that StarPU does not\nput back a valid copy into the home node, in the buffer that was\ninitially registered."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy the data \\p handle once it is no longer needed by any\nsubmitted task. No coherency is provided.\n\nThis is not safe to call starpu_data_unregister_submit() on a handle that\ncomes from the registration of a non-NULL application home buffer, since the\nmoment when the unregistration will happen is unknown to the\napplication. Only calling starpu_shutdown() allows to be sure that the data\nwas really unregistered."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Destroy all replicates of the data \\p handle immediately. After\ndata invalidation, the first access to \\p handle must be performed\nin ::STARPU_W mode. Accessing an invalidated data in ::STARPU_R\nmode results in undefined behaviour."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Specify that the data \\p handle can be discarded without impacting\nthe application."] pub fn starpu_data_advise_as_important (handle : starpu_data_handle_t , is_important : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "The application must call this function prior to accessing\nregistered data from main memory outside tasks. StarPU ensures that\nthe application will get an up-to-date copy of \\p handle in main\nmemory located where the data was originally registered, and that\nall concurrent accesses (e.g. from tasks) will be consistent with\nthe access mode specified with \\p mode. starpu_data_release() must\nbe called once the application no longer needs to access the piece\nof data. Note that implicit data dependencies are also enforced by\nstarpu_data_acquire(), i.e. starpu_data_acquire() will wait for all\ntasks scheduled to work on the data, unless they have been disabled\nexplictly by calling\nstarpu_data_set_default_sequential_consistency_flag() or\nstarpu_data_set_sequential_consistency_flag().\nstarpu_data_acquire() is a blocking call, so that it cannot be\ncalled from tasks or from their callbacks (in that case,\nstarpu_data_acquire() returns <c>-EDEADLK</c>). Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire(), except that the data will be\navailable on the given memory node instead of main memory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can\nbe used instead of an explicit node number."] pub fn starpu_data_acquire_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Asynchronous equivalent of starpu_data_acquire(). When the data\nspecified in \\p handle is available in the access \\p mode, the \\p\ncallback function is executed. The application may access\nthe requested data during the execution of \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb() in case they\nare not disabled. Contrary to starpu_data_acquire(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be\nused instead of an explicit node number."] pub fn starpu_data_acquire_on_node_cb (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb() with the possibility of\nenabling or disabling data dependencies.\nWhen the data specified in \\p handle is available in the access\n\\p mode, the \\p callback function is executed. The application may access\nthe requested data during the execution of this \\p callback. The \\p callback\nfunction must call starpu_data_release() once the application no longer\nneeds to access the piece of data. Note that implicit data\ndependencies are also enforced by starpu_data_acquire_cb_sequential_consistency() in case they\nare not disabled specifically for the given \\p handle or by the parameter \\p sequential_consistency.\nSimilarly to starpu_data_acquire_cb(), this function is\nnon-blocking and may be called from task callbacks. Upon successful\ncompletion, this function returns 0."] pub fn starpu_data_acquire_cb_sequential_consistency (handle : starpu_data_handle_t , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_cb_sequential_consistency(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_acquire_on_node_cb_sequential_consistency_quick (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_on_node_cb_sequential_consistency(),\nexcept that the \\e pre_sync_jobid and \\e post_sync_jobid parameters can be used\nto retrieve the jobid of the synchronization tasks. \\e pre_sync_jobid happens\njust before the acquisition, and \\e post_sync_jobid happens just after the\nrelease."] pub fn starpu_data_acquire_on_node_cb_sequential_consistency_sync_jobids (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , sequential_consistency : :: std :: os :: raw :: c_int , quick : :: std :: os :: raw :: c_int , pre_sync_jobid : * mut :: std :: os :: raw :: c_long , post_sync_jobid : * mut :: std :: os :: raw :: c_long) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The application can call this function instead of starpu_data_acquire() so as to\nacquire the data like starpu_data_acquire(), but only if all\npreviously-submitted tasks have completed, in which case starpu_data_acquire_try()\nreturns 0. StarPU will have ensured that the application will get an up-to-date\ncopy of \\p handle in main memory located where the data was originally\nregistered. starpu_data_release() must be called once the application no longer\nneeds to access the piece of data."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_data_acquire_try(), except that the\ndata will be available on the given memory node instead of main\nmemory.\n::STARPU_ACQUIRE_NO_NODE and ::STARPU_ACQUIRE_NO_NODE_LOCK_ALL can be used instead of an\nexplicit node number."] pub fn starpu_data_acquire_on_node_try (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb()."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwill be available on the given memory \\p node instead of main memory.\nThe \\p node parameter must be exactly the same as the corresponding \\c\nstarpu_data_acquire_on_node* call."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_arbiter { _unused : [u8 ; 0] , } # [doc = "This is an arbiter, which implements an advanced but centralized\nmanagement of concurrent data accesses, see \\ref\nConcurrentDataAccess for the details."] pub type starpu_arbiter_t = * mut starpu_arbiter ; extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter"] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Destroy the \\p arbiter . This must only be called after all data\nassigned to it have been unregistered."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a fetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to the given node as soon as possible, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_fetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue a prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node when there is room for it, so that it is\navailable there for tasks. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the\ndata."] pub fn starpu_data_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Issue an idle prefetch request for the data \\p handle to \\p node, i.e.\nrequests that the data be replicated to \\p node, so that it is\navailable there for tasks, but only when the bus is really idle. If \\p async is 0, the call will\nblock until the transfer is achieved, else the call will return immediately,\nafter having just queued the request. In the latter case, the request will\nasynchronously wait for the completion of any task writing on the data."] pub fn starpu_data_idle_prefetch_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_data_idle_prefetch_on_node_prio (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , async_ : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Advise StarPU that \\p handle will not be used in the close future, and is\nthus a good candidate for eviction from GPUs. StarPU will thus write its value\nback to its home node when the bus is idle, and select this data in priority\nfor eviction when memory gets low."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Set the write-through mask of the data \\p handle (and\nits children), i.e. a bitmask of nodes where the data should be always\nreplicated after modification. It also prevents the data from being\nevicted from these nodes when memory gets scarse. When the data is\nmodified, it is automatically transfered into those memory nodes. For\ninstance a <c>1<<0</c> write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0)."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } extern "C" { # [doc = "Set the data consistency mode associated to a data handle. The\nconsistency mode set using this function has the priority over the\ndefault mode which can be set with\nstarpu_data_set_default_sequential_consistency_flag()."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle"] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the default sequential consistency flag"] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the default sequential consistency flag. If a non-zero\nvalue is passed, a sequential data consistency will be enforced for\nall handles registered after this function call, otherwise it is\ndisabled. By default, StarPU enables sequential data consistency. It\nis also possible to select the data consistency mode of a specific\ndata handle with the function\nstarpu_data_set_sequential_consistency_flag()."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0)."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node."] pub fn starpu_data_query_status (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_int , is_allocated : * mut :: std :: os :: raw :: c_int , is_valid : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the codelets to be used for \\p handle when it is accessed in the\nmode ::STARPU_REDUX. Per-worker buffers will be initialized with\nthe codelet \\p init_cl, and reduction between per-worker buffers will be\ndone with the codelet \\p redux_cl."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } extern "C" { pub fn starpu_data_test_if_allocated_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Set the field \\c user_data for the \\p handle to \\p user_data . It can\nthen be retrieved with starpu_data_get_user_data(). \\p user_data can be any\napplication-defined value, for instance a pointer to an object-oriented\ncontainer for the data."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "If the environment variable \\c str is defined and its value is contained in the array \\c strings, return the array position.\nRaise an error if the environment variable \\c str is defined with a value not in \\c strings\nReturn \\c defvalue if the environment variable \\c str is not defined."] pub fn starpu_get_env_string_var_default (str_ : * const :: std :: os :: raw :: c_char , strings : * mut [* const :: std :: os :: raw :: c_char ; 0usize] , defvalue : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If the environment variable \\c str is defined with a well-defined size value, return the value as a size in bytes. Expected size qualifiers are b, B, k, K, m, M, g, G. The default qualifier is K.\nIf the environment variable \\c str is not defined or is empty, return \\c defval\nRaise an error if the value of the environment variable \\c str is not well-defined."] pub fn starpu_get_env_size_default (str_ : * const :: std :: os :: raw :: c_char , defval : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute the given function \\p func on a subset of workers. When\ncalling this method, the offloaded function \\p func is executed by\nevery StarPU worker that are eligible to execute the function. The\nargument \\p arg is passed to the offloaded function. The argument\n\\p where specifies on which types of processing units the function\nshould be executed.\nSimilarly to the field starpu_codelet::where, it is possible to\nspecify that the function should be executed on every CUDA device\nand every CPU by passing ::STARPU_CPU|::STARPU_CUDA. This function\nblocks until \\p func has been executed on every appropriate\nprocessing units, and thus may not be called from a callback\nfunction for instance."] pub fn starpu_execute_on_each_worker (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32) ; } extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name."] pub fn starpu_execute_on_each_worker_ex (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , where_ : u32 , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Call \\p func(\\p arg) on every worker in the \\p workers array. \\p\nnum_workers indicates the number of workers in this array.  This\nfunction is synchronous, but the different workers may execute the\nfunction in parallel."] pub fn starpu_execute_on_specific_workers (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , num_workers : :: std :: os :: raw :: c_uint , workers : * mut :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Return the current date in micro-seconds."] pub fn starpu_timing_now () -> f64 ; } extern "C" { # [doc = "Copy the content of \\p src_handle into \\p dst_handle. The parameter \\p\nasynchronous indicates whether the function should block or not. In\nthe case of an asynchronous call, it is possible to synchronize with\nthe termination of this operation either by the means of implicit\ndependencies (if enabled) or by calling starpu_task_wait_for_all(). If\n\\p callback_func is not <c>NULL</c>, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument."] pub fn starpu_data_cpy (dst_handle : starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Call hwloc-ps to display binding of each processus and thread running on\nthe machine.<br>\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU."] pub fn starpu_display_bindings () ; } extern "C" { # [doc = "If \\c hwloc is used, convert the given \\p logical_index of a PU to the OS\nindex of this PU. If \\c hwloc is not used, return \\p logical_index."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the hwloc topology used by StarPU. One can use this pointer to get\ninformation about topology, but not to change settings related to topology."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate datas on disk."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_disk_ops { # [doc = "Connect a disk memory at location \\p parameter with size \\p size, and return a\nbase as void*, which will be passed by StarPU to all other methods."] pub plug : :: std :: option :: Option < unsafe extern "C" fn (parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Disconnect a disk memory \\p base."] pub unplug : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void) > , # [doc = "Measure the bandwidth and the latency for the disk \\p node and save it. Returns\n1 if it could measure it."] pub bandwidth : :: std :: option :: Option < unsafe extern "C" fn (node : :: std :: os :: raw :: c_uint , base : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Create a new location for datas of size \\p size. Return an opaque object pointer."] pub alloc : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Free a data \\p obj previously allocated with starpu_disk_ops::alloc."] pub free : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Open an existing location of datas, at a specific position \\p pos dependent on the backend."] pub open : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Close, without deleting it, a location of datas \\p obj."] pub close : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , size : usize) > , # [doc = "Read \\p size bytes of data from \\p obj in \\p base, at offset \\p offset, and put\ninto \\p buf. Return the actual number of read bytes."] pub read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Write \\p size bytes of data to \\p obj in \\p base, at offset \\p offset, from \\p buf. Return 0 on success."] pub write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * const :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Returns it in an allocated buffer \\p ptr, of size \\p size"] pub full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a \\c full_read will get it."] pub full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Asynchronously write \\p size bytes of data to \\p obj in \\p base, at offset \\p\noffset, from \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Asynchronously read \\p size bytes of data from \\p obj in \\p base, at offset \\p\noffset, and put into \\p buf. Return a void* pointer that StarPU will pass to \\c\nxxx_request methods for testing for the completion."] pub async_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_void , offset : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Read all data from \\p obj of \\p base, from offset 0. Return it in an allocated buffer \\p ptr, of size \\p size"] pub async_full_read : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize , dst_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Write data in \\p ptr to \\p obj of \\p base, from offset 0, and truncate \\p obj to\n\\p size, so that a starpu_disk_ops::full_read will get it."] pub async_full_write : :: std :: option :: Option < unsafe extern "C" fn (base : * mut :: std :: os :: raw :: c_void , obj : * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Copy from offset \\p offset_src of disk object \\p obj_src in \\p base_src to\noffset \\p offset_dst of disk object \\p obj_dst in \\p base_dst. Return a void*\npointer that StarPU will pass to \\c xxx_request methods for testing for the\ncompletion."] pub copy : :: std :: option :: Option < unsafe extern "C" fn (base_src : * mut :: std :: os :: raw :: c_void , obj_src : * mut :: std :: os :: raw :: c_void , offset_src : off_t , base_dst : * mut :: std :: os :: raw :: c_void , obj_dst : * mut :: std :: os :: raw :: c_void , offset_dst : off_t , size : usize) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Wait for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy."] pub wait_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , # [doc = "Test for completion of request \\p async_channel returned by a previous\nasynchronous read, write or copy. Return 1 on completion, 0 otherwise."] pub test_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Free the request allocated by a previous asynchronous read, write or copy."] pub free_request : :: std :: option :: Option < unsafe extern "C" fn (async_channel : * mut :: std :: os :: raw :: c_void) > , } # [test] fn bindgen_test_layout_starpu_disk_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_disk_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_disk_ops > () , 152usize , concat ! ("Size of: " , stringify ! (starpu_disk_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_disk_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_disk_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . plug) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (plug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unplug) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (unplug))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bandwidth) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (bandwidth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (alloc))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . open) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (open))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (close))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . read) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . write) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_read) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . full_write) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_write) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_read) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_read) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_read))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . async_full_write) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (async_full_write))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . wait_request) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (wait_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . test_request) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (test_request))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_request) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_disk_ops) , "::" , stringify ! (free_request))) ; } extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the HDF5 library.\n\n<strong>It doesn't support multiple opening from different processes. </strong>\n\nYou may only allow one process to write in the HDF5 file.\n\n<strong>If HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. </strong>"] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\n<strong>Warning: It creates one file per allocation !</strong>"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\n<strong>Warning: It creates one file per allocation !</strong>\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } extern "C" { # [doc = "Use the leveldb created by Google. More information at https://code.google.com/p/leveldb/\nDo not support asynchronous transfers."] pub static mut starpu_disk_leveldb_ops : starpu_disk_ops ; } extern "C" { # [doc = "Close an existing data opened with starpu_disk_open()."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } extern "C" { # [doc = "Open an existing file memory in a disk node. \\p size is the size of\nthe file. \\p pos is the specific position dependent on the backend,\ngiven to the \\c open  method of the disk operations. Return an\nopaque object pointer."] pub fn starpu_disk_open (node : :: std :: os :: raw :: c_uint , pos : * mut :: std :: os :: raw :: c_void , size : usize) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndatas. The \\c plug member of \\p func will be passed \\p parameter,\nand return a \\c base which will be passed to all \\p func methods.\n<br />\nSUCCESS: return the disk node. <br />\nFAIL: return an error code. <br />\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size."] pub fn starpu_disk_register (func : * mut starpu_disk_ops , parameter : * mut :: std :: os :: raw :: c_void , size : starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Contain the node number of the disk swap, if set up through the\n\\ref STARPU_DISK_SWAP variable."] pub static mut starpu_disk_swap_node : :: std :: os :: raw :: c_int ; } # [doc = "Define the per-interface methods. If the\nstarpu_data_copy_methods::any_to_any method is provided, it will be\nused by default if no specific method is provided. It can still be\nuseful to provide more specific method in case of e.g. available\nparticular CUDA or OpenCL support."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_data_copy_methods<cl_event> { # [doc = "If defined, allow the interface to declare whether it supports\ntransferring from \\p src_interface on node \\p src_node to \\p\ndst_interface on node \\p dst_node, run from node \\p handling_node.\nIf not defined, it is assumed that the interface supports all\ntransfers."] pub can_copy : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , handling_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub ram_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub ram_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub ram_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Return 0 on success."] pub ram_to_mic : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub cuda_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node CUDA node. Return 0 on success."] pub cuda_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CUDA node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node. Return 0 on success."] pub cuda_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node. Return 0 on success."] pub opencl_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CUDA node. Return 0 on success."] pub opencl_to_cuda : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node. Return 0 on success."] pub opencl_to_opencl : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub mic_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node. Return 0 on success."] pub ram_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node. Return 0 on success."] pub mpi_ms_to_ram : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node. Return 0 on success."] pub mpi_ms_to_mpi_ms : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , pub ram_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub cuda_to_cuda_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub ram_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node CPU node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node OpenCL node to the \\p dst_interface interface on the\n\\p dst_node OpenCL node, by recording in \\p event, a pointer to a\n<c>cl_event</c>, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub opencl_to_opencl_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MPI Slave node, with the given even. Must return 0 if the\ntransfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub ram_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node CPU node, with the given event. Must return 0 if\nthe transfer was actually completed completely synchronously, or\n<c>-EAGAIN</c> if at least some transfers are still ongoing and\nshould be awaited for by the core."] pub mpi_ms_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MPI Slave node to the \\p dst_interface interface on\nthe \\p dst_node MPI Slave node, using the given stream. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or <c>-EAGAIN</c> if at least some transfers are\nstill ongoing and should be awaited for by the core."] pub mpi_ms_to_mpi_ms_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , event : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node CPU node to the \\p dst_interface interface on the \\p\ndst_node MIC node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_mic_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node MIC node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or <c>-EAGAIN</c> if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub mic_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , srd_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to copy data from the \\p src_interface interface on the\n\\p src_node node to the \\p dst_interface interface on the \\p\ndst_node node. This is meant to be implemented through the\nstarpu_interface_copy() helper, to which async_data should be\npassed as such, and will be used to manage asynchronicity. This\nmust return <c>-EAGAIN</c> if any of the starpu_interface_copy()\ncalls has returned <c>-EAGAIN</c> (i.e. at least some transfer is\nstill ongoing), and return 0 otherwise.\n\nThis can only be implemented if the interface has ready-to-send\ndata blocks. If the interface is more involved than\nthis, i.e. it needs to collect pieces of data before\ntransferring, starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data should be implemented instead,\nand the core will just transfer the resulting data buffer."] pub any_to_any : :: std :: option :: Option < unsafe extern "C" fn (src_interface : * mut :: std :: os :: raw :: c_void , src_node : :: std :: os :: raw :: c_uint , dst_interface : * mut :: std :: os :: raw :: c_void , dst_node : :: std :: os :: raw :: c_uint , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , } # [test] fn bindgen_test_layout_starpu_data_copy_methods () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_copy_methods > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_copy_methods > () , 216usize , concat ! ("Size of: " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_copy_methods > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_copy) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (can_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_ram) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_opencl) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cuda) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_cuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_cuda_async) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_ram_async) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cuda_async) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (cuda_to_cuda_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_opencl_async) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_ram_async) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_opencl_async) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (opencl_to_opencl_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mpi_ms_async) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_ram_async) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_to_mpi_ms_async) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mpi_ms_to_mpi_ms_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ram_to_mic_async) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (ram_to_mic_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_ram_async) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (mic_to_ram_async))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . any_to_any) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_data_copy_methods) , "::" , stringify ! (any_to_any))) ; } # [doc = "< Unknown interface"] pub const STARPU_UNKNOWN_INTERFACE_ID : starpu_data_interface_id = - 1 ; # [doc = "< Identifier for the matrix data interface"] pub const STARPU_MATRIX_INTERFACE_ID : starpu_data_interface_id = 0 ; # [doc = "< Identifier for the block data interface"] pub const STARPU_BLOCK_INTERFACE_ID : starpu_data_interface_id = 1 ; # [doc = "< Identifier for the vector data interface"] pub const STARPU_VECTOR_INTERFACE_ID : starpu_data_interface_id = 2 ; # [doc = "< Identifier for the CSR data interface"] pub const STARPU_CSR_INTERFACE_ID : starpu_data_interface_id = 3 ; # [doc = "< Identifier for the BCSR data interface"] pub const STARPU_BCSR_INTERFACE_ID : starpu_data_interface_id = 4 ; # [doc = "< Identifier for the variable data interface"] pub const STARPU_VARIABLE_INTERFACE_ID : starpu_data_interface_id = 5 ; # [doc = "< Identifier for the void data interface"] pub const STARPU_VOID_INTERFACE_ID : starpu_data_interface_id = 6 ; # [doc = "< Identifier for the multiformat data interface"] pub const STARPU_MULTIFORMAT_INTERFACE_ID : starpu_data_interface_id = 7 ; # [doc = "< Identifier for the COO data interface"] pub const STARPU_COO_INTERFACE_ID : starpu_data_interface_id = 8 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "Identifier for all predefined StarPU data interfaces"] pub type starpu_data_interface_id = :: std :: os :: raw :: c_int ; # [doc = "@defgroup API_Data_Partition Data Partition\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_interface_ops { # [doc = "Register an existing interface into a data handle.\n\nThis iterates over all memory nodes to initialize all fields of the data\ninterface on each of them. Since data is not allocated yet except on the\nhome node, pointers should be left as NULL except on the \\p home_node, for\nwhich the pointers should be copied from the given \\p data_interface, which\nwas filled with the application's pointers.\n\nThis method is mandatory."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_uint , data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Unregister a data handle.\n\nThis iterates over all memory nodes to free any pointer in the data\ninterface on each of them.\n\nAt this point, free_data_on_node has been already called on each of them.\nThis just clears anything that would still be left."] pub unregister_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) > , # [doc = "Allocate data for the interface on a given node. This should use\nstarpu_malloc_on_node() to perform the allocation(s), and fill the pointers\nin the data interface. It should return the size of the allocated memory, or\n-ENOMEM if memory could not be allocated.\n\nNote that the memory node can be CPU memory, GPU memory, or even disk\narea. The result returned by starpu_malloc_on_node() should be just\nstored as uintptr_t without trying to interpret it since it may be a\nGPU pointer, a disk descriptor, etc.\n\nThis method is mandatory to be able to support memory nodes."] pub allocate_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t > , # [doc = "Free data of the interface on a given node.\n\nThis method is mandatory to be able to support memory nodes."] pub free_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize the interface.\nThis method is optional. It is called when initializing the\nhandler on all the memory nodes."] pub init : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) > , # [doc = "Struct with pointer to functions for performing ram/cuda/opencl synchronous and asynchronous transfers.\n\nThis field is mandatory to be able to support memory\nnodes, except disk nodes which can be supported by just\nimplementing starpu_data_interface_ops::pack_data and\nstarpu_data_interface_ops::unpack_data."] pub copy_methods : * const starpu_data_copy_methods , # [doc = "@deprecated\nUse starpu_data_interface_ops::to_pointer instead.\nReturn the current pointer (if any) for the handle on the given node.\n\nThis method is only required if starpu_data_interface_ops::to_pointer\nis not implemented."] pub handle_to_pointer : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return the current pointer (if any) for the given interface on the given node.\n\nThis method is only required for starpu_data_handle_to_pointer()\nand starpu_data_get_local_ptr(), and for disk support."] pub to_pointer : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void > , # [doc = "Return whether the given \\p ptr is within the data for the given interface on the given node.\nThis method is optional, as it is only used for coherency checks."] pub pointer_is_inside : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Return an estimation of the size of data, for performance models and tracing feedback."] pub get_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return an estimation of the size of allocated data, for allocation\nmanagement.\nIf not specified, the starpu_data_interface_ops::get_size method is\nused instead."] pub get_alloc_size : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> usize > , # [doc = "Return a 32bit footprint which characterizes the data size and layout (nx, ny, ld, elemsize, etc.), required for indexing performance models.\n\nstarpu_hash_crc32c_be() and alike can be used to produce this 32bit value from various types of values."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Return a 32bit footprint which characterizes the data allocation, to be used\nfor indexing allocation cache.\nIf not specified, the starpu_data_interface_ops::footprint method is\nused instead."] pub alloc_footprint : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t) -> u32 > , # [doc = "Compare the data size and layout of two interfaces (nx, ny, ld, elemsize,\netc.), to be used for indexing performance models. It should return 1 if\nthe two interfaces size and layout match computation-wise, and 0 otherwise.\nIt does *not* compare the actual content of the interfaces."] pub compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Compare the data allocation of two interfaces etc.), to be used for indexing\nallocation cache. It should return\n1 if the two interfaces are allocation-compatible, i.e. basically have the same alloc_size, and 0 otherwise.\nIf not specified, the starpu_data_interface_ops::compare method is\nused instead."] pub alloc_compare : :: std :: option :: Option < unsafe extern "C" fn (data_interface_a : * mut :: std :: os :: raw :: c_void , data_interface_b : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Dump the sizes of a handle to a file.\nThis is required for performance models"] pub display : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , f : * mut FILE) > , # [doc = "Describe the data into a string in a brief way, such as one\nletter to describe the type of data, and the data\ndimensions.\nThis is required for tracing feedback."] pub describe : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , buf : * mut :: std :: os :: raw :: c_char , size : usize) -> starpu_ssize_t > , # [doc = "An identifier that is unique to each interface."] pub interfaceid : starpu_data_interface_id , # [doc = "Size of the interface data descriptor."] pub interface_size : usize , pub is_multiformat : :: std :: os :: raw :: c_char , # [doc = "If set to non-zero, StarPU will never try to reuse an allocated\nbuffer for a  different handle. This can be notably useful for\napplication-defined interfaces which have a dynamic size, and for\nwhich it thus does not make sense to reuse the buffer since will\nprobably not have the proper size."] pub dontcache : :: std :: os :: raw :: c_char , pub get_mf_ops : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> * mut starpu_multiformat_data_interface_ops > , # [doc = "Pack the data handle into a contiguous buffer at the address\nallocated with <c>starpu_malloc_flags(ptr, size, 0)</c> (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is <c>NULL</c>, the function should not\ncopy the data in the buffer but just set count to the size of the\nbuffer which would have been allocated. The special value -1\nindicates the size is yet unknown.\n\nThis method (and starpu_data_interface_ops::unpack_data) is required\nfor disk support if the starpu_data_copy_methods::any_to_any method\nis not implemented (because the in-memory data layout is too\ncomplex).\n\nThis is also required for MPI support if there is no registered MPI data type."] pub pack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count.\nThe memory at the address \\p ptr should be freed after the data unpacking operation."] pub unpack_data : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [test] fn bindgen_test_layout_starpu_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_interface_ops > () , 192usize , concat ! ("Size of: " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . register_data_handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (register_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unregister_data_handle) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unregister_data_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocate_data_on_node) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (allocate_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . free_data_on_node) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (free_data_on_node))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . copy_methods) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (copy_methods))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle_to_pointer) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (handle_to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . to_pointer) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (to_pointer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pointer_is_inside) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pointer_is_inside))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_size) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_alloc_size) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_alloc_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_footprint) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . compare) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alloc_compare) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (alloc_compare))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . display) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (display))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . describe) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (describe))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaceid) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interfaceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interface_size) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (interface_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_multiformat) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (is_multiformat))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dontcache) as usize - ptr as usize } , 153usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (dontcache))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_mf_ops) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (get_mf_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pack_data) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (pack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unpack_data) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (unpack_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (starpu_data_interface_ops) , "::" , stringify ! (name))) ; } impl Default for starpu_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data into the handle located at the\n\\p handleptr address. The \\p data_interface buffer contains the initial\ndescription of the data in the \\p home_node. The \\p ops argument is a\npointer to a structure describing the different methods used to\nmanipulate this type of interface. See starpu_data_interface_ops for\nmore details on this structure.\nIf \\p home_node is -1, StarPU will automatically allocate the memory when\nit is used for the first time in write-only mode. Once such data\nhandle has been automatically allocated, it is possible to access it\nusing any access mode.\nNote that StarPU supplies a set of predefined types of interface (e.g.\nvector or matrix) which can be registered by the means of helper\nfunctions (e.g. starpu_vector_data_register() or\nstarpu_matrix_data_register())."] pub fn starpu_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , data_interface : * mut :: std :: os :: raw :: c_void , ops : * mut starpu_data_interface_ops) ; } extern "C" { # [doc = "Register that a buffer for \\p handle on \\p node will be set. This is typically\nused by starpu_*_ptr_register helpers before setting the interface pointers for\nthis node, to tell the core that that is now allocated."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or <c>NULL</c>\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return whether the given \\p ptr is within the data for \\p handle on node \\p\nnode (1) or not (0). If the handle interface does not support this operation,\nand thus the result is unknown, -1 is returned."] pub fn starpu_data_pointer_is_inside (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle or <c>NULL</c> if\n\\p handle’s interface does not have any data allocated locally."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node."] pub fn starpu_data_get_interface_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } extern "C" { # [doc = "Execute the packing operation of the interface of the data\nregistered at \\p handle (see starpu_data_interface_ops). This\npacking operation must allocate a buffer large enough at \\p ptr and copy\ninto the newly allocated buffer the data associated to \\p handle. \\p count\nwill be set to the size of the allocated buffer. If \\p ptr is <c>NULL</c>, the\nfunction should not copy the data in the buffer but just set \\p count to\nthe size of the buffer which would have been allocated. The special\nvalue -1 indicates the size is yet unknown."] pub fn starpu_data_pack (handle : starpu_data_handle_t , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count as\ndescribed by the interface of the data. The interface registered at\n\\p handle must define a unpacking operation (see\nstarpu_data_interface_ops)."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the data associated with \\p handle."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer."] pub fn starpu_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } extern "C" { pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the next available id for a newly created data interface\n(\\ref DefiningANewDataInterface)."] pub fn starpu_data_interface_get_next_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\p src on \\p src_node\nto byte offset \\p dst_offset of \\p dst on \\p dst_node. This is to be used in\nthe starpu_data_copy_methods::any_to_any copy method, which is provided with \\p async_data to\nbe passed to starpu_interface_copy(). this returns <c>-EAGAIN</c> if the\ntransfer is still ongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks blocks of \\p blocksize bytes from byte offset \\p src_offset\nof \\p src on \\p src_node to byte offset \\p dst_offset of \\p dst on \\p\ndst_node.\n\nThe blocks start at addresses which are ld_src (resp. ld_dst) bytes apart in\nthe source (resp. destination) interface.\n\nIf blocksize == ld_src == ld_dst, the transfer is optimized into a single\nstarpu_interface_copy call.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 2D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy2d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks : usize , ld_src : usize , ld_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 blocks of \\p blocksize bytes from byte\noffset \\p src_offset of \\p src on \\p src_node to byte offset \\p dst_offset of\n\\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy3d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Copy \\p numblocks_1 * \\p numblocks_2 * \\p numblocks_3 blocks of \\p blocksize\nbytes from byte offset \\p src_offset of \\p src on \\p src_node to byte offset\n\\p dst_offset of \\p dst on \\p dst_node.\n\nThe blocks are grouped by \\p numblocks_1 blocks whose start addresses are\nld1_src (resp. ld1_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_2 groups whose start addresses are\nld2_src (resp. ld2_dst) bytes apart in the source (resp. destination)\ninterface.\n\nSuch groups are grouped by numblocks_3 groups whose start addresses are\nld3_src (resp. ld3_dst) bytes apart in the source (resp. destination)\ninterface.\n\nIf the blocks are contiguous, the transfers will be optimized.\n\nThis is to be used in the starpu_data_copy_methods::any_to_any copy\nmethod for 3D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns <c>-EAGAIN</c> if the transfer is still\nongoing, or 0 if the transfer is already completed."] pub fn starpu_interface_copy4d (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , blocksize : usize , numblocks1 : usize , ld1_src : usize , ld1_dst : usize , numblocks2 : usize , ld2_src : usize , ld2_dst : usize , numblocks3 : usize , ld3_src : usize , ld3_dst : usize , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "When an asynchonous implementation of the data transfer is implemented, the call\nto the underlying CUDA, OpenCL, etc. call should be surrounded\nby calls to starpu_interface_start_driver_copy_async() and\nstarpu_interface_end_driver_copy_async(), so that it is recorded in offline\nexecution traces, and the timing of the submission is checked. \\p start must\npoint to a variable whose value will be passed unchanged to\nstarpu_interface_end_driver_copy_async()."] pub fn starpu_interface_start_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : * mut f64) ; } extern "C" { # [doc = "See starpu_interface_start_driver_copy_async()."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node"] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the given allocation \\p flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node_flags()."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } extern "C" { # [doc = "Allocate \\p size bytes on node \\p dst_node with the default allocation flags. This returns 0 if\nallocation failed, the allocation method should then return <c>-ENOMEM</c> as\nallocated size. Deallocation must be done with starpu_free_on_node()."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node_flags() with the given allocation \\p flags."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node()."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } extern "C" { # [doc = "Define the default flags for allocations performed by starpu_malloc_on_node() and\nstarpu_free_on_node(). The default is \\ref STARPU_MALLOC_PINNED | \\ref STARPU_MALLOC_COUNT."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "@name Accessing Matrix Data Interfaces\n@{"] pub static mut starpu_interface_matrix_ops : starpu_data_interface_ops ; } # [doc = "Matrix interface for dense matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_matrix_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the matrix"] pub ptr : usize , # [doc = "< device handle of the matrix"] pub dev_handle : usize , # [doc = "< offset in the matrix"] pub offset : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of elements between each row of the\nmatrix. Maybe be equal to starpu_matrix_interface::nx\nwhen there is no padding."] pub ld : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_matrix_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_matrix_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_matrix_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_matrix_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_matrix_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ld) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (ld))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_matrix_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_matrix_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p  ny 2D matrix of \\p elemsize-byte elements pointed\nby \\p ptr and initialize \\p handle to represent it. \\p ld specifies the number\nof elements between rows. a value greater than \\p nx adds padding, which\ncan be useful for alignment purposes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *matrix;\nstarpu_data_handle_t matrix_handle;\nmatrix = (float*)malloc(width * height * sizeof(float));\nstarpu_matrix_data_register(&matrix_handle, STARPU_MAIN_RAM, (uintptr_t)matrix, width, width, height, sizeof(float));\n\\endcode"] pub fn starpu_matrix_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*ny*elemsize."] pub fn starpu_matrix_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ld : u32 , nx : u32 , ny : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ld elements between rows."] pub fn starpu_matrix_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ld : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the matrix\ndesignated by \\p handle. Maybe be equal to nx when there is no padding."] pub fn starpu_matrix_get_local_ld (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_matrix_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the matrix designated by \\p handle."] pub fn starpu_matrix_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Accessing COO Data Interfaces\n@{"] pub static mut starpu_interface_coo_ops : starpu_data_interface_ops ; } # [doc = "COO Matrices"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_coo_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< column array of the matrix"] pub columns : * mut u32 , # [doc = "< row array of the matrix"] pub rows : * mut u32 , # [doc = "< values of the matrix"] pub values : usize , # [doc = "< number of elements on the x-axis of the matrix"] pub nx : u32 , # [doc = "< number of elements on the y-axis of the matrix"] pub ny : u32 , # [doc = "< number of values registered in the matrix"] pub n_values : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_coo_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_coo_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_coo_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_coo_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_coo_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_coo_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . columns) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (columns))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rows) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (rows))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . values) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_values) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (n_values))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_coo_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_coo_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny 2D matrix given in the COO format, using the\n\\p columns, \\p rows, \\p values arrays, which must have \\p n_values elements of\nsize \\p elemsize. Initialize \\p handleptr."] pub fn starpu_coo_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nx : u32 , ny : u32 , n_values : u32 , columns : * mut u32 , rows : * mut u32 , values : usize , elemsize : usize) ; } extern "C" { # [doc = "@name Block Data Interface\n@{"] pub static mut starpu_interface_block_ops : starpu_data_interface_ops ; } # [doc = "Block interface for 3D dense blocks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_block_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the block"] pub ptr : usize , # [doc = "< device handle of the block."] pub dev_handle : usize , # [doc = "< offset in the block."] pub offset : usize , # [doc = "< number of elements on the x-axis of the block."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the block."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the block."] pub nz : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< size of the elements of the block."] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_block_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_block_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_block_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_block_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_block_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_block_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ny) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nz) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (nz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldy) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ldz) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (ldz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_block_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_block_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz 3D matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy and\n\\p ldz specify the number of elements between rows and between z planes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *block;\nstarpu_data_handle_t block_handle;\nblock = (float*)malloc(nx*ny*nz*sizeof(float));\nstarpu_block_data_register(&block_handle, STARPU_MAIN_RAM, (uintptr_t)block, nx, nx*ny, nx, ny, nz, sizeof(float));\n\\endcode"] pub fn starpu_block_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , nx : u32 , ny : u32 , nz : u32 , elemsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably), with \\p ldy elements between rows and \\p ldz\nelements between z planes."] pub fn starpu_block_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32) ; } extern "C" { # [doc = "Return the number of elements on the x-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the y-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_ny (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements on the z-axis of the block\ndesignated by \\p handle."] pub fn starpu_block_get_nz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each row of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of elements between each z plane of the block\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_block_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the size of the elements of the block designated by\n\\p handle."] pub fn starpu_block_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_vector_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the vector"] pub ptr : usize , # [doc = "< device handle of the vector."] pub dev_handle : usize , # [doc = "< offset in the vector"] pub offset : usize , # [doc = "< number of elements on the x-axis of the vector"] pub nx : u32 , # [doc = "< size of the elements of the vector"] pub elemsize : usize , # [doc = "< vector slice base, used by the StarPU OpenMP runtime support"] pub slice_base : u32 , # [doc = "< size actually currently allocated"] pub allocsize : usize , } # [test] fn bindgen_test_layout_starpu_vector_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_vector_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_vector_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_vector_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_vector_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_vector_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . slice_base) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (slice_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . allocsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_vector_interface) , "::" , stringify ! (allocsize))) ; } impl Default for starpu_vector_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p nx \\p elemsize-byte elements pointed to by \\p ptr and initialize \\p handle to represent it.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat vector[NX];\nstarpu_data_handle_t vector_handle;\nstarpu_vector_data_register(&vector_handle, STARPU_MAIN_RAM, (uintptr_t)vector, NX, sizeof(vector[0]));\n\\endcode"] pub fn starpu_vector_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize) ; } extern "C" { # [doc = "Similar to starpu_matrix_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize."] pub fn starpu_vector_data_register_allocsize (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , nx : u32 , elemsize : usize , allocsize : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_vector_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the number of elements registered into the array designated by \\p handle."] pub fn starpu_vector_get_nx (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of each element of the array designated by \\p handle."] pub fn starpu_vector_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the allocated size of the array designated by \\p handle."] pub fn starpu_vector_get_allocsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Variable Data Interface\n@{"] pub static mut starpu_interface_variable_ops : starpu_data_interface_ops ; } # [doc = "Variable interface for a single data (not a vector, a matrix, a list,\n...)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_variable_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the variable"] pub ptr : usize , # [doc = "< device handle of the variable."] pub dev_handle : usize , # [doc = "< offset in the variable"] pub offset : usize , # [doc = "< size of the variable"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_variable_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_variable_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_variable_interface > () , 40usize , concat ! ("Size of: " , stringify ! (starpu_variable_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_variable_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_variable_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dev_handle) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (dev_handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . offset) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_variable_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_variable_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register the \\p size byte element pointed to by \\p ptr, which is\ntypically a scalar, and initialize \\p handle to represent this data item.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat var = 42.0;\nstarpu_data_handle_t var_handle;\nstarpu_variable_data_register(&var_handle, STARPU_MAIN_RAM, (uintptr_t)&var, sizeof(var));\n\\endcode"] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } extern "C" { # [doc = "Register into the \\p handle that to store data on node \\p node it should use the\nbuffer located at \\p ptr, or device handle \\p dev_handle and offset \\p offset\n(for OpenCL, notably)"] pub fn starpu_variable_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize) ; } extern "C" { # [doc = "Return the size of the variable designated by \\p handle."] pub fn starpu_variable_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the variable designated by \\p handle."] pub fn starpu_variable_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } extern "C" { # [doc = "Register a void interface. There is no data really associated\nto that interface, but it may be used as a synchronization mechanism.\nIt also permits to express an abstract piece of data that is managed\nby the application internally: this makes it possible to forbid the\nconcurrent execution of different tasks accessing the same <c>void</c>\ndata in read-write concurrently."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "@name CSR Data Interface\n@{"] pub static mut starpu_interface_csr_ops : starpu_data_interface_ops ; } # [doc = "CSR interface for sparse matrices (compressed sparse row\nrepresentation)"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_csr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero entries"] pub nnz : u32 , # [doc = "< number of rows"] pub nrow : u32 , # [doc = "< non-zero values"] pub nzval : usize , # [doc = "< position of non-zero entries on the row"] pub colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row"] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_csr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_csr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_csr_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_csr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_csr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_csr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_csr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_csr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix."] pub fn starpu_csr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero values in the matrix designated\nby \\p handle."] pub fn starpu_csr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix designated by \\p handle."] pub fn starpu_csr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a local pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a local pointer to the column index of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return a local pointer to the row pointer array of the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the size of the elements registered into the matrix\ndesignated by \\p handle."] pub fn starpu_csr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "@name BCSR Data Interface\n@{"] pub static mut starpu_interface_bcsr_ops : starpu_data_interface_ops ; } # [doc = "BCSR interface for sparse matrices (blocked compressed sparse\nrow representation)\n\nNote: when a BCSR matrix is partitioned, nzval, colind, and rowptr point into\nthe corresponding father arrays. The rowptr content is thus the same as the\nfather's. Firstentry is used to offset this so it becomes valid for the child\narrays."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_bcsr_interface { # [doc = "< Identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< number of non-zero BLOCKS"] pub nnz : u32 , # [doc = "< number of rows (in terms of BLOCKS)"] pub nrow : u32 , # [doc = "< non-zero values: nnz blocks of r*c elements"] pub nzval : usize , # [doc = "< array of nnz elements, colind[i] is the block-column index for block i in nzval"] pub colind : * mut u32 , # [doc = "< array of nrow+1\n elements, rowptr[i] is\n the block-index (in\n nzval) of the first block\n of row i. By convention,\n rowptr[nrow] is the\n number of blocks, this\n allows an easier access\n of the matrix's elements\n for the kernels."] pub rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitionning the matrix."] pub firstentry : u32 , # [doc = "< height of the blocks"] pub r : u32 , # [doc = "< width of the blocks"] pub c : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [test] fn bindgen_test_layout_starpu_bcsr_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_bcsr_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_bcsr_interface > () , 64usize , concat ! ("Size of: " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_bcsr_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_bcsr_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nnz) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nnz))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nrow) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nrow))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nzval) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (nzval))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . colind) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (colind))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . rowptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (rowptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . firstentry) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (firstentry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_bcsr_interface) , "::" , stringify ! (elemsize))) ; } impl Default for starpu_bcsr_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "This variant of starpu_data_register() uses the BCSR (Blocked\nCompressed Sparse Row Representation) sparse matrix interface.\nRegister the sparse matrix made of \\p nnz non-zero blocks of elements of\nsize \\p elemsize stored in \\p nzval and initializes \\p handle to represent it.\nBlocks have size \\p r * \\p c. \\p nrow is the number of rows (in terms of\nblocks), \\p colind is an array of nnz elements, colind[i] is the block-column index for block i in \\p nzval,\n\\p rowptr is an array of nrow+1 elements, rowptr[i] is the block-index (in \\p nzval) of the first block of row i. By convention, rowptr[nrow] is the number of blocks, this allows an easier access of the matrix's elements for the kernels.\n\\p firstentry is the index of the first entry of the given arrays\n(usually 0 or 1).\n\nHere an example with the following matrix:\n\n\\code  |  0   1   0   0 | \\endcode\n\\code  |  2   3   0   0 | \\endcode\n\\code  |  4   5   8   9 | \\endcode\n\\code  |  6   7  10  11 | \\endcode\n\n\\code nzval  = [0, 1, 2, 3] ++ [4, 5, 6, 7] ++ [8, 9, 10, 11] \\endcode\n\\code colind = [0, 0, 1] \\endcode\n\\code rowptr = [0, 1, 3] \\endcode\n\\code r = c = 2 \\endcode\n\nwhich translates into the following code\n\n\\code{.c}\nint R = 2; // Size of the blocks\nint C = 2;\n\nint NROWS = 2;\nint NNZ_BLOCKS = 3;    // out of 4\nint NZVAL_SIZE = (R*C*NNZ_BLOCKS);\n\nint nzval[NZVAL_SIZE]  =\n{\n0, 1, 2, 3,    // First block\n4, 5, 6, 7,    // Second block\n8, 9, 10, 11   // Third block\n};\nuint32_t colind[NNZ_BLOCKS] =\n{\n0, // block-column index for first block in nzval\n0, // block-column index for second block in nzval\n1  // block-column index for third block in nzval\n};\nuint32_t rowptr[NROWS+1] =\n{\n0, // block-index in nzval of the first block of the first row.\n1, // block-index in nzval of the first block of the second row.\nNNZ_BLOCKS // number of blocks, to allow an easier element's access for the kernels\n};\n\nstarpu_data_handle_t bcsr_handle;\nstarpu_bcsr_data_register(&bcsr_handle,\nSTARPU_MAIN_RAM,\nNNZ_BLOCKS,\nNROWS,\n(uintptr_t) nzval,\ncolind,\nrowptr,\n0, // firstentry\nR,\nC,\nsizeof(nzval[0]));\n\\endcode"] pub fn starpu_bcsr_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , nnz : u32 , nrow : u32 , nzval : usize , colind : * mut u32 , rowptr : * mut u32 , firstentry : u32 , r : u32 , c : u32 , elemsize : usize) ; } extern "C" { # [doc = "Return the number of non-zero elements in the matrix designated\nby \\p handle."] pub fn starpu_bcsr_get_nnz (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of rows (in terms of blocks of size r*c) in\nthe matrix designated by \\p handle."] pub fn starpu_bcsr_get_nrow (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the index at which all arrays (the column indexes, the\nrow pointers...) of the matrix desginated by \\p handle."] pub fn starpu_bcsr_get_firstentry (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return a pointer to the non-zero values of the matrix\ndesignated by \\p handle."] pub fn starpu_bcsr_get_local_nzval (handle : starpu_data_handle_t) -> usize ; } extern "C" { # [doc = "Return a pointer to the column index, which holds the positions\nof the non-zero entries in the matrix designated by \\p handle."] pub fn starpu_bcsr_get_local_colind (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the row pointer array of the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_local_rowptr (handle : starpu_data_handle_t) -> * mut u32 ; } extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } extern "C" { # [doc = "Return the size of the elements in the matrix designated by\n\\p handle."] pub fn starpu_bcsr_get_elemsize (handle : starpu_data_handle_t) -> usize ; } # [doc = "Multiformat operations"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_data_interface_ops { # [doc = "< size of each element on CPUs"] pub cpu_elemsize : usize , # [doc = "< size of each element on OpenCL devices"] pub opencl_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to OpenCL"] pub cpu_to_opencl_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from OpenCL to CPU"] pub opencl_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on CUDA devices"] pub cuda_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to CUDA"] pub cpu_to_cuda_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from CUDA to CPU"] pub cuda_to_cpu_cl : * mut starpu_codelet , # [doc = "< size of each element on MIC devices"] pub mic_elemsize : usize , # [doc = "< pointer to a codelet which converts from CPU to MIC"] pub cpu_to_mic_cl : * mut starpu_codelet , # [doc = "< pointer to a codelet which converts from MIC to CPU"] pub mic_to_cpu_cl : * mut starpu_codelet , } # [test] fn bindgen_test_layout_starpu_multiformat_data_interface_ops () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_data_interface_ops > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () , 80usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_data_interface_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_elemsize) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_elemsize) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_opencl_cl) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_opencl_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_to_cpu_cl) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (opencl_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_elemsize) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_cuda_cl) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_cuda_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_to_cpu_cl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cuda_to_cpu_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_elemsize) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_elemsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_to_mic_cl) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (cpu_to_mic_cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_to_cpu_cl) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_data_interface_ops) , "::" , stringify ! (mic_to_cpu_cl))) ; } impl Default for starpu_multiformat_data_interface_ops { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_multiformat_interface { pub id : starpu_data_interface_id , pub cpu_ptr : * mut :: std :: os :: raw :: c_void , pub cuda_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub mic_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [test] fn bindgen_test_layout_starpu_multiformat_interface () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_multiformat_interface > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_multiformat_interface > () , 56usize , concat ! ("Size of: " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_multiformat_interface > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_multiformat_interface))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cpu_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_ptr) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (cuda_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_ptr) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (opencl_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_ptr) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (mic_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nx) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (nx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ops) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_multiformat_interface) , "::" , stringify ! (ops))) ; } impl Default for starpu_multiformat_interface { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Register a piece of data that can be represented in different\nways, depending upon the processing unit that manipulates it. It\nallows the programmer, for instance, to use an array of structures\nwhen working on a CPU, and a structure of arrays when working on a\nGPU. \\p nobjects is the number of elements in the data. \\p format_ops\ndescribes the format."] pub fn starpu_multiformat_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : * mut :: std :: os :: raw :: c_void , nobjects : u32 , format_ops : * mut starpu_multiformat_data_interface_ops) ; } # [doc = "Describe a data partitioning operation, to be given to starpu_data_partition()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_filter { # [doc = "Fill the \\p child_interface structure with interface information\nfor the \\p i -th child of the parent \\p father_interface (among\n\\p nparts). The \\p filter structure is provided, allowing to inspect the\nstarpu_data_filter::filter_arg and starpu_data_filter::filter_arg_ptr\nparameters.\nThe details of what needs to be filled in \\p child_interface vary according\nto the data interface, but generally speaking:\n<ul>\n<li> <c>id</c> is usually just copied over from the father,\nwhen the sub data has the same structure as the father,\ne.g. a subvector is a vector, a submatrix is a matrix, etc.\nThis is however not the case for instance when dividing a\nBCSR matrix into its dense blocks, which then are matrices.\n</li>\n<li> <c>nx</c>, <c>ny</c> and alike are usually divided by\nthe number of subdata, depending how the subdivision is\ndone (e.g. nx division vs ny division for vertical matrix\ndivision vs horizontal matrix division). </li>\n<li> <c>ld</c> for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange. </li>\n<li> <c>elemsize</c> is usually just copied over. </li>\n<li> <c>ptr</c>, the pointer to the data, has to be\ncomputed according to \\p i and the father's <c>ptr</c>, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has <c>ptr</c> different\nfrom NULL: in the OpenCL case notably, the\n<c>dev_handle</c> and <c>offset</c> fields are used\ninstead. </li>\n<li> <c>dev_handle</c> should be just copied over from the\nparent. </li>\n<li> <c>offset</c> has to be computed according to \\p i and\nthe father's <c>offset</c>, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n</ul>"] pub filter_func : :: std :: option :: Option < unsafe extern "C" fn (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) > , # [doc = "< Number of parts to partition the data into."] pub nchildren : :: std :: os :: raw :: c_uint , # [doc = "Return the number of children. This can be used instead of\nstarpu_data_filter::nchildren when the number of children depends\non the actual data (e.g. the number of blocks in a sparse\nmatrix)."] pub get_nchildren : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , initial_handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint > , # [doc = "When children use different data interface,\nreturn which interface is used by child number \\p id."] pub get_child_ops : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops > , # [doc = "< Additional parameter for the filter function"] pub filter_arg : :: std :: os :: raw :: c_uint , # [doc = "Additional pointer parameter for\nthe filter function, such as the\nsizes of the different parts."] pub filter_arg_ptr : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_data_filter () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_filter > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_filter > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_data_filter))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_filter > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_filter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_func) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nchildren) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_nchildren) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_nchildren))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_child_ops) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (get_child_ops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filter_arg_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_data_filter) , "::" , stringify ! (filter_arg_ptr))) ; } impl Default for starpu_data_filter { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Request the partitioning of \\p initial_handle into several subdata\naccording to the filter \\p f.\n\nHere an example of how to use the function.\n\\code{.c}\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition(A_handle, &f);\n\\endcode"] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } extern "C" { # [doc = "Unapply the filter which has been applied to \\p root_data, thus\nunpartitioning the data. The pieces of data are collected back into\none big piece in the \\p gathering_node (usually ::STARPU_MAIN_RAM).\nTasks working on the partitioned data will be waited for\nby starpu_data_unpartition().\n\nHere an example of how to use the function.\n\\code{.c}\nstarpu_data_unpartition(A_handle, STARPU_MAIN_RAM);\n\\endcode"] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitionned beforehand."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "After partitioning a StarPU data by applying a filter,\nstarpu_data_get_sub_data() can be used to get handles for each of the\ndata portions. \\p root_data is the parent data that was partitioned.\n\\p depth is the number of filters to traverse (in case several filters\nhave been applied, to e.g. partition in row blocks, and then in column\nblocks), and the subsequent parameters are the indexes. The function\nreturns a handle to the subdata.\n\nHere an example of how to use the function.\n\\code{.c}\nh = starpu_data_get_sub_data(A_handle, 1, taskx);\n\\endcode"] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list."] pub fn starpu_data_vget_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , pa : * mut va_list) -> starpu_data_handle_t ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. \\p nfilters pointers to variables of the\ntype starpu_data_filter should be given."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by\n\\p root_handle recursively. Use a \\p va_list of pointers to\nvariables of the type starpu_data_filter."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } extern "C" { # [doc = "Plan to partition \\p initial_handle into several subdata according to\nthe filter \\p f.\nThe handles are returned into the \\p children array, which has to be\nthe same size as the number of parts described in \\p f. These handles\nare not immediately usable, starpu_data_partition_submit() has to be\ncalled to submit the actual partitioning.\n\nHere is an example of how to use the function:\n\\code{.c}\nstarpu_data_handle_t children[nslicesx];\nstruct starpu_data_filter f =\n{\n.filter_func = starpu_matrix_filter_block,\n.nchildren = nslicesx\n};\nstarpu_data_partition_plan(A_handle, &f, children);\n\\endcode"] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Submit the actual partitioning of \\p initial_handle into the \\p nparts\n\\p children handles. This call is asynchronous, it only submits that the\npartitioning should be done, so that the \\p children handles can now be used to\nsubmit tasks, and \\p initial_handle can not be used to submit tasks any more (to\nguarantee coherency).\nFor instance,\n\\code{.c}\nstarpu_data_partition_submit(A_handle, nslicesx, children);\n\\endcode"] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various partitions of the data.\n\nWhen the application wants to write to \\p initial_handle again, it should call\nstarpu_data_unpartition_submit(), which will properly add dependencies between the\nreads on the \\p children and the writes to be submitted.\n\nIf instead the application wants to write to \\p children handles, it should\ncall starpu_data_partition_readwrite_upgrade_submit(), which will correctly add\ndependencies between the reads on the \\p initial_handle and the writes to be\nsubmitted."] pub fn starpu_data_partition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submited\nin readonly mode through starpu_data_partition_readonly_submit(), and will upgrade\nthat partitioning into read-write mode for the \\p children, by invalidating \\p\ninitial_handle, and adding the necessary dependencies."] pub fn starpu_data_partition_readwrite_upgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Assuming that \\p initial_handle is partitioned into \\p children,\nsubmit an unpartitionning of \\p initial_handle, i.e. submit a\ngathering of the pieces on the requested \\p gathering_node memory\nnode, and submit an invalidation of the children."] pub fn starpu_data_unpartition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_data_unpartition_submit_r (initial_handle : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit(), but do not invalidate \\p\ninitial_handle. This allows to continue using it, but the application has to be\ncareful not to write to \\p initial_handle or \\p children handles, only read from\nthem, since the coherency is otherwise not guaranteed.  This thus allows to\nsubmit various tasks which concurrently read from various\npartitions of the data."] pub fn starpu_data_unpartition_readonly_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Clear the partition planning established between \\p root_data and\n\\p children with starpu_data_partition_plan(). This will notably\nsubmit an unregister all the \\p children, which can thus not be\nused any more afterwards."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task"] pub fn starpu_data_unpartition_submit_sequential_consistency_cb (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int , callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Similar to starpu_data_partition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_partition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Similar to starpu_data_unpartition_submit() but also allow to specify\nthe coherency to be used for the main data \\p initial_handle\nthrough the parameter \\p sequential_consistency."] pub fn starpu_data_unpartition_submit_sequential_consistency (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_int , sequential_consistency : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Partition a block-sparse matrix into dense matrices.\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_bcsr_filter_canonical_block_child_ops()\nand starpu_data_filter::get_nchildren set to\nstarpu_bcsr_filter_canonical_block_get_nchildren()."] pub fn starpu_bcsr_filter_canonical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block()."] pub fn starpu_bcsr_filter_canonical_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } extern "C" { # [doc = "Partition a block-sparse matrix into block-sparse matrices.\n\nThe split is done along the leading dimension, i.e. along adjacent nnz blocks."] pub fn starpu_bcsr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices."] pub fn starpu_csr_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, thus getting (x/\\p\nnparts ,y) matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting ((x-2*shadow)/\\p\nnparts +2*shadow,y) matrices. If \\p nparts does not divide x-2*shadow,\nthe last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can\nonly be used for read-only access, as no coherency is enforced for the\nshadowed parts. A usage example is available in\nexamples/filters/shadow2d.c"] pub fn starpu_matrix_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, thus getting\n(x,y/\\p nparts) matrices. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_matrix_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow) matrices. If \\p nparts does not\ndivide y-2*shadow, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no\ncoherency is enforced for the shadowed parts. A usage example is\navailable in examples/filters/shadow2d.c"] pub fn starpu_matrix_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size."] pub fn starpu_vector_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in \\p nparts chunks of\nequal size with a shadow border <c>filter_arg_ptr</c>, thus getting a vector\nof size <c>(n-2*shadow)/nparts+2*shadow</c>. The <c>filter_arg_ptr</c> field\nof \\p f must be the shadow size casted into \\c void*.\n\n<b>IMPORTANT</b>: This can only be used for read-only access, as no coherency is\nenforced for the shadowed parts. An usage example is available in\nexamples/filters/shadow.c"] pub fn starpu_vector_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts long\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list_long (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned into \\p nparts chunks\naccording to the <c>filter_arg_ptr</c> field of \\p f. The\n<c>filter_arg_ptr</c> field must point to an array of \\p nparts uint32_t\nelements, each of which specifies the number of elements in each chunk\nof the partition."] pub fn starpu_vector_filter_list (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in <c>2</c> chunks of\nequal size, ignoring nparts. Thus, \\p id must be <c>0</c> or <c>1</c>."] pub fn starpu_vector_filter_divide_in_2 (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, thus getting\n(x/\\p nparts ,y,z) 3D matrices. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z) blocks. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, thus getting\n(x,y/\\p nparts ,z) blocks. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_vertical_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z) 3D matrices. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_vertical_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, thus getting\n(x,y,z/\\p nparts) blocks. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder."] pub fn starpu_block_filter_depth_block (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border <c>filter_arg_ptr</c>, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow) blocks. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\n<b>IMPORTANT</b>:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts."] pub fn starpu_block_filter_depth_block_shadow (father_interface : * mut :: std :: os :: raw :: c_void , child_interface : * mut :: std :: os :: raw :: c_void , f : * mut starpu_data_filter , id : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Given an integer \\p n, \\p n the number of parts it must be divided in, \\p id the\npart currently considered, determines the \\p chunk_size and the \\p offset, taking\ninto account the size of the elements stored in the data structure \\p elemsize\nand \\p ld, the leading dimension, which is most often 1."] pub fn starpu_filter_nparts_compute_chunk_size_and_offset (n : :: std :: os :: raw :: c_uint , nparts : :: std :: os :: raw :: c_uint , elemsize : usize , id : :: std :: os :: raw :: c_uint , ld : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } extern "C" { # [doc = "Set an alignment constraints for starpu_malloc() allocations. \\p\nalign must be a power of two. This is for instance called\nautomatically by the OpenCL driver to specify its own alignment\nconstraints."] pub fn starpu_malloc_set_align (align : usize) ; } extern "C" { # [doc = "Allocate data of the given size \\p dim in main memory, and return\nthe pointer to the allocated data through \\p A. It will also try to\npin it in CUDA or OpenCL, so that data transfers from this buffer\ncan be asynchronous, and thus permit data transfer and computation\noverlapping. The allocated buffer must be freed thanks to the\nstarpu_free() function."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory which has previously been allocated with\nstarpu_malloc()."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag."] pub fn starpu_malloc_flags (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Free memory by specifying its size. The given flags should be\nconsistent with the ones given to starpu_malloc_flags() when\nallocating the memory."] pub fn starpu_free_flags (A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } pub type starpu_malloc_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; pub type starpu_free_hook = :: std :: option :: Option < unsafe extern "C" fn (dst_node : :: std :: os :: raw :: c_uint , A : * mut :: std :: os :: raw :: c_void , dim : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > ; extern "C" { # [doc = "Set allocation functions to be used by StarPU. By default, StarPU\nwill use \\c malloc() (or \\c cudaHostAlloc() if CUDA GPUs are used)\nfor all its data handle allocations. The application can specify\nanother allocation primitive by calling this. The malloc_hook\nshould pass the allocated pointer through the \\c A parameter, and\nreturn 0 on success. On allocation failure, it should return\n-ENOMEM. The \\c flags parameter contains ::STARPU_MALLOC_PINNED if\nthe memory should be pinned by the hook for GPU transfer\nefficiency. The hook can use starpu_memory_pin() to achieve this.\nThe \\c dst_node parameter is the starpu memory node, one can\nconvert it to an hwloc logical id with\nstarpu_memory_nodes_numa_id_to_hwloclogid() or to an OS NUMA number\nwith starpu_memory_nodes_numa_devid_to_id()."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } extern "C" { # [doc = "Pin the given memory area, so that CPU-GPU transfers can be done\nasynchronously with DMAs. The memory must be unpinned with\nstarpu_memory_unpin() before being freed. Return 0 on success, -1\non error."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of total memory on the\nnode. Otherwise return -1."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), return the amount of available memory on\nthe node. Otherwise return -1."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref HowToLimitMemoryPerNode)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nHowToLimitMemoryPerNode)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), try to allocate some of it. This does not\nactually allocate memory, but only accounts for it. This can be\nuseful when the application allocates data another way, but want\nStarPU to be aware of the allocation size e.g. for memory\nreclaiming.\nBy default, return <c>-ENOMEM</c> if there is not enough room on\nthe given node. \\p flags can be either ::STARPU_MEMORY_WAIT or\n::STARPU_MEMORY_OVERFLOW to change this."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), free some of it. This does not actually\nfree memory, but only accounts for it, like\nstarpu_memory_allocate(). The amount does not have to be exactly\nthe same as what was passed to starpu_memory_allocate(), only the\neventual amount needs to be the same, i.e. one call to\nstarpu_memory_allocate() can be followed by several calls to\nstarpu_memory_deallocate() to declare the deallocation piece by\npiece."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { # [doc = "If a memory limit is defined on the given node (see Section \\ref\nHowToLimitMemoryPerNode), this will wait for \\p size bytes to\nbecome available on \\p node. Of course, since another thread may be\nallocating memory concurrently, this does not necessarily mean that\nthis amount will be actually available, just that it was reached.\nTo atomically wait for some amount of memory and reserve it,\nstarpu_memory_allocate() should be used with the\n::STARPU_MEMORY_WAIT flag."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } extern "C" { pub fn starpu_sleep (nb_sec : f32) ; } extern "C" { pub fn starpu_usleep (nb_micro_sec : f32) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_task_bundle { _unused : [u8 ; 0] , } # [doc = "Opaque structure describing a list of tasks that should be\nscheduled on the same worker whenever it’s possible. It must be\nconsidered as a hint given to the scheduler as there is no\nguarantee that they will be executed on the same worker."] pub type starpu_task_bundle_t = * mut _starpu_task_bundle ; extern "C" { # [doc = "Factory function creating and initializing \\p bundle, when the call\nreturns, memory needed is allocated and \\p bundle is ready to use."] pub fn starpu_task_bundle_create (bundle : * mut starpu_task_bundle_t) ; } extern "C" { # [doc = "Insert \\p task in \\p bundle. Until \\p task is removed from \\p\nbundle its expected length and data transfer time will be\nconsidered along those of the other tasks of bundle. This function\nmust not be called if \\p bundle is already closed and/or \\p task is\nalready submitted. On success, it returns 0. There are two cases of\nerror : if \\p bundle is already closed it returns <c>-EPERM</c>, if\n\\p task was already submitted it returns <c>-EINVAL</c>."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p bundle. Of course \\p task must have been\npreviously inserted in \\p bundle. This function must not be called\nif \\p bundle is already closed and/or \\p task is already submitted.\nDoing so would result in undefined behaviour. On success, it\nreturns 0. If \\p bundle is already closed it returns\n<c>-ENOENT</c>."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inform the runtime that the user will not modify \\p bundle anymore,\nit means no more inserting or removing task. Thus the runtime can\ndestroy it when possible."] pub fn starpu_task_bundle_close (bundle : starpu_task_bundle_t) ; } extern "C" { # [doc = "Return the expected duration of \\p bundle in micro-seconds."] pub fn starpu_task_bundle_expected_length (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the time (in micro-seconds) expected to transfer all data used within \\p bundle."] pub fn starpu_task_bundle_expected_data_transfer_time (bundle : starpu_task_bundle_t , memory_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the expected energy consumption of \\p bundle in J."] pub fn starpu_task_bundle_expected_energy (bundle : starpu_task_bundle_t , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an array of tasks\nof length \\p ndeps. This function must be called prior to the\nsubmission of the task, but it may called after the submission or\nthe execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already submitted or with an entry\nof \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_deps_array() several times\non the same task, in this case, the dependencies are added. It is\npossible to have redundancy in the task dependencies."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_deps_array(), but the\ntasks are passed after \\p ndeps, which indicates how many tasks \\p\ntask shall be made to depend on. If \\p ndeps is 0, no dependency is\nadded."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an array of\ntasks of length \\p ndeps. \\p task will appear as terminated not\nonly when \\p task is termination, but also when the tasks of \\p\ntask_array have terminated. This function must be called prior to\nthe termination of the task, but it may called after the submission\nor the execution of the tasks in the array, provided the tasks are\nstill valid (i.e. they were not automatically destroyed). Calling\nthis function on a task that was already terminated or with an\nentry of \\p task_array that is no longer a valid task results in an\nundefined behaviour. If \\p ndeps is 0, no dependency is added. It\nis possible to call starpu_task_declare_end_deps_array() several\ntimes on the same task, in this case, the dependencies are added.\nIt is currently not implemented to have redundancy in the task\ndependencies."] pub fn starpu_task_declare_end_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } extern "C" { # [doc = "Declare task end dependencies between a \\p task and an series of \\p\nndeps tasks, similarly to starpu_task_declare_end_deps_array(), but\nthe tasks are passed after \\p ndeps, which indicates how many tasks\n\\p task 's termination shall be made to depend on. If \\p ndeps is\n0, no dependency is added."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Fill \\p task_array with the list of tasks which are direct children\nof \\p task. \\p ndeps is the size of \\p task_array.  This function\nreturns the number of direct children. \\p task_array can be set to\n<c>NULL</c> if \\p ndeps is 0, which allows to compute the number of\nchildren before allocating an array to store them. This function\ncan only be called if \\p task has not completed yet, otherwise the\nresults are undefined. The result may also be outdated if some\nadditional dependency has been added in the meanwhile."] pub fn starpu_task_get_task_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Behave like starpu_task_get_task_succs(), except that it only\nreports tasks which will go through the scheduler, thus avoiding\ntasks with not codelet, or with explicit placement."] pub fn starpu_task_get_task_scheduled_succs (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add \\p nb_deps end dependencies to the task \\p t. This means the\ntask will not terminate until the required number of calls to the\nfunction starpu_task_end_dep_release() has been made."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add()."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifer. It is possible to associate a task\nwith a unique <em>tag</em> chosen by the application, and to\nexpress dependencies between tasks by the means of those tags. To\ndo so, fill the field starpu_task::tag_id with a tag number (can be\narbitrary) and set the field starpu_task::use_tag to 1. If\nstarpu_tag_declare_deps() is called with this tag number, the task\nwill not be started until the tasks which holds the declared\ndependency tags are completed."] pub type starpu_tag_t = u64 ; extern "C" { # [doc = "Specify the dependencies of the task identified by tag \\p id. The\nfirst argument specifies the tag which is configured, the second\nargument gives the number of tag(s) on which \\p id depends. The\nfollowing arguments are the tags which have to be terminated to\nunlock the task. This function must be called before the associated\ntask is submitted to StarPU with starpu_task_submit().\n\n<b>WARNING! Use with caution</b>. Because of the variable arity of\nstarpu_tag_declare_deps(), note that the last arguments must be of\ntype ::starpu_tag_t : constant values typically need to be\nexplicitly casted. Otherwise, due to integer sizes and argument\npassing on the stack, the C compiler might consider the tag\n<c>0x200000003</c> instead of <c>0x2</c> and <c>0x3</c> when\ncalling <c>starpu_tag_declare_deps(0x1, 2, 0x2, 0x3)</c>. Using the\nstarpu_tag_declare_deps_array() function avoids this hazard.\n\n\\code{.c}\n//  Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_declare_deps((starpu_tag_t)0x1, 2, (starpu_tag_t)0x32, (starpu_tag_t)0x52);\n\\endcode"] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } extern "C" { # [doc = "Similar to starpu_tag_declare_deps(), except that its does not take\na variable number of arguments but an \\p array of tags of size \\p\nndeps.\n\n\\code{.c}\n// Tag 0x1 depends on tags 0x32 and 0x52\nstarpu_tag_t tag_array[2] = {0x32, 0x52};\nstarpu_tag_declare_deps_array((starpu_tag_t)0x1, 2, tag_array);\n\\endcode"] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } extern "C" { # [doc = "Block until the task associated to tag \\p id has been executed.\nThis is a blocking call which must therefore not be called within\ntasks or callbacks, but only from the application directly. It is\npossible to synchronize with the same tag multiple times, as long\nas the starpu_tag_remove() function is not called. Note that it is\nstill possible to synchronize with a tag associated to a task for\nwhich the strucuture starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled)."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_tag_wait() except that it blocks until all the \\p\nntags tags contained in the array \\p id are terminated."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Clear the <em>already notified</em> status of a tag which is not\nassociated with a task. Before that, calling\nstarpu_tag_notify_from_apps() again will not notify the successors.\nAfter that, the next call to starpu_tag_notify_from_apps() will\nnotify the successors."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } extern "C" { # [doc = "Release the resources associated to tag \\p id. It can be called\nonce the corresponding task has been executed and when there is no\nother tag that depend on this tag anymore."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } extern "C" { # [doc = "Explicitly unlock tag \\p id. It may be useful in the case of\napplications which execute part of their computation outside StarPU\ntasks (e.g. third-party libraries). It is also provided as a\nconvenient tool for the programmer, for instance to entirely\nconstruct the task DAG before actually giving StarPU the\nopportunity to execute the tasks. When called several times on the\nsame tag, notification will be done only on first call, thus\nimplementing \"OR\" dependencies, until the tag is restarted using\nstarpu_tag_restart()."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } extern "C" { # [doc = "Atomically call starpu_tag_notify_from_apps() and starpu_tag_restart() on tag\n\\p id.\nThis is useful with cyclic graphs, when we want to safely trigger its startup."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } extern "C" { pub fn starpu_tag_get_task (id : starpu_tag_t) -> * mut starpu_task ; } # [doc = "< (default) for classical sequential\ntasks."] pub const STARPU_SEQ : starpu_codelet_type = 0 ; # [doc = "< for a parallel task whose threads are\nhandled by StarPU, the code has to use\nstarpu_combined_worker_get_size() and\nstarpu_combined_worker_get_rank() to\ndistribute the work."] pub const STARPU_SPMD : starpu_codelet_type = 1 ; # [doc = "< for a parallel task whose threads are\nstarted by the codelet function, which has\nto use starpu_combined_worker_get_size() to\ndetermine how many threads should be\nstarted."] pub const STARPU_FORKJOIN : starpu_codelet_type = 2 ; # [doc = "Describe the type of parallel task. See \\ref ParallelTasks for\ndetails."] pub type starpu_codelet_type = :: std :: os :: raw :: c_uint ; # [doc = "< The task has just been initialized."] pub const STARPU_TASK_INIT : starpu_task_status = 0 ; # [doc = "< The task has just been\nsubmitted, and its dependencies has not been checked yet."] pub const STARPU_TASK_BLOCKED : starpu_task_status = 1 ; # [doc = "< The task is ready for execution."] pub const STARPU_TASK_READY : starpu_task_status = 2 ; # [doc = "< The task is running on some worker."] pub const STARPU_TASK_RUNNING : starpu_task_status = 3 ; # [doc = "< The task is finished executing."] pub const STARPU_TASK_FINISHED : starpu_task_status = 4 ; # [doc = "< The task is waiting for a tag."] pub const STARPU_TASK_BLOCKED_ON_TAG : starpu_task_status = 5 ; # [doc = "< The task is waiting for a task."] pub const STARPU_TASK_BLOCKED_ON_TASK : starpu_task_status = 6 ; # [doc = "< The task is waiting for some data."] pub const STARPU_TASK_BLOCKED_ON_DATA : starpu_task_status = 7 ; # [doc = "< The task is stopped."] pub const STARPU_TASK_STOPPED : starpu_task_status = 8 ; pub type starpu_task_status = :: std :: os :: raw :: c_uint ; # [doc = "CPU implementation of a codelet."] pub type starpu_cpu_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "CUDA implementation of a codelet."] pub type starpu_cuda_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "OpenCL implementation of a codelet."] pub type starpu_opencl_func_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC implementation of a codelet."] pub type starpu_mic_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MIC kernel for a codelet"] pub type starpu_mic_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mic_kernel_t > ; # [doc = "MPI Master Slave kernel for a codelet"] pub type starpu_mpi_ms_kernel_t = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut * mut :: std :: os :: raw :: c_void , arg2 : * mut :: std :: os :: raw :: c_void) > ; # [doc = "MPI Master Slave implementation of a codelet."] pub type starpu_mpi_ms_func_t = :: std :: option :: Option < unsafe extern "C" fn () -> starpu_mpi_ms_kernel_t > ; # [doc = "The codelet structure describes a kernel that is possibly\nimplemented on various targets. For compatibility, make sure to\ninitialize the whole structure to zero, either by using explicit\nmemset, or the function starpu_codelet_init(), or by letting the\ncompiler implicitly do it in e.g. static storage case."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet { # [doc = "Optional field to indicate which types of processing units\nare able to execute the codelet. The different values\n::STARPU_CPU, ::STARPU_CUDA, ::STARPU_OPENCL can be\ncombined to specify on which types of processing units the\ncodelet can be executed. ::STARPU_CPU|::STARPU_CUDA for\ninstance indicates that the codelet is implemented for both\nCPU cores and CUDA devices while ::STARPU_OPENCL indicates\nthat it is only available on OpenCL devices. If the field\nis unset, its value will be automatically set based on the\navailability of the XXX_funcs fields defined below. It can\nalso be set to ::STARPU_NOWHERE to specify that no\ncomputation has to be actually done."] pub where_ : u32 , # [doc = "Define a function which should return 1 if the worker\ndesignated by \\p workerid can execute the \\p nimpl -th\nimplementation of \\p task, 0 otherwise."] pub can_execute : :: std :: option :: Option < unsafe extern "C" fn (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int > , # [doc = "Optional field to specify the type of the codelet. The\ndefault is ::STARPU_SEQ, i.e. usual sequential\nimplementation. Other values (::STARPU_SPMD or\n::STARPU_FORKJOIN) declare that a parallel implementation is\nalso available. See \\ref ParallelTasks for details."] pub type_ : starpu_codelet_type , # [doc = "Optional field. If a parallel implementation is available,\nthis denotes the maximum combined worker size that StarPU\nwill use to execute parallel tasks for this codelet."] pub max_parallelism : :: std :: os :: raw :: c_int , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the field starpu_codelet::cpu_funcs."] pub cpu_func : starpu_cpu_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::cuda_funcs field."] pub cuda_func : starpu_cuda_func_t , # [doc = "@deprecated\nOptional field which has been made deprecated. One should\nuse instead the starpu_codelet::opencl_funcs field."] pub opencl_func : starpu_opencl_func_t , # [doc = "Optional array of function pointers to the CPU\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid cpu_func(void *buffers[], void *cl_arg)\n\\endcode\nThe first argument being the array of data managed by the\ndata management library, and the second argument is a\npointer to the argument passed from the field\nstarpu_task::cl_arg. If the field starpu_codelet::where is\nset, then the field tarpu_codelet::cpu_funcs is ignored if\n::STARPU_CPU does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub cpu_funcs : [starpu_cpu_func_t ; 4usize] , # [doc = "Optional array of function pointers to the CUDA\nimplementations of the codelet. The functions must be\nhost-functions written in the CUDA runtime API. Their\nprototype must be:\n\\code{.c}\nvoid cuda_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::cuda_funcs is ignored if ::STARPU_CUDA does\nnot appear in the field starpu_codelet::where, it must be\nnon-<c>NULL</c> otherwise."] pub cuda_funcs : [starpu_cuda_func_t ; 4usize] , # [doc = "Optional array of flags for CUDA execution. They specify\nsome semantic details about CUDA kernel execution, such as\nasynchronous execution."] pub cuda_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to the OpenCL\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid opencl_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where field is set, then the\nfield starpu_codelet::opencl_funcs is ignored if\n::STARPU_OPENCL does not appear in the field\nstarpu_codelet::where, it must be non-<c>NULL</c> otherwise."] pub opencl_funcs : [starpu_opencl_func_t ; 4usize] , # [doc = "Optional array of flags for OpenCL execution. They specify\nsome semantic details about OpenCL kernel execution, such\nas asynchronous execution."] pub opencl_flags : [:: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MIC implementation of the codelet. The\nfunctions prototype must be:\n\\code{.c}\nstarpu_mic_kernel_t mic_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mic_funcs is ignored if ::STARPU_MIC does\nnot appear in the field starpu_codelet::where. It can be\n<c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mic_funcs : [starpu_mic_func_t ; 4usize] , # [doc = "Optional array of function pointers to a function which\nreturns the MPI Master Slave implementation of the codelet.\nThe functions prototype must be:\n\\code{.c}\nstarpu_mpi_ms_kernel_t mpi_ms_func(struct starpu_codelet *cl, unsigned nimpl)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::mpi_ms_funcs is ignored if ::STARPU_MPI_MS\ndoes not appear in the field starpu_codelet::where. It can\nbe <c>NULL</c> if starpu_codelet::cpu_funcs_name is\nnon-<c>NULL</c>, in which case StarPU will simply make a\nsymbol lookup to get the implementation."] pub mpi_ms_funcs : [starpu_mpi_ms_func_t ; 4usize] , # [doc = "Optional array of strings which provide the name of the CPU\nfunctions referenced in the array\nstarpu_codelet::cpu_funcs. This can be used when running on\nMIC devices for StarPU to simply look\nup the MIC function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\n<c>void *buffers[]</c> array. The constant argument passed\nwith the field starpu_task::cl_arg is not counted in this\nnumber. This value should not be above \\ref\nSTARPU_NMAXBUFS. It may be set to \\ref\nSTARPU_VARIABLE_NBUFFERS to specify that the number of\nbuffers and their access modes will be set in\nstarpu_task::nbuffers and starpu_task::modes or\nstarpu_task::dyn_modes, which thus permits to define\ncodelets with a varying number of data."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers,\nand should not exceed \\ref STARPU_NMAXBUFS. If\nunsufficient, this value can be set with the configure\noption \\ref enable-maxbuffers \"--enable-maxbuffers\"."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Is an array of ::starpu_data_access_mode. It describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::modes defined above."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Default value is 0. If this flag is set, StarPU will not\nsystematically send all data to the memory node where the\ntask will be executing, it will read the\nstarpu_codelet::nodes or starpu_codelet::dyn_nodes array to\ndetermine, for each data, whether to send it on the memory\nnode where the task will be executing (-1), or on a\nspecific node (!= -1)."] pub specific_nodes : :: std :: os :: raw :: c_uint , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS."] pub nodes : [:: std :: os :: raw :: c_int ; 8usize] , # [doc = "Optional field. When starpu_codelet::specific_nodes is 1,\nthis specifies the memory nodes where each data should be\nsent to for task execution. The number of entries in this\narray is starpu_codelet::nbuffers. This field should be\nused for codelets having a number of datas greater than\n\\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask). When defining a codelet,\none should either define this field or the field\nstarpu_codelet::nodes defined above."] pub dyn_nodes : * mut :: std :: os :: raw :: c_int , # [doc = "Optional pointer to the task duration performance model\nassociated to this codelet. This optional field is ignored\nwhen set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set."] pub model : * mut starpu_perfmodel , # [doc = "Optional pointer to the task energy consumption performance\nmodel associated to this codelet. This optional field is\nignored when set to <c>NULL</c> or when its field\nstarpu_perfmodel::symbol is not set. In the case of\nparallel codelets, this has to account for all processing\nunits involved in the parallel execution."] pub energy_model : * mut starpu_perfmodel , # [doc = "Optional array for statistics collected at runtime: this is\nfilled by StarPU and should not be accessed directly, but\nfor example by calling the function\nstarpu_codelet_display_stats() (See\nstarpu_codelet_display_stats() for details)."] pub per_worker_stats : [:: std :: os :: raw :: c_ulong ; 80usize] , # [doc = "Optional name of the codelet. This can be useful for\ndebugging purposes."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Optional color of the codelet. This can be useful for\ndebugging purposes."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. If the task defines a\ncallback, the codelet callback is not called, unless called\nwithin the task callback function.\nThe callback is passed the value contained in the\nstarpu_task::callback_arg field. No callback is executed if\nthe field is set to <c>NULL</c>."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Various flags for the codelet."] pub flags : :: std :: os :: raw :: c_int , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet > () , 1040usize , concat ! ("Size of: " , stringify ! (starpu_codelet))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . can_execute) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (can_execute))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . max_parallelism) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (max_parallelism))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_func) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_func) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_func) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_funcs) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_flags) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cuda_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_funcs) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_flags) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (opencl_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_funcs) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mic_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mpi_ms_funcs) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (mpi_ms_funcs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_funcs_name) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (cpu_funcs_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . specific_nodes) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (specific_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 308usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_nodes) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (dyn_nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . model) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_model) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (energy_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_worker_stats) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (per_worker_stats))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 1008usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 1016usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 1024usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . checked) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet) , "::" , stringify ! (checked))) ; } impl Default for starpu_codelet { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [test] fn bindgen_test_layout_starpu_data_descr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_data_descr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_data_descr > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_data_descr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_data_descr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_data_descr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handle) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (handle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mode) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_data_descr) , "::" , stringify ! (mode))) ; } impl Default for starpu_data_descr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@defgroup API_Task_Bundles Task Bundles\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task { # [doc = "Optional name of the task. This can be useful for debugging\npurposes.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_NAME followed by the const char *."] pub name : * const :: std :: os :: raw :: c_char , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to <c>NULL</c>,\nno code is executed during the tasks, such empty tasks can\nbe useful for  synchronization purposes."] pub cl : * mut starpu_codelet , # [doc = "When set, specify where the task is allowed to be executed.\nWhen unset, take the value of starpu_codelet::where.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_WHERE followed by an unsigned long long."] pub where_ : i32 , # [doc = "Specify the number of buffers. This is only used when\nstarpu_codelet::nbuffers is \\ref STARPU_VARIABLE_NBUFFERS.\n\nWith starpu_task_insert() and alike this is automatically computed\nwhen using ::STARPU_DATA_ARRAY and alike."] pub nbuffers : :: std :: os :: raw :: c_int , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers. This field should be used for\ntasks having a number of datas greater than \\ref\nSTARPU_NMAXBUFS (see \\ref SettingManyDataHandlesForATask).\nWhen defining a task, one should either define this field\nor the field starpu_task::handles defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_ARRAY and alike."] pub dyn_handles : * mut starpu_data_handle_t , # [doc = "Array of data pointers to the memory node where execution\nwill happen, managed by the DSM. Is used when the field\nstarpu_task::dyn_handles is defined.\n\nThis is filled by StarPU."] pub dyn_interfaces : * mut * mut :: std :: os :: raw :: c_void , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data needed by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_codelet::nbuffers.\nThis field should be used for codelets having a number of\ndatas greater than \\ref STARPU_NMAXBUFS (see \\ref\nSettingManyDataHandlesForATask).\nWhen defining a codelet, one should either define this\nfield or the field starpu_task::modes defined below.\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub dyn_modes : * mut starpu_data_access_mode , # [doc = "Array of ::starpu_data_handle_t. Specify the handles to the\ndifferent pieces of data accessed by the task. The number\nof entries in this array must be specified in the field\nstarpu_codelet::nbuffers, and should not exceed\n\\ref STARPU_NMAXBUFS. If unsufficient, this value can be\nset with the configure option \\ref enable-maxbuffers\n\"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_R and alike."] pub handles : [starpu_data_handle_t ; 8usize] , # [doc = "Array of Data pointers to the memory node where execution\nwill happen, managed by the DSM.\n\nThis is filled by StarPU."] pub interfaces : [* mut :: std :: os :: raw :: c_void ; 8usize] , # [doc = "Used only when starpu_codelet::nbuffers is \\ref\nSTARPU_VARIABLE_NBUFFERS.\nArray of ::starpu_data_access_mode which describes the\nrequired access modes to the data neeeded by the codelet\n(e.g. ::STARPU_RW). The number of entries in this array\nmust be specified in the field starpu_task::nbuffers, and\nshould not exceed \\ref STARPU_NMAXBUFS. If unsufficient,\nthis value can be set with the configure option\n\\ref enable-maxbuffers \"--enable-maxbuffers\".\n\nWith starpu_task_insert() and alike this is automatically filled\nwhen using ::STARPU_DATA_MODE_ARRAY and alike."] pub modes : [starpu_data_access_mode ; 8usize] , # [doc = "Optional pointer to an array of characters which allows to\ndefine the sequential consistency for each handle for the\ncurrent task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY followed by an unsigned char *"] pub handles_sequential_consistency : * mut :: std :: os :: raw :: c_uchar , # [doc = "Optional pointer which is passed to the codelet through the\nsecond argument of the codelet implementation (e.g.\nstarpu_codelet::cpu_func or starpu_codelet::cuda_func). The\ndefault value is <c>NULL</c>. starpu_codelet_pack_args()\nand starpu_codelet_unpack_args() are helpers that can can\nbe used to respectively pack and unpack data into and from\nit, but the application can manage it any way, the only\nrequirement is that the size of the data must be set in\nstarpu_task::cl_arg_size .\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. For some specific drivers, the pointer\nstarpu_task::cl_arg cannot not be directly given to the\ndriver function. A buffer of size starpu_task::cl_arg_size\nneeds to be allocated on the driver. This buffer is then\nfilled with the starpu_task::cl_arg_size bytes starting at\naddress starpu_task::cl_arg. In this case, the argument\ngiven to the codelet is therefore not the\nstarpu_task::cl_arg pointer, but the address of the buffer\nin local store (LS) instead. This field is ignored for CPU,\nCUDA and OpenCL codelets, where the starpu_task::cl_arg\npointer is given as such.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CL_ARGS followed by a void* and a size_t."] pub cl_arg_size : usize , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost after the execution of the task. Tasks which depend on\nit might already be executing. The callback is passed the\nvalue contained in the starpu_task::callback_arg field. No\ncallback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK followed by the function pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG (or\n::STARPU_CALLBACK_WITH_ARG_NFREE) followed by the function\npointer and the argument."] pub callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\n<c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_CALLBACK_ARG followed by the argument pointer, or thanks to\n::STARPU_CALLBACK_WITH_ARG or\n::STARPU_CALLBACK_WITH_ARG_NFREE followed by the function\npointer and the argument."] pub callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void *)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the\nhost when the task becomes ready for execution, before\ngetting scheduled. The callback is passed the value\ncontained in the starpu_task::prologue_callback_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK followed by the function pointer."] pub prologue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue callback function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_ARG followed by the argument"] pub prologue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = " Optional field, the default value is <c>NULL</c>. This is a\nfunction pointer of prototype <c>void (*f)(void*)</c>\nwhich specifies a possible callback. If this pointer is\nnon-<c>NULL</c>, the callback function is executed on the host\nwhen the task is pop-ed from the scheduler, just before getting\nexecuted. The callback is passed the value contained in the\nstarpu_task::prologue_callback_pop_arg field.\nNo callback is executed if the field is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP followed by the function pointer."] pub prologue_callback_pop_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is <c>NULL</c>. This is\nthe pointer passed to the prologue_callback_pop function. This\nfield is ignored if the field\nstarpu_task::prologue_callback_pop_func is set to <c>NULL</c>.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PROLOGUE_CALLBACK_POP_ARG followed by the argument."] pub prologue_callback_pop_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. Contain the tag associated to the task if\nthe field starpu_task::use_tag is set, ignored\notherwise.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TAG followed by a starpu_tag_t."] pub tag_id : starpu_tag_t , pub _bitfield_align_1 : [u8 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 2usize] > , # [doc = "@private\nThis is only used for tasks that use multiformat handle.\nThis should only be used by StarPU."] pub mf_skip : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has pushed the task on some queue\n\nSet by StarPU."] pub scheduled : :: std :: os :: raw :: c_uchar , # [doc = "Whether the scheduler has prefetched the task's data\n\nSet by StarPU."] pub prefetched : :: std :: os :: raw :: c_uchar , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the identifier of the worker that should\nprocess this task (as returned by starpu_worker_get_id()).\nThis field is ignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EXECUTE_ON_WORKER followed by an int."] pub workerid : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field\nstarpu_task::execute_on_a_specific_worker is set, this\nfield indicates the per-worker consecutive order in which\ntasks should be executed on the worker. Tasks will be\nexecuted in consecutive starpu_task::workerorder values,\nthus ignoring the availability order or task priority. See\n\\ref StaticScheduling for more details. This field is\nignored if the field\nstarpu_task::execute_on_a_specific_worker is set to 0.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_WORKER_ORDER followed by an unsigned."] pub workerorder : :: std :: os :: raw :: c_uint , # [doc = "Optional field. If the field starpu_task::workerids_len is\ndifferent from 0, this field indicates an array of bits\n(stored as uint32_t values) which indicate the set of\nworkers which are allowed to execute the task.\nstarpu_task::workerid takes precedence over this.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids_len thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids : * mut u32 , # [doc = "Optional field. This provides the number of uint32_t values\nin the starpu_task::workerids array.\n\nWith starpu_task_insert() and alike, this can be specified\nalong the field workerids thanks to ::STARPU_TASK_WORKERIDS\nfollowed by a number of workers and an array of bits which\nsize is the number of workers."] pub workerids_len : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is ::STARPU_DEFAULT_PRIO.\nThis field indicates a level of priority for the task. This\nis an integer value that must be set between the return\nvalues of the function starpu_sched_get_min_priority() for\nthe least important tasks, and that of the function\nstarpu_sched_get_max_priority() for the most important\ntasks (included). The ::STARPU_MIN_PRIO and\n::STARPU_MAX_PRIO macros are provided for convenience and\nrespectively return the value of\nstarpu_sched_get_min_priority() and\nstarpu_sched_get_max_priority(). Default priority is\n::STARPU_DEFAULT_PRIO, which is always defined as 0 in\norder to allow static task initialization. Scheduling\nstrategies that take priorities into account can use this\nparameter to take better scheduling decisions, but the\nscheduling policy may also ignore it.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_PRIORITY followed by an unsigned long long."] pub priority : :: std :: os :: raw :: c_int , # [doc = "Current state of the task.\n\nSet by StarPU."] pub status : starpu_task_status , # [doc = "@private\nThis field is set when initializing a task. The function\nstarpu_task_submit() will fail if the field does not have\nthe correct value. This will hence avoid submitting tasks\nwhich have not been properly initialised."] pub magic : :: std :: os :: raw :: c_int , # [doc = "Allow to get the type of task, for filtering out tasks\nin profiling outputs, whether it is really internal to\nStarPU (::STARPU_TASK_TYPE_INTERNAL), a data acquisition\nsynchronization task (::STARPU_TASK_TYPE_DATA_ACQUIRE), or\na normal task (::STARPU_TASK_TYPE_NORMAL)\n\nSet by StarPU."] pub type_ : :: std :: os :: raw :: c_uint , # [doc = "color of the task to be used in dag.dot.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_COLOR followed by an int."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Scheduling context.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_SCHED_CTX followed by an unsigned."] pub sched_ctx : :: std :: os :: raw :: c_uint , # [doc = "Help the hypervisor monitor the execution of this task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_HYPERVISOR_TAG followed by an int."] pub hypervisor_tag : :: std :: os :: raw :: c_int , # [doc = "TODO: related with sched contexts and parallel tasks\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_POSSIBLY_PARALLEL followed by an unsigned."] pub possibly_parallel : :: std :: os :: raw :: c_uint , # [doc = "Optional field. The bundle that includes this task. If no\nbundle is used, this should be <c>NULL</c>."] pub bundle : starpu_task_bundle_t , # [doc = "Optional field. Profiling information for the task.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_TASK_PROFILING_INFO followed by a pointer to the\nappropriate struct."] pub profiling_info : * mut starpu_profiling_task_info , # [doc = "The application can set this to the number of floating points\noperations that the task will have to achieve. StarPU will measure\nthe time that the task takes, and divide the two to get the GFlop/s\nachieved by the task.  This will allow getting GFlops/s curves\nfrom the tool <c>starpu_perfmodel_plot</c>, and is useful for the\nhypervisor load balancing.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_FLOPS followed by a double."] pub flops : f64 , # [doc = "Output field. Predicted duration of the task. This field is\nonly set if the scheduling strategy uses performance\nmodels.\n\nSet by StarPU."] pub predicted : f64 , # [doc = "Output field. Predicted data transfer duration for the task in\nmicroseconds. This field is only valid if the scheduling\nstrategy uses performance models.\n\nSet by StarPU."] pub predicted_transfer : f64 , pub predicted_start : f64 , # [doc = "@private\nA pointer to the previous task. This should only be used by\nStarPU schedulers."] pub prev : * mut starpu_task , # [doc = "@private\nA pointer to the next task. This should only be used by\nStarPU schedulers."] pub next : * mut starpu_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub starpu_private : * mut :: std :: os :: raw :: c_void , # [doc = "@private\nThis is private to StarPU, do not modify."] pub omp_task : * mut starpu_omp_task , # [doc = "@private\nThis is private to StarPU, do not modify."] pub nb_termination_call_required : :: std :: os :: raw :: c_uint , # [doc = "This field is managed by the scheduler, is it allowed to do\nwhatever with it.  Typically, some area would be allocated on push, and released on pop.\n\nWith starpu_task_insert() and alike this is set when using\n::STARPU_TASK_SCHED_DATA."] pub sched_data : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_task () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task > () , 448usize , concat ! ("Size of: " , stringify ! (starpu_task))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . name) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . where_) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (where_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nbuffers) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nbuffers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_handles) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_interfaces) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dyn_modes) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (dyn_modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . interfaces) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (interfaces))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . modes) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (modes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles_sequential_consistency) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (handles_sequential_consistency))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_func) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_arg) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_func) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_arg) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_func) as usize - ptr as usize } , 264usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prologue_callback_pop_arg) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prologue_callback_pop_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag_id) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (tag_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mf_skip) as usize - ptr as usize } , 290usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (mf_skip))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . scheduled) as usize - ptr as usize } , 291usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (scheduled))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prefetched) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prefetched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerorder) as usize - ptr as usize } , 300usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerorder))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids_len) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (workerids_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 316usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . status) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (status))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 324usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . color) as usize - ptr as usize } , 332usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (color))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_ctx) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_ctx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hypervisor_tag) as usize - ptr as usize } , 340usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (hypervisor_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (possibly_parallel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bundle) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (bundle))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . profiling_info) as usize - ptr as usize } , 360usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (profiling_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 368usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted) as usize - ptr as usize } , 376usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_transfer) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_transfer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . predicted_start) as usize - ptr as usize } , 392usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (predicted_start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . prev) as usize - ptr as usize } , 400usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (prev))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 408usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . starpu_private) as usize - ptr as usize } , 416usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (starpu_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . omp_task) as usize - ptr as usize } , 424usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (omp_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_termination_call_required) as usize - ptr as usize } , 432usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (nb_termination_call_required))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_data) as usize - ptr as usize } , 440usize , concat ! ("Offset of field: " , stringify ! (starpu_task) , "::" , stringify ! (sched_data))) ; } impl Default for starpu_task { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl starpu_task { # [inline] pub fn cl_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 1u8) as u32) } } # [inline] pub fn set_cl_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 1u8 , val as u64) } } # [inline] pub fn callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (1usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (2usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (2usize , 1u8 , val as u64) } } # [inline] pub fn prologue_callback_pop_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_prologue_callback_pop_arg_free (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (3usize , 1u8 , val as u64) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (4usize , 1u8) as u32) } } # [inline] pub fn set_use_tag (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (4usize , 1u8 , val as u64) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (5usize , 1u8) as u32) } } # [inline] pub fn set_sequential_consistency (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (5usize , 1u8 , val as u64) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 1u8) as u32) } } # [inline] pub fn set_synchronous (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (6usize , 1u8 , val as u64) } } # [inline] pub fn execute_on_a_specific_worker (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 1u8) as u32) } } # [inline] pub fn set_execute_on_a_specific_worker (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (7usize , 1u8 , val as u64) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 1u8) as u32) } } # [inline] pub fn set_detach (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (8usize , 1u8 , val as u64) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (9usize , 1u8) as u32) } } # [inline] pub fn set_destroy (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (9usize , 1u8 , val as u64) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 1u8) as u32) } } # [inline] pub fn set_regenerate (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (10usize , 1u8 , val as u64) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 1u8) as u32) } } # [inline] pub fn set_no_submitorder (& mut self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (11usize , 1u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_arg_free : :: std :: os :: raw :: c_uint , prologue_callback_pop_arg_free : :: std :: os :: raw :: c_uint , use_tag : :: std :: os :: raw :: c_uint , sequential_consistency : :: std :: os :: raw :: c_uint , synchronous : :: std :: os :: raw :: c_uint , execute_on_a_specific_worker : :: std :: os :: raw :: c_uint , detach : :: std :: os :: raw :: c_uint , destroy : :: std :: os :: raw :: c_uint , regenerate : :: std :: os :: raw :: c_uint , no_submitorder : :: std :: os :: raw :: c_uint) -> __BindgenBitfieldUnit < [u8 ; 2usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 2usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 1u8 , { let cl_arg_free : u32 = unsafe { :: std :: mem :: transmute (cl_arg_free) } ; cl_arg_free as u64 }) ; __bindgen_bitfield_unit . set (1usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let prologue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_arg_free) } ; prologue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let prologue_callback_pop_arg_free : u32 = unsafe { :: std :: mem :: transmute (prologue_callback_pop_arg_free) } ; prologue_callback_pop_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (5usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (6usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let execute_on_a_specific_worker : u32 = unsafe { :: std :: mem :: transmute (execute_on_a_specific_worker) } ; execute_on_a_specific_worker as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (9usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (10usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } extern "C" { # [doc = "Initialize \\p task with default values. This function is implicitly\ncalled by starpu_task_create(). By default, tasks initialized with\nstarpu_task_init() must be deinitialized explicitly with\nstarpu_task_clean(). Tasks can also be initialized statically,\nusing ::STARPU_TASK_INITIALIZER."] pub fn starpu_task_init (task : * mut starpu_task) ; } extern "C" { # [doc = "Release all the structures automatically allocated to execute \\p\ntask, but not the task structure itself and values set by the user\nremain unchanged. It is thus useful for statically allocated tasks\nfor instance. It is also useful when users want to execute the same\noperation several times with as least overhead as possible. It is\ncalled automatically by starpu_task_destroy(). It has to be called\nonly after explicitly waiting for the task or after\nstarpu_shutdown() (waiting for the callback is not enough, since\nStarPU still manipulates the task after calling the callback)."] pub fn starpu_task_clean (task : * mut starpu_task) ; } extern "C" { # [doc = "Allocate a task structure and initialize it with default values.\nTasks allocated dynamically with starpu_task_create() are\nautomatically freed when the task is terminated. This means that\nthe task pointer can not be used any more once the task is\nsubmitted, since it can be executed at any time (unless\ndependencies make it wait) and thus freed at any time. If the field\nstarpu_task::destroy is explicitly unset, the resources used by the\ntask have to be freed by calling starpu_task_destroy()."] pub fn starpu_task_create () -> * mut starpu_task ; } extern "C" { # [doc = "Free the resource allocated during starpu_task_create() and\nassociated with \\p task. This function is called automatically\nafter the execution of a task when the field starpu_task::destroy\nis set, which is the default for tasks created by\nstarpu_task_create(). Calling this function on a statically\nallocated task results in an undefined behaviour."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } extern "C" { # [doc = "Submit \\p task to StarPU. Calling this function does not mean that\nthe task will be executed immediately as there can be data or task\n(tag) dependencies that are not fulfilled yet: StarPU will take\ncare of scheduling this task with respect to such dependencies.\nThis function returns immediately if the field\nstarpu_task::synchronous is set to 0, and block until the\ntermination of the task otherwise. It is also possible to\nsynchronize the application with asynchronous tasks by the means of\ntags, using the function starpu_tag_wait() function for instance.\nIn case of success, this function returns 0, a return value of\n<c>-ENODEV</c> means that there is no worker able to process this\ntask (e.g. there is no GPU available and this task is only\nimplemented for CUDA devices). starpu_task_submit() can be called\nfrom anywhere, including codelet functions and callbacks, provided\nthat the field starpu_task::synchronous is set to 0."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Submit \\p task to the context \\p sched_ctx_id. By default,\nstarpu_task_submit() submits the task to a global context that is\ncreated automatically by StarPU."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until \\p task has been executed. It is not possible to\nsynchronize with a task more than once. It is not possible to wait\nfor synchronous or detached tasks. Upon successful completion, this\nfunction returns 0. Otherwise, <c>-EINVAL</c> indicates that the\nspecified task was either synchronous or detached."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, <c>-EINVAL</c> indicates that\none of the tasks was either synchronous or detached."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until all the tasks that were submitted (to the current\ncontext or the global one if there is no current context) are\nterminated. It does not destroy these tasks."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Block until there are \\p n submitted tasks left (to the current\ncontext or the global one if there is no current context) to be\nexecuted. It does not destroy these tasks."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there are \\p n tasks submitted left to be\nexecuted that were already submitted to the context \\p\nsched_ctx_id."] pub fn starpu_task_wait_for_n_submitted_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint , n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until there is no more ready task."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which are ready for execution\nare already executing. It thus does not include tasks waiting for\ndependencies."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the iteration number for all the tasks to be submitted after\nthis call. This is typically called at the beginning of a task\nsubmission loop. This number will then show up in tracing tools. A\ncorresponding starpu_iteration_pop() call must be made to match the\ncall to starpu_iteration_push(), at the end of the same task\nsubmission loop, typically.\n\nNested calls to starpu_iteration_push() and starpu_iteration_pop()\nare allowed, to describe a loop nest for instance, provided that\nthey match properly."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Drop the iteration number for submitted tasks. This must match a\nprevious call to starpu_iteration_push(), and is typically called\nat the end of a task submission loop."] pub fn starpu_iteration_pop () ; } extern "C" { pub fn starpu_do_schedule () ; } extern "C" { # [doc = "Initialize \\p cl with default values. Codelets should preferably be\ninitialized statically as shown in \\ref DefiningACodelet. However\nsuch a initialisation is not always possible, e.g. when using C++."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } extern "C" { # [doc = "Return the task currently executed by the worker, or <c>NULL</c> if\nit is called either from a thread that is not a task or simply\nbecause there is no task being executed at the moment."] pub fn starpu_task_get_current () -> * mut starpu_task ; } extern "C" { # [doc = "Return the memory node number of parameter \\p i of the task\ncurrently executed, or -1 if it is called either from a thread that\nis not a task or simply because there is no task being executed at\nthe moment.\n\nUsually, the returned memory node number is simply the memory node\nfor the current worker. That may however be different when using\ne.g. starpu_codelet::specific_nodes."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the name of the performance model of \\p task."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the name of \\p task, i.e. either its starpu_task::name\nfield, or the name of the corresponding performance model."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled."] pub fn starpu_create_sync_task (sync_tag : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , deps : * mut starpu_tag_t , callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Create and submit an empty task with the given callback"] pub fn starpu_create_callback_task (callback : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , callback_arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for STARPU_WATCHDOG_TIMEOUT seconds"] pub fn starpu_task_watchdog_set_hook (hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , hook_arg : * mut :: std :: os :: raw :: c_void) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; pub const STARPU_DISK_RAM : starpu_node_kind = 4 ; pub const STARPU_MIC_RAM : starpu_node_kind = 5 ; pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "Memory node Type"] pub type starpu_node_kind = :: std :: os :: raw :: c_uint ; # [doc = "< CPU core"] pub const STARPU_CPU_WORKER : starpu_worker_archtype = 0 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_WORKER : starpu_worker_archtype = 1 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_WORKER : starpu_worker_archtype = 2 ; # [doc = "< Intel MIC device"] pub const STARPU_MIC_WORKER : starpu_worker_archtype = 3 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 6 ; # [doc = "Worker Architecture Type\n\nThe value 4 which was used by the driver SCC is no longer used as\nrenumbering workers would make unusable old performance model\nfiles."] pub type starpu_worker_archtype = :: std :: os :: raw :: c_uint ; # [doc = "Structure needed to iterate on the collection"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_ctx_iterator { # [doc = "The index of the current worker in the collection, needed\nwhen iterating on the collection."] pub cursor : :: std :: os :: raw :: c_int , pub value : * mut :: std :: os :: raw :: c_void , pub possible_value : * mut :: std :: os :: raw :: c_void , pub visited : [:: std :: os :: raw :: c_char ; 80usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_sched_ctx_iterator () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_ctx_iterator > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_ctx_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cursor) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (cursor))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . value) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possible_value) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possible_value))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . visited) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (visited))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . possibly_parallel) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_ctx_iterator) , "::" , stringify ! (possibly_parallel))) ; } impl Default for starpu_sched_ctx_iterator { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< The collection is a tree"] pub const STARPU_WORKER_TREE : starpu_worker_collection_type = 0 ; # [doc = "< The collection is an array"] pub const STARPU_WORKER_LIST : starpu_worker_collection_type = 1 ; # [doc = "Types of structures the worker collection can implement"] pub type starpu_worker_collection_type = :: std :: os :: raw :: c_uint ; # [doc = "A scheduling context manages a collection of workers that can be\nmemorized using different data structures. Thus, a generic\nstructure is available in order to simplify the choice of its type.\nOnly the list data structure is available but further data\nstructures(like tree) implementations are foreseen."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_worker_collection { # [doc = "The workerids managed by the collection"] pub workerids : * mut :: std :: os :: raw :: c_int , pub collection_private : * mut :: std :: os :: raw :: c_void , # [doc = "The number of workers in the collection"] pub nworkers : :: std :: os :: raw :: c_uint , pub unblocked_workers : * mut :: std :: os :: raw :: c_void , pub nunblocked_workers : :: std :: os :: raw :: c_uint , pub masters : * mut :: std :: os :: raw :: c_void , pub nmasters : :: std :: os :: raw :: c_uint , pub present : [:: std :: os :: raw :: c_char ; 80usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 80usize] , pub is_master : [:: std :: os :: raw :: c_char ; 80usize] , # [doc = "The type of structure"] pub type_ : starpu_worker_collection_type , # [doc = "Check if there is another element in collection"] pub has_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_uint > , # [doc = "Return the next element in the collection"] pub get_next : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) -> :: std :: os :: raw :: c_int > , # [doc = "Add a new element in the collection"] pub add : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Remove an element from the collection"] pub remove : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , worker : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int > , # [doc = "Initialize the collection"] pub init : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Deinitialize the colection"] pub deinit : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection) > , # [doc = "Initialize the cursor if there is one"] pub init_iterator : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator) > , pub init_iterator_for_parallel_tasks : :: std :: option :: Option < unsafe extern "C" fn (workers : * mut starpu_worker_collection , it : * mut starpu_sched_ctx_iterator , task : * mut starpu_task) > , } # [test] fn bindgen_test_layout_starpu_worker_collection () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_worker_collection > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_worker_collection > () , 360usize , concat ! ("Size of: " , stringify ! (starpu_worker_collection))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_worker_collection > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_worker_collection))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerids) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (workerids))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collection_private) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (collection_private))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . unblocked_workers) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (unblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nunblocked_workers) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nunblocked_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . masters) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (masters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmasters) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (nmasters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . present) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (present))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_unblocked) as usize - ptr as usize } , 132usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_unblocked))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_master) as usize - ptr as usize } , 212usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (is_master))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 292usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . has_next) as usize - ptr as usize } , 296usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (has_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . get_next) as usize - ptr as usize } , 304usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (get_next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add) as usize - ptr as usize } , 312usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (add))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove) as usize - ptr as usize } , 320usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (remove))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init) as usize - ptr as usize } , 328usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit) as usize - ptr as usize } , 336usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (deinit))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator) as usize - ptr as usize } , 344usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_iterator_for_parallel_tasks) as usize - ptr as usize } , 352usize , concat ! ("Offset of field: " , stringify ! (starpu_worker_collection) , "::" , stringify ! (init_iterator_for_parallel_tasks))) ; } impl Default for starpu_worker_collection { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } extern "C" { # [doc = "Return the number of workers (i.e. processing units executing\nStarPU tasks). The return value should be at most \\ref\nSTARPU_NMAXWORKERS."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC workers controlled by StarPU."] pub fn starpu_mic_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of MIC devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXMICDEVS."] pub fn starpu_mic_device_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current worker, i.e the one associated\nto the calling thread. The return value is either \\c -1 if the\ncurrent context is not a StarPU worker (i.e. when called from the\napplication outside a task or a callback), or an integer between \\c\n0 and starpu_worker_get_count() - \\c 1."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn _starpu_worker_get_id_check (f : * const :: std :: os :: raw :: c_char , l : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Similar to starpu_worker_get_id(), but abort when called from\noutside a worker (i.e. when starpu_worker_get_id() would return \\c\n-1)."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_find_all_worker_combinations () ; } extern "C" { # [doc = "Return the type of processing unit associated to the worker \\p id.\nThe worker identifier is a value returned by the function\nstarpu_worker_get_id()). The return value indicates the\narchitecture of the worker: ::STARPU_CPU_WORKER for a CPU core,\n::STARPU_CUDA_WORKER for a CUDA device, and ::STARPU_OPENCL_WORKER\nfor a OpenCL device. The return value for an invalid identifier is\nunspecified."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\n<c>NULL</c>) value is returned in case of success, <c>-EINVAL</c>\nindicates that \\p type is not valid otherwise."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the list of identifiers of workers of \\p type. Fill the array\n\\p workerids with the identifiers of the \\p workers. The argument\n\\p maxsize indicates the size of the array \\p workerids. The return\nvalue gives the number of identifiers that were put in the array.\n<c>-ERANGE</c> is returned is \\p maxsize is lower than the number\nof workers with the appropriate type: in that case, the array is\nfilled with the \\p maxsize first elements. To avoid such overflows,\nthe value of maxsize can be chosen by the means of the function\nstarpu_worker_get_count_by_type(), or by passing a value greater or\nequal to \\ref STARPU_NMAXWORKERS."] pub fn starpu_worker_get_ids_by_type (type_ : starpu_worker_archtype , workerids : * mut :: std :: os :: raw :: c_int , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the \\p num -th worker that has the\nspecified \\p type. If there is no such worker, -1 is returned."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the worker that has the specified \\p type\nand device id \\p devid (which may not be the n-th, if some devices\nare skipped for instance). If there is no such worker, \\c -1 is\nreturned."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the name of the worker \\p id. StarPU associates a unique human\nreadable string to each processing unit. This function copies at\nmost the \\p maxlen first bytes of the unique string associated to\nthe worker \\p id into the \\p dst buffer. The caller is responsible\nfor ensuring that \\p dst is a valid pointer to a buffer of \\p\nmaxlen bytes at least. Calling this function on an invalid\nidentifier results in an unspecified behaviour."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } extern "C" { # [doc = "Return the device id of the worker \\p id. The worker should be\nidentified with the value returned by the starpu_worker_get_id()\nfunction. In the case of a CUDA worker, this device identifier is\nthe logical device identifier exposed by CUDA (used by the function\n\\c cudaGetDevice() for instance). The device identifier of a CPU\nworker is the logical identifier of the core on which the worker\nwas bound; this identifier is either provided by the OS or by the\nlibrary <c>hwloc</c> in case it is available."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_mp_nodeid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } extern "C" { pub fn starpu_worker_get_sched_ctx_list (worker : :: std :: os :: raw :: c_int , sched_ctx : * mut * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return worker \\p type as a string."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { pub fn starpu_bindid_get_workerids (bindid : :: std :: os :: raw :: c_int , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_devids (type_ : starpu_worker_archtype , devids : * mut :: std :: os :: raw :: c_int , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_stream_workerids (devid : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return a duplicate of\nthe \\c hwloc cpuset associated with the worker \\p workerid. The\nreturned cpuset is obtained from a \\c hwloc_bitmap_dup() function\ncall. It must be freed by the caller using \\c hwloc_bitmap_free()."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to  the worker \\p workerid."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } extern "C" { pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the memory node associated to the current worker"] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of memory nodes"] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return in \\p name the name of a memory node (NUMA 0, CUDA 0, etc.)\n\\p size is the size of the \\p name array."] pub fn starpu_memory_node_get_name (node : :: std :: os :: raw :: c_uint , name : * mut :: std :: os :: raw :: c_char , size : usize) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU"] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the type of \\p node as defined by ::starpu_node_kind. For\nexample, when defining a new data interface, this function should\nbe used in the allocation function to determine on which device the\nmemory needs to be allocated."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } extern "C" { # [doc = "Return \\c !0 if current worker has a scheduling operation in\nprogress, and \\c 0 otherwise."] pub fn starpu_worker_sched_op_pending () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Allow other threads and workers to temporarily observe the current\nworker state, even though it is performing a scheduling operation.\nMust be called by a worker before performing a potentially blocking\ncall such as acquiring a mutex other than its own sched_mutex. This\nfunction increases \\c state_relax_refcnt from the current worker.\nNo more than <c>UINT_MAX-1</c> nested starpu_worker_relax_on()\ncalls should performed on the same worker. This function is\nautomatically called by  starpu_worker_lock() to relax the caller\nworker state while attempting to lock the target worker."] pub fn starpu_worker_relax_on () ; } extern "C" { # [doc = "Must be called after a potentially blocking call is complete, to\nrestore the relax state in place before the corresponding\nstarpu_worker_relax_on(). Decreases \\c state_relax_refcnt. Calls to\nstarpu_worker_relax_on() and starpu_worker_relax_off() must be\nproperly paired. This function is automatically called by\nstarpu_worker_unlock() after the target worker has been unlocked."] pub fn starpu_worker_relax_off () ; } extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Acquire the sched mutex of \\p workerid. If the caller is a worker,\ndistinct from \\p workerid, the caller worker automatically enters a\nrelax state while acquiring the target worker lock."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Attempt to acquire the sched mutex of \\p workerid. Returns \\c 0 if\nsuccessful, \\c !0 if \\p workerid sched mutex is held or the\ncorresponding worker is not in a relax state. If the caller is a\nworker, distinct from \\p workerid, the caller worker automatically\nenters relax state if successfully acquiring the target worker lock."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Acquire the current worker sched mutex."] pub fn starpu_worker_lock_self () ; } extern "C" { # [doc = "Release the current worker sched mutex."] pub fn starpu_worker_unlock_self () ; } extern "C" { # [doc = "Return the number of different combined workers."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the identifier of the current combined worker."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the current combined worker, i.e. the total\nnumber of CPUS running the same task in the case of ::STARPU_SPMD\nparallel tasks, or the total number of threads that the task is\nallowed to start in the case of ::STARPU_FORKJOIN parallel tasks."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread within the combined worker.\nCan only be used in ::STARPU_SPMD parallel tasks, to know which\npart of the task to work on."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Register a new combined worker and get its identifier"] pub fn starpu_combined_worker_assign_workerid (nworkers : :: std :: os :: raw :: c_int , workerid_array : * mut [:: std :: os :: raw :: c_int ; 0usize]) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the description of a combined worker"] pub fn starpu_combined_worker_get_description (workerid : :: std :: os :: raw :: c_int , worker_size : * mut :: std :: os :: raw :: c_int , combined_workerid : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers"] pub fn starpu_combined_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Initialise the barrier for the parallel task, to be pushed to \\p\nworker_size workers (without having to explicit a given combined\nworker)."] pub fn starpu_parallel_task_barrier_init_n (task : * mut starpu_task , worker_size : :: std :: os :: raw :: c_int) ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_device { # [doc = "< type of the device"] pub type_ : starpu_worker_archtype , # [doc = "< identifier of the precise device"] pub devid : :: std :: os :: raw :: c_int , # [doc = "< number of execution in parallel, minus 1"] pub ncores : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_perfmodel_device () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_device > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_device > () , 12usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_device > () , 4usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_device))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devid) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (devid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncores) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_device) , "::" , stringify ! (ncores))) ; } impl Default for starpu_perfmodel_device { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_arch { # [doc = "< number of the devices for the given arch"] pub ndevices : :: std :: os :: raw :: c_int , # [doc = "< list of the devices for the given arch"] pub devices : * mut starpu_perfmodel_device , } # [test] fn bindgen_test_layout_starpu_perfmodel_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_arch > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ndevices) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (ndevices))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . devices) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_arch) , "::" , stringify ! (devices))) ; } impl Default for starpu_perfmodel_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_entry { # [doc = "< mean_n = 1/n sum"] pub mean : f64 , # [doc = "< n dev_n = sum2 - 1/n (sum)^2"] pub deviation : f64 , # [doc = "< sum of samples (in µs)"] pub sum : f64 , # [doc = "< sum of samples^2"] pub sum2 : f64 , # [doc = "< number of samples"] pub nsample : :: std :: os :: raw :: c_uint , pub nerror : :: std :: os :: raw :: c_uint , # [doc = "< data footprint"] pub footprint : u32 , # [doc = "< in bytes"] pub size : usize , # [doc = "< Provided by the application"] pub flops : f64 , pub duration : f64 , pub tag : starpu_tag_t , pub parameters : * mut f64 , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_entry () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_entry > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () , 88usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_entry))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mean) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (mean))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deviation) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (deviation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sum2) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (sum2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nerror) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (nerror))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . duration) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (duration))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tag) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_entry) , "::" , stringify ! (parameters))) ; } impl Default for starpu_perfmodel_history_entry { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [test] fn bindgen_test_layout_starpu_perfmodel_history_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_history_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_history_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . next) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (next))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . entry) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_history_list) , "::" , stringify ! (entry))) ; } impl Default for starpu_perfmodel_history_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_regression_model { # [doc = "< sum of ln(measured)"] pub sumlny : f64 , # [doc = "< sum of ln(size)"] pub sumlnx : f64 , # [doc = "< sum of ln(size)^2"] pub sumlnx2 : f64 , # [doc = "< minimum size"] pub minx : :: std :: os :: raw :: c_ulong , # [doc = "< maximum size"] pub maxx : :: std :: os :: raw :: c_ulong , # [doc = "< sum of ln(size)*ln(measured)"] pub sumlnxlny : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub alpha : f64 , # [doc = "< estimated = alpha * size ^ beta"] pub beta : f64 , # [doc = "< whether the linear regression model is valid (i.e. enough measures)"] pub valid : :: std :: os :: raw :: c_uint , # [doc = "< estimated = a size ^b + c"] pub a : f64 , # [doc = "< estimated = a size ^b + c"] pub b : f64 , # [doc = "< estimated = a size ^b + c"] pub c : f64 , # [doc = "< whether the non-linear regression model is valid (i.e. enough measures)"] pub nl_valid : :: std :: os :: raw :: c_uint , # [doc = "< number of sample values for non-linear regression"] pub nsample : :: std :: os :: raw :: c_uint , # [doc = "< list of computed coefficients for multiple linear regression model"] pub coeff : * mut f64 , # [doc = "< number of coefficients for multiple linear regression model"] pub ncoeff : :: std :: os :: raw :: c_uint , # [doc = "< whether the multiple linear regression model is valid"] pub multi_valid : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_perfmodel_regression_model () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_regression_model > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () , 120usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_regression_model))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlny) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnx2) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnx2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . minx) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (minx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . maxx) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (maxx))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sumlnxlny) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (sumlnxlny))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . alpha) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (alpha))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . beta) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (beta))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . valid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . a) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (a))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . b) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (b))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . c) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (c))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nl_valid) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nl_valid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nsample) as usize - ptr as usize } , 100usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (nsample))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . coeff) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (coeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncoeff) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (ncoeff))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . multi_valid) as usize - ptr as usize } , 116usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_regression_model) , "::" , stringify ! (multi_valid))) ; } impl Default for starpu_perfmodel_regression_model { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_table { _unused : [u8 ; 0] , } pub type starpu_perfmodel_per_arch_cost_function = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > ; pub type starpu_perfmodel_per_arch_size_base = :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> usize > ; # [doc = "information about the performance model of a given arch."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel_per_arch { # [doc = "Used by ::STARPU_PER_ARCH, must point to functions which take a\ntask, the target arch and implementation number (as mere\nconveniency, since the array is already indexed by these), and\nmust return a task duration estimation in micro-seconds."] pub cost_function : starpu_perfmodel_per_arch_cost_function , # [doc = "Same as in structure starpu_perfmodel, but per-arch, in case it\ndepends on the architecture-specific implementation."] pub size_base : starpu_perfmodel_per_arch_size_base , # [doc = "\\private\nThe history of performance measurements."] pub history : * mut starpu_perfmodel_history_table , # [doc = "\\private\nUsed by ::STARPU_HISTORY_BASED, ::STARPU_NL_REGRESSION_BASED and\n::STARPU_MULTIPLE_REGRESSION_BASED, records all execution history\nmeasures."] pub list : * mut starpu_perfmodel_history_list , # [doc = "\\private\nUsed by ::STARPU_REGRESSION_BASED, ::STARPU_NL_REGRESSION_BASED\nand ::STARPU_MULTIPLE_REGRESSION_BASED, contains the estimated\nfactors of the regression."] pub regression : starpu_perfmodel_regression_model , pub debug_path : [:: std :: os :: raw :: c_char ; 256usize] , } # [test] fn bindgen_test_layout_starpu_perfmodel_per_arch () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel_per_arch > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () , 408usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel_per_arch))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . history) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (history))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . list) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . regression) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (regression))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . debug_path) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel_per_arch) , "::" , stringify ! (debug_path))) ; } impl Default for starpu_perfmodel_per_arch { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } pub const STARPU_PERFMODEL_INVALID : starpu_perfmodel_type = 0 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 2 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 3 ; # [doc = "< Automatic linear regression-based cost model  (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "todo"] pub type starpu_perfmodel_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_perfmodel_state { _unused : [u8 ; 0] , } pub type starpu_perfmodel_state_t = * mut _starpu_perfmodel_state ; # [doc = "Contain all information about a performance model. At least the\ntype and symbol fields have to be filled when defining a performance\nmodel for a codelet. For compatibility, make sure to initialize the\nwhole structure to zero, either by using explicit memset, or by\nletting the compiler implicitly do it in e.g. static storage case. If\nnot provided, other fields have to be zero."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_perfmodel { # [doc = "type of performance model\n<ul>\n<li>\n::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED,\n::STARPU_NL_REGRESSION_BASED: No other fields needs to be\nprovided, this is purely history-based.\n</li>\n<li>\n::STARPU_MULTIPLE_REGRESSION_BASED: Need to provide fields\nstarpu_perfmodel::nparameters (number of different parameters),\nstarpu_perfmodel::ncombinations (number of parameters\ncombinations-tuples) and table starpu_perfmodel::combinations\nwhich defines exponents of the equation. Function cl_perf_func\nalso needs to define how to extract parameters from the task.\n</li>\n<li>\n::STARPU_PER_ARCH: either field\nstarpu_perfmodel::arch_cost_function has to be filled with a\nfunction that returns the cost in micro-seconds on the arch given\nas parameter, or field starpu_perfmodel::per_arch has to be filled\nwith functions which return the cost in micro-seconds.\n</li>\n<li>\n::STARPU_COMMON: field starpu_perfmodel::cost_function has to be\nfilled with a function that returns the cost in micro-seconds on a\nCPU, timing on other archs will be determined by multiplying by an\narch-specific factor.\n</li>\n</ul>"] pub type_ : starpu_perfmodel_type , # [doc = "Used by ::STARPU_COMMON. Take a task and implementation number,\nand must return a task duration estimation in micro-seconds."] pub cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_COMMON. Take a task, an arch and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that arch."] pub arch_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not <c>NULL</c>, take a task and\nimplementation number, and return the size to be used as index to\ndistinguish histories and as a base for regressions."] pub size_base : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> usize > , # [doc = "Used by ::STARPU_HISTORY_BASED. If not <c>NULL</c>, take a task\nand return the footprint to be used as index to distinguish\nhistories. The default is to use the starpu_task_data_footprint()\nfunction."] pub footprint : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> u32 > , # [doc = "symbol name for the performance model, which will be used as file\nname to store the model. It must be set otherwise the model will\nbe ignored."] pub symbol : * const :: std :: os :: raw :: c_char , # [doc = "\\private\nWhether the performance model is already loaded from the disk."] pub is_loaded : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub benchmarking : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub is_init : :: std :: os :: raw :: c_uint , pub parameters : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task , parameters : * mut f64) > , # [doc = "\\private\nNames of parameters used for multiple linear regression models (M,\nN, K)"] pub parameters_names : * mut * const :: std :: os :: raw :: c_char , # [doc = "\\private\nNumber of parameters used for multiple linear regression models"] pub nparameters : :: std :: os :: raw :: c_uint , # [doc = "\\private\nTable of combinations of parameters (and the exponents) used for\nmultiple linear regression models"] pub combinations : * mut * mut :: std :: os :: raw :: c_uint , # [doc = "\\private\nNumber of combination of parameters used for multiple linear\nregression models"] pub ncombinations : :: std :: os :: raw :: c_uint , # [doc = "\\private"] pub state : starpu_perfmodel_state_t , } # [test] fn bindgen_test_layout_starpu_perfmodel () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_perfmodel > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_perfmodel > () , 112usize , concat ! ("Size of: " , stringify ! (starpu_perfmodel))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_perfmodel > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_perfmodel))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cost_function) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arch_cost_function) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (arch_cost_function))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (size_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . footprint) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (footprint))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loaded) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_loaded))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . benchmarking) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (benchmarking))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_init) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (is_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . parameters_names) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (parameters_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nparameters) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (nparameters))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . combinations) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (combinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncombinations) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (ncombinations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . state) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_perfmodel) , "::" , stringify ! (state))) ; } impl Default for starpu_perfmodel { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p model performance model structure. This is automatically\ncalled when e.g. submitting a task using a codelet using this performance model."] pub fn starpu_perfmodel_init (model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Load the performance model found in the file named \\p filename. \\p model has to be\ncompletely zero, and will be filled with the information stored in the given file."] pub fn starpu_perfmodel_load_file (filename : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Load a given performance model. \\p model has to be\ncompletely zero, and will be filled with the information stored in\n<c>$STARPU_HOME/.starpu</c>. The function is intended to be used by\nexternal tools that want to read the performance model files."] pub fn starpu_perfmodel_load_symbol (symbol : * const :: std :: os :: raw :: c_char , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unload \\p model which has been previously loaded\nthrough the function starpu_perfmodel_load_symbol()"] pub fn starpu_perfmodel_unload_model (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Fills \\p path (supposed to be \\p maxlen long) with the full path to the\nperformance model file for symbol \\p symbol.  This path can later on be used\nfor instance with starpu_perfmodel_load_file() ."] pub fn starpu_perfmodel_get_model_path (symbol : * const :: std :: os :: raw :: c_char , path : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } extern "C" { # [doc = "Free internal memory used for sampling\nmanagement. It should only be called by an application which is not\ncalling starpu_shutdown() as this function already calls it. See for\nexample <c>tools/starpu_perfmodel_display.c</c>."] pub fn starpu_perfmodel_free_sampling () ; } extern "C" { # [doc = "Return the architecture type of the worker \\p workerid."] pub fn starpu_worker_get_perf_archtype (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_add (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_get (ndevices : :: std :: os :: raw :: c_int , devices : * mut starpu_perfmodel_device) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_arch (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , impl_ : :: std :: os :: raw :: c_uint) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_get_model_per_devices (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , ...) -> * mut starpu_perfmodel_per_arch ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_cost_function (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_cost_function , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_set_per_devices_size_base (model : * mut starpu_perfmodel , impl_ : :: std :: os :: raw :: c_int , func : starpu_perfmodel_per_arch_size_base , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the path to the debugging information for the performance model."] pub fn starpu_perfmodel_debugfilepath (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , path : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * mut :: std :: os :: raw :: c_char ; } extern "C" { # [doc = "Return the architecture name for \\p arch"] pub fn starpu_perfmodel_get_arch_name (arch : * mut starpu_perfmodel_arch , archname : * mut :: std :: os :: raw :: c_char , maxlen : usize , nimpl : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the estimated time of a task with the given model and the given footprint."] pub fn starpu_perfmodel_history_based_expected_perf (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , footprint : u32) -> f64 ; } extern "C" { # [doc = "If starpu_init() is not used, starpu_perfmodel_initialize() should be used called calling starpu_perfmodel_* functions."] pub fn starpu_perfmodel_initialize () ; } extern "C" { # [doc = "Print a list of all performance models on \\p output"] pub fn starpu_perfmodel_list (output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print (model : * mut starpu_perfmodel , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) ; } extern "C" { pub fn starpu_perfmodel_print_all (model : * mut starpu_perfmodel , arch : * mut :: std :: os :: raw :: c_char , parameter : * mut :: std :: os :: raw :: c_char , footprint : * mut u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Feed the performance model model with an explicit\nmeasurement measured (in µs), in addition to measurements done by StarPU\nitself. This can be useful when the application already has an\nexisting set of measurements done in good conditions, that StarPU\ncould benefit from instead of doing on-line measurements. An example\nof use can be seen in \\ref PerformanceModelExample."] pub fn starpu_perfmodel_update_history (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , cpuid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint , measured : f64) ; } extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } extern "C" { # [doc = "Print on \\p f the name of the files containing the matrix of bus bandwidths, the affinity devices and the latency."] pub fn starpu_bus_print_filenames (f : * mut FILE) ; } extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes"] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the latency of data transfer between two memory nodes"] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } extern "C" { # [doc = "Performance model which just always return 1µs."] pub static mut starpu_perfmodel_nop : starpu_perfmodel ; } # [doc = "Store a double-chained list of tasks"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_task_list { # [doc = "< head of the list"] pub head : * mut starpu_task , # [doc = "< tail of the list"] pub tail : * mut starpu_task , } # [test] fn bindgen_test_layout_starpu_task_list () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_task_list > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_task_list > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_task_list))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_task_list > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_task_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . head) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (head))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tail) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_task_list) , "::" , stringify ! (tail))) ; } impl Default for starpu_task_list { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize a list structure"] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } extern "C" { # [doc = "Push \\p task at the front of \\p list"] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Push \\p task at the back of \\p list"] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Get the front of \\p list (without removing it)"] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the back of \\p list (without removing it)"] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Test if \\p list is empty"] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Remove \\p task from \\p list"] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } extern "C" { # [doc = "Remove the element at the front of \\p list"] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Remove the element at the back of \\p list"] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the first task of \\p list."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the end of \\p list."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } extern "C" { # [doc = "Set the given \\p task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a task corresponding to \\p cl with the following arguments.\nThe argument list must be zero-terminated. The arguments\nfollowing the codelet are the same as the ones for the function\nstarpu_task_insert().\nIf some arguments of type ::STARPU_VALUE are given, the parameter\nstarpu_task::cl_arg_free will be set to 1."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } extern "C" { # [doc = "Create and submit a task corresponding to \\p cl with the following\ngiven arguments. The argument list must be zero-terminated.\n\nThe arguments following the codelet can be of the following types:\n<ul>\n<li> ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n<li> ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n<li> ::STARPU_DATA_MODE_ARRAY followed by an array of struct\nstarpu_data_descr, i.e data handles with their associated access\nmodes, and its number of elements;\n<li> ::STARPU_EXECUTE_ON_WORKER, ::STARPU_WORKER_ORDER followed by\nan integer value specifying the worker on which to execute the task\n(as specified by starpu_task::execute_on_a_specific_worker)\n<li> the specific values ::STARPU_VALUE, ::STARPU_CALLBACK,\n::STARPU_CALLBACK_ARG, ::STARPU_CALLBACK_WITH_ARG,\n::STARPU_PRIORITY, ::STARPU_TAG, ::STARPU_TAG_ONLY, ::STARPU_FLOPS,\n::STARPU_SCHED_CTX, ::STARPU_CL_ARGS, ::STARPU_CL_ARGS_NFREE,\n::STARPU_TASK_DEPS_ARRAY, ::STARPU_TASK_COLOR,\n::STARPU_HANDLES_SEQUENTIAL_CONSISTENCY, ::STARPU_TASK_SYNCHRONOUS,\n::STARPU_TASK_END_DEP followed by the appropriated objects as\ndefined elsewhere.\n</ul>\n\nWhen using ::STARPU_DATA_ARRAY, the access mode of the data handles\nis not defined, it will be taken from the codelet\nstarpu_codelet::modes or starpu_codelet::dyn_modes field. One\nshould use ::STARPU_DATA_MODE_ARRAY to define the data handles\nalong with the access modes.\n\nParameters to be passed to the codelet implementation are defined\nthrough the type ::STARPU_VALUE. The function\nstarpu_codelet_unpack_args() must be called within the codelet implementation to retrieve them."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Assuming that there are already \\p current_buffer data handles\npassed to the task, and if *allocated_buffers is not 0, the\n<c>task->dyn_handles</c> array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating <c>task->dyn_handles</c> as necessary and updating \\p\nallocated_buffers accordingly. One can thus start with\nallocated_buffers equal to 0 and current_buffer equal to 0, then\nmake room by calling this function, then store handles with\nSTARPU_TASK_SET_HANDLE(), make room again with this function, store\nyet more handles, etc."] pub fn starpu_task_insert_data_make_room (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : :: std :: os :: raw :: c_int , room : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Store data handle \\p handle into task \\p task with mode \\p\narg_type, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , arg_type : :: std :: os :: raw :: c_int , handle : starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly."] pub fn starpu_task_insert_data_process_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_handles : :: std :: os :: raw :: c_int , handles : * mut starpu_data_handle_t) ; } extern "C" { # [doc = "Store \\p nb_descrs data handles described by \\p descrs into task \\p\ntask, updating \\p *allocated_buffers and \\p *current_buffer\naccordingly."] pub fn starpu_task_insert_data_process_mode_array_arg (cl : * mut starpu_codelet , task : * mut starpu_task , allocated_buffers : * mut :: std :: os :: raw :: c_int , current_buffer : * mut :: std :: os :: raw :: c_int , nb_descrs : :: std :: os :: raw :: c_int , descrs : * mut starpu_data_descr) ; } extern "C" { # [doc = "Pack arguments of type ::STARPU_VALUE into a buffer which can be\ngiven to a codelet and later unpacked with the function\nstarpu_codelet_unpack_args().\n\nInstead of calling starpu_codelet_pack_args(), one can also call\nstarpu_codelet_pack_arg_init(), then starpu_codelet_pack_arg() for\neach data, then starpu_codelet_pack_arg_fini()."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_codelet_pack_arg_data () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_codelet_pack_arg_data > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_codelet_pack_arg_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arg_buffer_size) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (arg_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . current_offset) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (current_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nargs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_codelet_pack_arg_data) , "::" , stringify ! (nargs))) ; } impl Default for starpu_codelet_pack_arg_data { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize struct starpu_codelet_pack_arg before calling\nstarpu_codelet_pack_arg() and starpu_codelet_pack_arg_fini(). This\nwill simply initialize the content of the structure."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } extern "C" { # [doc = "Pack one argument into struct starpu_codelet_pack_arg \\p state.\nThat structure has to be initialized before with\nstarpu_codelet_pack_arg_init(), and after all\nstarpu_codelet_pack_arg() calls performed,\nstarpu_codelet_pack_arg_fini() has to be used to get the \\p cl_arg\nand \\p cl_arg_size to be put in the task."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times."] pub fn starpu_codelet_pack_arg_fini (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut * mut :: std :: os :: raw :: c_void , cl_arg_size : * mut usize) ; } extern "C" { # [doc = "Retrieve the arguments of type ::STARPU_VALUE associated to a\ntask automatically created using the function starpu_task_insert(). If\nany parameter's value is 0, unpacking will stop there and ignore the remaining\nparameters."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } extern "C" { # [doc = "Similar to starpu_codelet_unpack_args(), but if any parameter is 0,\ncopy the part of \\p cl_arg that has not been read in \\p buffer\nwhich can then be used in a later call to one of the unpack\nfunctions."] pub fn starpu_codelet_unpack_args_and_copyleft (cl_arg : * mut :: std :: os :: raw :: c_void , buffer : * mut :: std :: os :: raw :: c_void , buffer_size : usize , ...) ; } # [doc = "Contain all the methods that implement a scheduling policy. An\napplication may specify which scheduling strategy in the field\nstarpu_conf::sched_policy passed to the function starpu_init().\n\nFor each task going through the scheduler, the following methods\nget called in the given order:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here <b>given</b> the task</li>\n<li>starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here <b>gives</b> back the task to the core. It must not\naccess this task any more</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n<ul>\n<li>starpu_sched_policy::submit_hook when the task is\nsubmitted</li>\n<li>starpu_sched_policy::push_task_notify when the task becomes\nready. This is just a notification, the scheduler does not have to\ndo anything about the task.</li>\n<li>starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).</li>\n<li>starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.</li>\n</ul>"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_sched_policy { # [doc = "Initialize the scheduling policy, called before any other\nmethod."] pub init_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Cleanup the scheduling policy"] pub deinit_sched : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Insert a task into the scheduler, called when the task\nbecomes ready for execution. This must call\nstarpu_push_task_end() once it has effectively pushed the\ntask to a queue (to note the time when this was done in the\ntask), but before releasing mutexes (so that the task\nhasn't been already taken by a worker)."] pub push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> :: std :: os :: raw :: c_int > , pub simulate_push_task : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task) -> f64 > , # [doc = "Notify the scheduler that a task was pushed on a given\nworker. This method is called when a task that was\nexplicitly assigned to a worker becomes ready and is about\nto be executed by the worker. This method therefore permits\nto keep the state of the scheduler coherent even when\nStarPU bypasses the scheduling strategy."] pub push_task_notify : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_int , perf_workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Get a task from the scheduler.\nIf this method returns NULL, the worker will start\nsleeping. If later on some task are pushed for this worker,\nstarpu_wake_worker() must be called to wake the worker so\nit can call the pop_task() method again.\nThe mutex associated to the worker is already taken when\nthis method is called. This method may release it (e.g. for\nscalability reasons when doing work stealing), but it must\nacquire it again before taking the decision whether to\nreturn a task or NULL, so the atomicity of deciding to\nreturn NULL and making the worker actually sleep is\npreserved. Otherwise in simgrid or blocking driver mode the\nworker might start sleeping while a task has just been\npushed for it.\nIf this method is defined as <c>NULL</c>, the worker will\nonly execute tasks from its local queue. In this case, the\npush_task method should use the starpu_push_local_task\nmethod to assign tasks to the different workers."] pub pop_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Remove all available tasks from the scheduler (tasks are\nchained by the means of the field starpu_task::prev and\nstarpu_task::next). The mutex associated to the worker is\nalready taken when this method is called. This is currently\nnot used and can be discarded."] pub pop_every_task : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_task > , # [doc = "Optional field. This method is called when a task is\nsubmitted."] pub submit_hook : :: std :: option :: Option < unsafe extern "C" fn (task : * mut starpu_task) > , # [doc = "Optional field. This method is called every time a task is\nstarting."] pub pre_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called every time a task has\nbeen executed."] pub post_exec_hook : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. This method is called when it is a good\ntime to start scheduling tasks. This is notably called when\nthe application calls starpu_task_wait_for_all() or\nstarpu_do_schedule() explicitly."] pub do_schedule : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > , # [doc = "Initialize scheduling structures corresponding to each\nworker used by the policy."] pub add_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Deinitialize scheduling structures corresponding to each\nworker used by the policy."] pub remove_workers : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_uint) > , # [doc = "Optional field. Name of the policy."] pub policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Optional field. Human readable description of the policy."] pub policy_description : * const :: std :: os :: raw :: c_char , pub worker_type : starpu_worker_collection_type , } # [test] fn bindgen_test_layout_starpu_sched_policy () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_sched_policy > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_sched_policy > () , 128usize , concat ! ("Size of: " , stringify ! (starpu_sched_policy))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_sched_policy > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . init_sched) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (init_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . deinit_sched) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (deinit_sched))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . simulate_push_task) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (simulate_push_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_task_notify) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (push_task_notify))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_task) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_every_task) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pop_every_task))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_hook) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (submit_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pre_exec_hook) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (pre_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . post_exec_hook) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (post_exec_hook))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . do_schedule) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (do_schedule))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . add_workers) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (add_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . remove_workers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (remove_workers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_name) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . policy_description) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (policy_description))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_type) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (starpu_sched_policy) , "::" , stringify ! (worker_type))) ; } impl Default for starpu_sched_policy { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Return an <c>NULL</c>-terminated array of all the predefined\nscheduling policies."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } extern "C" { # [doc = "When there is no available task for a worker, StarPU blocks this\nworker on a condition variable. This function specifies which\ncondition variable (and the associated mutex) should be used to\nblock (and to wake up) a worker. Note that multiple workers may use\nthe same condition variable. For instance, in the case of a\nscheduling strategy with a single task queue, the same condition\nvariable would be used to block and wake up all workers."] pub fn starpu_worker_get_sched_condition (workerid : :: std :: os :: raw :: c_int , sched_mutex : * mut * mut starpu_pthread_mutex_t , sched_cond : * mut * mut starpu_pthread_cond_t) ; } extern "C" { pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy"] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy"] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the minimum task priority level supported by the scheduling\npolicy. The default minimum priority level is the same as the\ndefault priority level which is 0 by convention. The application\nmay access that value by calling the function\nstarpu_sched_get_min_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "TODO: check if this is correct\nDefine the maximum priority level supported by the scheduling\npolicy. The default maximum priority level is 1. The application\nmay access that value by calling the function\nstarpu_sched_get_max_priority(). This function should only be\ncalled from the initialization method of the scheduling policy, and\nshould not be used directly from the application."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute."] pub fn starpu_worker_can_execute_task (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return which implementation numbers can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute.\nThis should be preferred rather than calling\nstarpu_worker_can_execute_task() for each and every implementation.\nIt can also be used with <c>impl_mask == NULL</c> to check for at\nleast one implementation without determining which."] pub fn starpu_worker_can_execute_task_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , impl_mask : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check if the worker specified by workerid can execute the codelet\nand return the first implementation which can be used.\nSchedulers need to call it before assigning a task to a worker,\notherwise the task may fail to execute. This should be preferred\nrather than calling starpu_worker_can_execute_task() for\neach and every implementation. It can also be used with\n<c>impl_mask == NULL</c> to check for at least one implementation\nwithout determining which."] pub fn starpu_worker_can_execute_task_first_impl (workerid : :: std :: os :: raw :: c_uint , task : * mut starpu_task , nimpl : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "The scheduling policy may put tasks directly into a worker’s local\nqueue so that it is not always necessary to create its own queue\nwhen the local queue is sufficient. If \\p back is not 0, \\p task is\nput at the back of the queue where the worker will pop tasks first.\nSetting \\p back to 0 therefore ensures a FIFO ordering."] pub fn starpu_push_local_task (workerid : :: std :: os :: raw :: c_int , task : * mut starpu_task , back : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set"] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority"] pub fn starpu_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node"] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority"] pub fn starpu_idle_prefetch_task_input_on_node_prio (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle"] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority"] pub fn starpu_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker"] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority"] pub fn starpu_idle_prefetch_task_input_for_prio (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle"] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions."] pub fn starpu_task_footprint (model : * mut starpu_perfmodel , task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> u32 ; } extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions)."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } extern "C" { # [doc = "Return expected task duration in micro-seconds."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed"] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given \\p\nmemory_node. Prefer using starpu_task_expected_data_transfer_time_for() which is\nmore precise."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node"] pub fn starpu_data_expected_transfer_time (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint , mode : starpu_data_access_mode) -> f64 ; } extern "C" { # [doc = "Return expected energy consumption in J"] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only)"] pub fn starpu_task_expected_conversion_time (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } pub type starpu_notify_ready_soon_func = :: std :: option :: Option < unsafe extern "C" fn (data : * mut :: std :: os :: raw :: c_void , task : * mut starpu_task , delay : f64) > ; extern "C" { # [doc = "Register a callback to be called when it is determined when a task\nwill be ready an estimated amount of time from now, because its\nlast dependency has just started and we know how long it will take."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "The scheduling policies indicates if the worker may pop tasks from\nthe list of other workers or if there is a central list with task\nfor all the workers"] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_task_break (task : * mut starpu_task) ; } extern "C" { # [doc = "Wake up \\p workerid while temporarily entering the current worker\nrelax state if needed during the waiting process. Return 1 if \\p\nworkerid has been woken up or its state_keep_awake flag has been\nset to \\c 1, and \\c 0 otherwise (if \\p workerid was not in the\nSTATE_SLEEPING or in the STATE_SCHEDULING)."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Must be called to wake up a worker that is sleeping on the cond.\nReturn 0 whenever the worker is not in a sleeping state or has the\nstate_keep_awake flag on."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked"] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Light version of starpu_wake_worker_relax() which, when possible,\nspeculatively set keep_awake on the target worker without waiting\nfor the worker to enter the relax state."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a scheduling context with the given parameters\n(see below) and assign the workers in \\p workerids_ctx to execute the\ntasks submitted to it. The return value represents the identifier of\nthe context that has just been created. It will be further used to\nindicate the context the tasks will be submitted to. The return value\nshould be at most ::STARPU_NMAX_SCHED_CTXS.\n\nThe arguments following the name of the scheduling context can be of\nthe following types:\n<ul>\n<li> ::STARPU_SCHED_CTX_POLICY_NAME, followed by the name of a\npredefined scheduling policy. Use an empty string to create the\ncontext with the default scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n</li>\n<li> ::STARPU_SCHED_CTX_USER_DATA, followed by a pointer\nto a custom user data structure, to be retrieved by \\ref starpu_sched_ctx_get_user_data().\n</li>\n</ul>"] pub fn starpu_sched_ctx_create (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_int , sched_ctx_name : * const :: std :: os :: raw :: c_char , ...) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Create a context indicating an approximate interval of resources"] pub fn starpu_sched_ctx_create_inside_interval (policy_name : * const :: std :: os :: raw :: c_char , sched_ctx_name : * const :: std :: os :: raw :: c_char , min_ncpus : :: std :: os :: raw :: c_int , max_ncpus : :: std :: os :: raw :: c_int , min_ngpus : :: std :: os :: raw :: c_int , max_ngpus : :: std :: os :: raw :: c_int , allow_overlap : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Execute the callback whenever the last task of the context finished\nexecuting, it is called with the parameters \\p sched_ctx and any\nother parameter needed by the application (packed in \\p args)"] pub fn starpu_sched_ctx_register_close_callback (sched_ctx_id : :: std :: os :: raw :: c_uint , close_callback : :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint , args : * mut :: std :: os :: raw :: c_void) > , args : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Add dynamically the workers in \\p workerids_ctx to the context \\p\nsched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_add_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Remove the workers in \\p workerids_ctx from the context\n\\p sched_ctx_id. The last argument cannot be greater than\n::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_remove_workers (workerids_ctx : * mut :: std :: os :: raw :: c_int , nworkers_ctx : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Print on the file \\p f the worker names belonging to the context \\p\nsched_ctx_id"] pub fn starpu_sched_ctx_display_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , f : * mut FILE) ; } extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Indicate that the context \\p inheritor will inherit the resources\nof the context \\p sched_ctx_id when \\p sched_ctx_id will be\ndeleted."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto"] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the scheduling context the tasks are currently submitted to,\nor ::STARPU_NMAX_SCHED_CTXS if no default context has been defined\nby calling the function starpu_sched_ctx_set_context()."] pub fn starpu_sched_ctx_get_context () -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Stop submitting tasks from the empty context list until the next\ntime the context has time to check the empty context list"] pub fn starpu_sched_ctx_stop_task_submission () ; } extern "C" { # [doc = "Indicate starpu that the application finished submitting to this\ncontext in order to move the workers to the inheritor as soon as\npossible."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. The user should free the \\p\nworkerids table after finishing using it (it is allocated inside\nthe function with the proper size)"] pub fn starpu_sched_ctx_get_workers_list (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the list of workers in the array \\p workerids, the return\nvalue is the number of workers. This list is provided in raw order,\ni.e. not sorted by tree or list order, and the user should not free\nthe \\p workerids table. This function is thus much less costly than\nstarpu_sched_ctx_get_workers_list()."] pub fn starpu_sched_ctx_get_workers_list_raw (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut * mut :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers managed by the specified context\n(Usually needed to verify if it manages any workers or if it should\nbe blocked)"] pub fn starpu_sched_ctx_get_nworkers (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the number of workers shared by two contexts."] pub fn starpu_sched_ctx_get_nshared_workers (sched_ctx_id : :: std :: os :: raw :: c_uint , sched_ctx_id2 : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return 1 if the worker belongs to the context and 0 otherwise"] pub fn starpu_sched_ctx_contains_worker (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_contains_type_of_worker (arch : starpu_worker_archtype , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the workerid if the worker belongs to the context and -1 otherwise.\nIf the thread calling this function is not a worker the function returns -1\nas it calls the function starpu_worker_get_id()."] pub fn starpu_sched_ctx_worker_get_id (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Check if a worker is shared between several contexts"] pub fn starpu_sched_ctx_overlapping_ctxs_on_worker (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the user data pointer associated to the scheduling context."] pub fn starpu_sched_ctx_get_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_set_user_data (sched_ctx_id : :: std :: os :: raw :: c_uint , user_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context"] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } extern "C" { # [doc = "Execute any parallel code on the workers of the sched_ctx (workers\nare blocked)"] pub fn starpu_sched_ctx_exec_parallel_code (func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void > , param : * mut :: std :: os :: raw :: c_void , sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset (sched_ctx_id : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_increment_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_set_priority (workers : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint , priority : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_priority (worker : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_available_cpuids (sched_ctx_id : :: std :: os :: raw :: c_uint , cpuids : * mut * mut :: std :: os :: raw :: c_int , ncpuids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_book_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , workerids : * mut :: std :: os :: raw :: c_int , nworkers : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_unbook_workers_for_task (sched_ctx_id : :: std :: os :: raw :: c_uint , master : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the first context (child of sched_ctx_id) where the workerid\nis master"] pub fn starpu_sched_ctx_worker_is_master_for_child_ctx (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Return the context id of masterid if it master of a context. If\nnot, return ::STARPU_NMAX_SCHED_CTXS."] pub fn starpu_sched_ctx_master_get_context (masterid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } extern "C" { pub fn starpu_sched_ctx_move_task_to_ctx_locked (task : * mut starpu_task , sched_ctx : :: std :: os :: raw :: c_uint , with_repush : :: std :: os :: raw :: c_uint) ; } extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sched_policy_init (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } extern "C" { pub fn starpu_sched_ctx_has_starpu_scheduler (sched_ctx_id : :: std :: os :: raw :: c_uint , awake_workers : * mut :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_get_sms_interval (stream_workerid : :: std :: os :: raw :: c_int , start : * mut :: std :: os :: raw :: c_int , end : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current minimum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current maximum priority level supported by the\nscheduling policy of the given scheduler context."] pub fn starpu_sched_ctx_get_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the minimum task priority level supported by the scheduling\npolicy of the given scheduler context. The default minimum priority\nlevel is the same as the default priority level which is 0 by\nconvention. The application may access that value by calling the\nfunction starpu_sched_ctx_get_min_priority(). This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_min_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Define the maximum priority level supported by the scheduling\npolicy of the given scheduler context. The default maximum priority\nlevel is 1. The application may access that value by calling the\nstarpu_sched_ctx_get_max_priority() function. This function should\nonly be called from the initialization method of the scheduling\npolicy, and should not be used directly from the application."] pub fn starpu_sched_ctx_set_max_priority (sched_ctx_id : :: std :: os :: raw :: c_uint , max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Create a worker collection of the type indicated by the last\nparameter for the context specified through the first parameter."] pub fn starpu_sched_ctx_create_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint , type_ : starpu_worker_collection_type) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Delete the worker collection of the specified scheduling context"] pub fn starpu_sched_ctx_delete_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } extern "C" { # [doc = "Return the worker collection managed by the indicated context"] pub fn starpu_sched_ctx_get_worker_collection (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_worker_collection ; } extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } extern "C" { # [doc = "Register a progression hook, to be called when workers are idle."] pub fn starpu_progression_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_idle_hook_register (func : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_uint > , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; extern "C" { # [doc = "Initialize CUBLAS on every CUDA device. The\nCUBLAS library must be initialized prior to any CUBLAS call. Calling\nstarpu_cublas_init() will initialize CUBLAS on every CUDA device\ncontrolled by StarPU. This call blocks until CUBLAS has been properly\ninitialized on every device."] pub fn starpu_cublas_init () ; } extern "C" { # [doc = "Set the proper CUBLAS stream for CUBLAS v1. This must be called\nfrom the CUDA codelet before calling CUBLAS v1 kernels, so that\nthey are queued on the proper CUDA stream. When using one thread\nper CUDA worker, this function does not do anything since the\nCUBLAS stream does not change, and is set once by\nstarpu_cublas_init()."] pub fn starpu_cublas_set_stream () ; } extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device."] pub fn starpu_cublas_shutdown () ; } extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device."] pub fn starpu_cusparse_init () ; } extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device."] pub fn starpu_cusparse_shutdown () ; } extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)"] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Stop recording tasks"] pub fn starpu_bound_stop () ; } extern "C" { # [doc = "Emit the DAG that was recorded on \\p output."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } extern "C" { # [doc = "Get theoretical upper bound (in ms) (needs glpk support detected by\nconfigure script). It returns 0 if some performance models are not\ncalibrated."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format"] pub fn starpu_bound_print_lp (output : * mut FILE) ; } extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format"] pub fn starpu_bound_print_mps (output : * mut FILE) ; } extern "C" { # [doc = "Emit on \\p output the statistics of actual execution vs theoretical\nupper bound. \\p integer permits to choose between integer solving\n(which takes a long time but is correct), and relaxed solving\n(which provides an approximate solution)."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\n<em>current state</em>. The return value should be considered as the new\n<em>current state</em> for future CRC computation. This is used for computing\ndata size footprint."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc <em>current\nstate</em>. The return value should be considered as the new <em>current\nstate</em> for future CRC computation. This is used for computing data\nsize footprint."] pub fn starpu_hash_crc32c_string (str_ : * const :: std :: os :: raw :: c_char , inputcrc : u32) -> u32 ; } # [doc = "Information about the execution of a task. It is accessible from\nthe field starpu_task::profiling_info if profiling was enabled."] # [repr (C)] pub struct starpu_profiling_task_info { # [doc = " Date of task submission (relative to the initialization of StarPU)."] pub submit_time : timespec , # [doc = " Time when the task was submitted to the scheduler."] pub push_start_time : timespec , # [doc = " Time when the scheduler finished with the task submission."] pub push_end_time : timespec , # [doc = " Time when the scheduler started to be requested for a task, and eventually gave that task."] pub pop_start_time : timespec , # [doc = " Time when the scheduler finished providing the task for execution."] pub pop_end_time : timespec , # [doc = " Time when the worker started fetching input data."] pub acquire_data_start_time : timespec , # [doc = " Time when the worker finished fetching input data."] pub acquire_data_end_time : timespec , # [doc = " Date of task execution beginning (relative to the initialization of StarPU)."] pub start_time : timespec , # [doc = " Date of task execution termination (relative to the initialization of StarPU)."] pub end_time : timespec , # [doc = " Time when the worker started releasing data."] pub release_data_start_time : timespec , # [doc = " Time when the worker finished releasing data."] pub release_data_end_time : timespec , # [doc = " Time when the worker started the application callback for the task."] pub callback_start_time : timespec , # [doc = " Time when the worker finished the application callback for the task."] pub callback_end_time : timespec , # [doc = " Identifier of the worker which has executed the task."] pub workerid : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the task, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the task, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the task, in Joules"] pub energy_consumed : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_task_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_task_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_task_info > () , 240usize , concat ! ("Size of: " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_task_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_task_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . submit_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (submit_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_start_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . push_end_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (push_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_start_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pop_end_time) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (pop_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_start_time) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . acquire_data_end_time) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (acquire_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_time) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_start_time) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . release_data_end_time) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (release_data_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_start_time) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . callback_end_time) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (callback_end_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_task_info) , "::" , stringify ! (energy_consumed))) ; } impl Default for starpu_profiling_task_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_task_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_task_info {{ workerid: {:?}, energy_consumed: {:?} }}" , self . workerid , self . energy_consumed) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info()"] # [repr (C)] pub struct starpu_profiling_worker_info { # [doc = " Starting date for the reported profiling measurements."] pub start_time : timespec , # [doc = " Duration of the profiling measurement interval."] pub total_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval."] pub executing_time : timespec , # [doc = " Time spent idling by the worker during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Number of tasks executed by the worker during the profiling measurement interval."] pub executed_tasks : :: std :: os :: raw :: c_int , # [doc = " Number of cycles used by the worker, only available in the MoviSim"] pub used_cycles : u64 , # [doc = " Number of cycles stalled within the worker, only available in the MoviSim"] pub stall_cycles : u64 , # [doc = " Energy consumed by the worker, in Joules"] pub energy_consumed : f64 , pub flops : f64 , } # [test] fn bindgen_test_layout_starpu_profiling_worker_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_worker_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_worker_info > () , 104usize , concat ! ("Size of: " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_worker_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_worker_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executing_time) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executing_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sleeping_time) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (sleeping_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . executed_tasks) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (executed_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . used_cycles) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (used_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . stall_cycles) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (stall_cycles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . energy_consumed) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (energy_consumed))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flops) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_worker_info) , "::" , stringify ! (flops))) ; } impl Default for starpu_profiling_worker_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_worker_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_worker_info {{ executed_tasks: {:?}, energy_consumed: {:?}, flops: {:?} }}" , self . executed_tasks , self . energy_consumed , self . flops) } } # [repr (C)] pub struct starpu_profiling_bus_info { # [doc = " Time of bus profiling startup."] pub start_time : timespec , # [doc = " Total time of bus profiling."] pub total_time : timespec , # [doc = " Number of bytes transferred during profiling."] pub transferred_bytes : :: std :: os :: raw :: c_longlong , # [doc = " Number of transfers during profiling."] pub transfer_count : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_profiling_bus_info () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_profiling_bus_info > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_profiling_bus_info > () , 48usize , concat ! ("Size of: " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_profiling_bus_info > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_profiling_bus_info))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start_time) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (start_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . total_time) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (total_time))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transferred_bytes) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transferred_bytes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . transfer_count) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_profiling_bus_info) , "::" , stringify ! (transfer_count))) ; } impl Default for starpu_profiling_bus_info { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_profiling_bus_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_profiling_bus_info {{ transferred_bytes: {:?}, transfer_count: {:?} }}" , self . transferred_bytes , self . transfer_count) } } extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value."] pub fn starpu_profiling_init () ; } extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init()."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the profiling status. Profiling is activated\nby passing \\ref STARPU_PROFILING_ENABLE in \\p status. Passing\n\\ref STARPU_PROFILING_DISABLE disables profiling. Calling this function\nresets all profiling measurements. When profiling is enabled, the\nfield starpu_task::profiling_info points to a valid structure\nstarpu_profiling_task_info containing information about the execution\nof the task. Negative return values indicate an error, otherwise the\nprevious status is returned."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Get the profiling info associated to the worker identified by\n\\p workerid, and reset the profiling measurements. If the argument \\p\nworker_info is <c>NULL</c>, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned."] pub fn starpu_profiling_worker_get_info (workerid : :: std :: os :: raw :: c_int , worker_info : * mut starpu_profiling_worker_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of buses in the machine"] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst"] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the source point of bus \\p busid"] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the destination point of bus \\p busid"] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "See _starpu_profiling_bus_helper_display_summary in src/profiling/profiling_helpers.c for a usage example.\nNote that calling starpu_bus_get_profiling_info() resets the counters to zero."] pub fn starpu_bus_get_profiling_info (busid : :: std :: os :: raw :: c_int , bus_info : * mut starpu_profiling_bus_info) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds"] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } extern "C" { # [doc = "Display statistics about the bus on \\c stderr. if the environment\nvariable \\ref STARPU_BUS_STATS is defined. The function is called\nautomatically by starpu_shutdown()."] pub fn starpu_profiling_bus_helper_display_summary () ; } extern "C" { # [doc = "Display statistic about the workers on \\c stderr if the\nenvironment variable \\ref STARPU_WORKER_STATS is defined. The function is\ncalled automatically by starpu_shutdown()."] pub fn starpu_profiling_worker_helper_display_summary () ; } extern "C" { # [doc = "Display statistics about the current data handles registered\nwithin StarPU. StarPU must have been configured with the configure\noption \\ref enable-memory-stats \"--enable-memory-stats\" (see \\ref\nMemoryFeedback)."] pub fn starpu_data_display_memory_stats () ; } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 256usize] , pub workerid : :: std :: os :: raw :: c_int , pub perfmodel_archname : [:: std :: os :: raw :: c_char ; 256usize] , pub hash : u32 , pub size : usize , pub time : f32 , } # [test] fn bindgen_test_layout_starpu_fxt_codelet_event () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_codelet_event > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () , 536usize , concat ! ("Size of: " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_codelet_event))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . symbol) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (symbol))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workerid) as usize - ptr as usize } , 256usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (workerid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . perfmodel_archname) as usize - ptr as usize } , 260usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (perfmodel_archname))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . hash) as usize - ptr as usize } , 516usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (hash))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . size) as usize - ptr as usize } , 520usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . time) as usize - ptr as usize } , 528usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_codelet_event) , "::" , stringify ! (time))) ; } impl Default for starpu_fxt_codelet_event { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_fxt_options { pub per_task_colour : :: std :: os :: raw :: c_uint , pub no_events : :: std :: os :: raw :: c_uint , pub no_counter : :: std :: os :: raw :: c_uint , pub no_bus : :: std :: os :: raw :: c_uint , pub no_flops : :: std :: os :: raw :: c_uint , pub ninputfiles : :: std :: os :: raw :: c_uint , pub no_smooth : :: std :: os :: raw :: c_uint , pub no_acquire : :: std :: os :: raw :: c_uint , pub memory_states : :: std :: os :: raw :: c_uint , pub internal : :: std :: os :: raw :: c_uint , pub label_deps : :: std :: os :: raw :: c_uint , pub filenames : [* mut :: std :: os :: raw :: c_char ; 64usize] , pub out_paje_path : * mut :: std :: os :: raw :: c_char , pub distrib_time_path : * mut :: std :: os :: raw :: c_char , pub activity_path : * mut :: std :: os :: raw :: c_char , pub dag_path : * mut :: std :: os :: raw :: c_char , pub tasks_path : * mut :: std :: os :: raw :: c_char , pub data_path : * mut :: std :: os :: raw :: c_char , pub anim_path : * mut :: std :: os :: raw :: c_char , pub states_path : * mut :: std :: os :: raw :: c_char , pub dir : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_prefix : * mut :: std :: os :: raw :: c_char , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_offset : u64 , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), we may need to prefix the name of the containers."] pub file_rank : :: std :: os :: raw :: c_int , # [doc = "Output parameters"] pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 80usize] , # [doc = "Output parameters"] pub worker_archtypes : [starpu_perfmodel_arch ; 80usize] , # [doc = "Output parameters"] pub nworkers : :: std :: os :: raw :: c_int , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets : * mut * mut starpu_fxt_codelet_event , # [doc = "In case we want to dump the list of codelets to an external tool"] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [test] fn bindgen_test_layout_starpu_fxt_options () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_fxt_options > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_fxt_options > () , 22440usize , concat ! ("Size of: " , stringify ! (starpu_fxt_options))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_fxt_options > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_fxt_options))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . per_task_colour) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (per_task_colour))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_events) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_events))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_counter) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_counter))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_bus) as usize - ptr as usize } , 12usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_bus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_flops) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_flops))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ninputfiles) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (ninputfiles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_smooth) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_smooth))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . no_acquire) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (no_acquire))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . memory_states) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (memory_states))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (internal))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_deps) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (label_deps))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filenames) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (filenames))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . out_paje_path) as usize - ptr as usize } , 560usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (out_paje_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . distrib_time_path) as usize - ptr as usize } , 568usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (distrib_time_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . activity_path) as usize - ptr as usize } , 576usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (activity_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dag_path) as usize - ptr as usize } , 584usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dag_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . tasks_path) as usize - ptr as usize } , 592usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (tasks_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . data_path) as usize - ptr as usize } , 600usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (data_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . anim_path) as usize - ptr as usize } , 608usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (anim_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . states_path) as usize - ptr as usize } , 616usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (states_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dir) as usize - ptr as usize } , 624usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dir))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_prefix) as usize - ptr as usize } , 632usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_prefix))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_offset) as usize - ptr as usize } , 640usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . file_rank) as usize - ptr as usize } , 648usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (file_rank))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_names) as usize - ptr as usize } , 652usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_names))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . worker_archtypes) as usize - ptr as usize } , 21136usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (worker_archtypes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nworkers) as usize - ptr as usize } , 22416usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (nworkers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets) as usize - ptr as usize } , 22424usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . dumped_codelets_count) as usize - ptr as usize } , 22432usize , concat ! ("Offset of field: " , stringify ! (starpu_fxt_options) , "::" , stringify ! (dumped_codelets_count))) ; } impl Default for starpu_fxt_options { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_options_set_dir (options : * mut starpu_fxt_options) ; } extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } extern "C" { # [doc = "Determine whether profiling should be started by starpu_init(), or only when\nstarpu_fxt_start_profiling() is called. \\p autostart should be 1 to do so, or 0 to\nprevent it."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Start recording the trace. The trace is by default started from\nstarpu_init() call, but can be paused by using\nstarpu_fxt_stop_profiling(), in which case\nstarpu_fxt_start_profiling() should be called to resume recording\nevents."] pub fn starpu_fxt_start_profiling () ; } extern "C" { # [doc = "Stop recording the trace. The trace is by default stopped when calling\nstarpu_shutdown(). starpu_fxt_stop_profiling() can however be used to\nstop it earlier. starpu_fxt_start_profiling() can then be called to\nstart recording it again, etc."] pub fn starpu_fxt_stop_profiling () ; } extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } # [doc = "structure for a driver"] # [repr (C)] pub struct starpu_driver { # [doc = "Type of the driver. Only ::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER\nand ::STARPU_OPENCL_WORKER are currently supported."] pub type_ : starpu_worker_archtype , pub id : starpu_driver__bindgen_ty_1 , } # [doc = "Identifier of the driver."] # [repr (C)] pub struct starpu_driver__bindgen_ty_1 { pub cpu_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub cuda_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [test] fn bindgen_test_layout_starpu_driver__bindgen_ty_1 () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver__bindgen_ty_1 > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver__bindgen_ty_1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cpu_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cpu_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (cuda_id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . opencl_id) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver__bindgen_ty_1) , "::" , stringify ! (opencl_id))) ; } impl Default for starpu_driver__bindgen_ty_1 { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver__bindgen_ty_1 { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver__bindgen_ty_1 {{ union }}") } } # [test] fn bindgen_test_layout_starpu_driver () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_driver > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_driver > () , 16usize , concat ! ("Size of: " , stringify ! (starpu_driver))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_driver > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_driver))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . type_) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (type_))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_driver) , "::" , stringify ! (id))) ; } impl Default for starpu_driver { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } impl :: std :: fmt :: Debug for starpu_driver { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_driver {{ type: {:?}, id: {:?} }}" , self . type_ , self . id) } } extern "C" { # [doc = "Initialize the given driver, run it until it receives a request to\nterminate, deinitialize it and return 0 on success. Return\n<c>-EINVAL</c> if starpu_driver::type is not a valid StarPU device type\n(::STARPU_CPU_WORKER, ::STARPU_CUDA_WORKER or ::STARPU_OPENCL_WORKER).\n\nThis is the same as using the following functions: calling\nstarpu_driver_init(), then calling starpu_driver_run_once() in a loop,\nand finally starpu_driver_deinit()."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Notify all running drivers that they should terminate."] pub fn starpu_drivers_request_termination () ; } extern "C" { # [doc = "Initialize the given driver. Return 0 on success, <c>-EINVAL</c>\nif starpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Run the driver once, then return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, <c>-EINVAL</c> if\nstarpu_driver::type is not a valid ::starpu_worker_archtype."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "@defgroup API_Tree Tree\n@brief This section describes the tree facilities provided by StarPU.\n@{"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_tree { pub nodes : * mut starpu_tree , pub father : * mut starpu_tree , pub arity : :: std :: os :: raw :: c_int , pub id : :: std :: os :: raw :: c_int , pub level : :: std :: os :: raw :: c_int , pub is_pu : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_tree () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_tree > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_tree > () , 32usize , concat ! ("Size of: " , stringify ! (starpu_tree))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_tree > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_tree))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nodes) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (nodes))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . father) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (father))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . arity) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (arity))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . id) as usize - ptr as usize } , 20usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (id))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . level) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (level))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_pu) as usize - ptr as usize } , 28usize , concat ! ("Offset of field: " , stringify ! (starpu_tree) , "::" , stringify ! (is_pu))) ; } impl Default for starpu_tree { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_insert (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int , level : :: std :: os :: raw :: c_int , is_pu : :: std :: os :: raw :: c_int , arity : :: std :: os :: raw :: c_int , father : * mut starpu_tree) ; } extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_get_neighbour (tree : * mut starpu_tree , node : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char , present : * mut :: std :: os :: raw :: c_char) -> * mut starpu_tree ; } extern "C" { pub fn starpu_tree_free (tree : * mut starpu_tree) ; } # [doc = "Opaque Simple Lock object (\\anchor SimpleLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_lock()\n\\sa starpu_omp_destroy_lock()\n\\sa starpu_omp_set_lock()\n\\sa starpu_omp_unset_lock()\n\\sa starpu_omp_test_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Opaque Nestable Lock object (\\anchor NestableLock) for inter-task\nsynchronization operations.\n\\sa starpu_omp_init_nest_lock()\n\\sa starpu_omp_destroy_nest_lock()\n\\sa starpu_omp_set_nest_lock()\n\\sa starpu_omp_unset_nest_lock()\n\\sa starpu_omp_test_nest_lock()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout_starpu_omp_nest_lock_t () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_nest_lock_t > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Size of: " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_nest_lock_t))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . internal) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_nest_lock_t) , "::" , stringify ! (internal))) ; } impl Default for starpu_omp_nest_lock_t { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "< Undefined iteration scheduling algorithm."] pub const starpu_omp_sched_undefined : starpu_omp_sched_value = 0 ; # [doc = "< \\b Static iteration scheduling algorithm."] pub const starpu_omp_sched_static : starpu_omp_sched_value = 1 ; # [doc = "< \\b Dynamic iteration scheduling algorithm."] pub const starpu_omp_sched_dynamic : starpu_omp_sched_value = 2 ; # [doc = "< \\b Guided iteration scheduling algorithm."] pub const starpu_omp_sched_guided : starpu_omp_sched_value = 3 ; # [doc = "< \\b Automatically choosen iteration scheduling algorithm."] pub const starpu_omp_sched_auto : starpu_omp_sched_value = 4 ; # [doc = "< Choice of iteration scheduling algorithm deferred at \\b runtime."] pub const starpu_omp_sched_runtime : starpu_omp_sched_value = 5 ; # [doc = "Set of constants for selecting the for loop iteration scheduling\nalgorithm (\\anchor OMPFor) as defined by the OpenMP specification.\n\\sa starpu_omp_for()\n\\sa starpu_omp_for_inline_first()\n\\sa starpu_omp_for_inline_next()\n\\sa starpu_omp_for_alt()\n\\sa starpu_omp_for_inline_first_alt()\n\\sa starpu_omp_for_inline_next_alt()"] pub type starpu_omp_sched_value = :: std :: os :: raw :: c_uint ; # [doc = "< Undefined processor binding method."] pub const starpu_omp_proc_bind_undefined : starpu_omp_proc_bind_value = - 1 ; # [doc = "< Team threads may be moved between places at any time."] pub const starpu_omp_proc_bind_false : starpu_omp_proc_bind_value = 0 ; # [doc = "< Team threads may not be moved between places."] pub const starpu_omp_proc_bind_true : starpu_omp_proc_bind_value = 1 ; # [doc = "< Assign every thread in the team to the same place as the \\b master thread."] pub const starpu_omp_proc_bind_master : starpu_omp_proc_bind_value = 2 ; # [doc = "< Assign every thread in the team to a place \\b close to the parent thread."] pub const starpu_omp_proc_bind_close : starpu_omp_proc_bind_value = 3 ; # [doc = "< Assign team threads as a sparse distribution over the selected places."] pub const starpu_omp_proc_bind_spread : starpu_omp_proc_bind_value = 4 ; # [doc = "Set of constants for selecting the processor binding method, as\ndefined in the OpenMP specification.\n\\sa starpu_omp_get_proc_bind()"] pub type starpu_omp_proc_bind_value = :: std :: os :: raw :: c_int ; # [doc = "Set of attributes used for creating a new parallel region.\n\\sa starpu_omp_parallel_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_parallel_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for the\nparallel region implicit tasks. The codelet must provide a\nCPU implementation function."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the parallel region implicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp parallel</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Integer indicating the requested number of threads in the\nteam of the newly created parallel region, or 0 to let the\nruntime choose the number of threads alone. This attribute\nmay be ignored by the runtime system if the requested\nnumber of threads is higher than the number of threads that\nthe runtime can create."] pub num_threads : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_starpu_omp_parallel_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_parallel_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () , 1080usize , concat ! ("Size of: " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_parallel_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_threads) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_parallel_region_attr) , "::" , stringify ! (num_threads))) ; } impl Default for starpu_omp_parallel_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "Set of attributes used for creating a new task region.\n\\sa starpu_omp_task_region()"] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_omp_task_region_attr { # [doc = "::starpu_codelet (\\ref API_Codelet_And_Tasks) to use for\nthe task region explicit task. The codelet must provide a\nCPU implementation function or an accelerator\nimplementation for offloaded target regions."] pub cl : starpu_codelet , # [doc = "Array of zero or more ::starpu_data_handle_t data handle to\nbe passed to the task region explicit tasks."] pub handles : * mut starpu_data_handle_t , # [doc = "Optional pointer to an inline argument to be passed to the\nregion implicit tasks."] pub cl_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Size of the optional inline argument to be passed to the\nregion implicit tasks, or 0 if unused."] pub cl_arg_size : usize , # [doc = "Boolean indicating whether the optional inline argument\nshould be automatically freed (true), or not (false)."] pub cl_arg_free : :: std :: os :: raw :: c_uint , pub priority : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b if clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding <c>pragma omp task</c> is true or false."] pub mergeable_clause : :: std :: os :: raw :: c_int , # [doc = "taskloop attribute"] pub is_loop : :: std :: os :: raw :: c_int , pub nogroup_clause : :: std :: os :: raw :: c_int , pub collapse : :: std :: os :: raw :: c_int , pub num_tasks : :: std :: os :: raw :: c_int , pub nb_iterations : :: std :: os :: raw :: c_ulonglong , pub grainsize : :: std :: os :: raw :: c_ulonglong , pub begin_i : :: std :: os :: raw :: c_ulonglong , pub end_i : :: std :: os :: raw :: c_ulonglong , pub chunk : :: std :: os :: raw :: c_ulonglong , } # [test] fn bindgen_test_layout_starpu_omp_task_region_attr () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_omp_task_region_attr > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () , 1144usize , concat ! ("Size of: " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_omp_task_region_attr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . handles) as usize - ptr as usize } , 1040usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (handles))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg) as usize - ptr as usize } , 1048usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_size) as usize - ptr as usize } , 1056usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cl_arg_free) as usize - ptr as usize } , 1064usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (cl_arg_free))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . priority) as usize - ptr as usize } , 1068usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . if_clause) as usize - ptr as usize } , 1072usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (if_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . final_clause) as usize - ptr as usize } , 1076usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (final_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . untied_clause) as usize - ptr as usize } , 1080usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (untied_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mergeable_clause) as usize - ptr as usize } , 1084usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (mergeable_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_loop) as usize - ptr as usize } , 1088usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (is_loop))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nogroup_clause) as usize - ptr as usize } , 1092usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nogroup_clause))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . collapse) as usize - ptr as usize } , 1096usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (collapse))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . num_tasks) as usize - ptr as usize } , 1100usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (num_tasks))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nb_iterations) as usize - ptr as usize } , 1104usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (nb_iterations))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . grainsize) as usize - ptr as usize } , 1112usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (grainsize))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . begin_i) as usize - ptr as usize } , 1120usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (begin_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . end_i) as usize - ptr as usize } , 1128usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (end_i))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . chunk) as usize - ptr as usize } , 1136usize , concat ! ("Offset of field: " , stringify ! (starpu_omp_task_region_attr) , "::" , stringify ! (chunk))) ; } impl Default for starpu_omp_task_region_attr { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support."] pub fn starpu_omp_shutdown () ; } extern "C" { # [doc = "Generate and launch an OpenMP parallel region and return after its\ncompletion. \\p attr specifies the attributes for the generated parallel region.\nIf this function is called from inside another, generating, parallel region, the\ngenerated parallel region is nested within the generating parallel region.\n\nThis function can be used to implement <c>\\#pragma omp parallel</c>."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } extern "C" { # [doc = "Execute a function only on the master thread of the OpenMP\nparallel region it is called from. When called from a thread that is not the\nmaster of the parallel region it is called from, this function does nothing. \\p\nf is the function to be called. \\p arg is an argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp master</c>."] pub fn starpu_omp_master (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Determine whether the calling thread is the master of the OpenMP parallel region\nit is called from or not.\n\nThis function can be used to implement <c>\\#pragma omp master</c> without code\noutlining.\n\\return <c>!0</c> if called by the region's master thread.\n\\return <c>0</c> if not called by the region's master thread."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait until each participating thread of the innermost OpenMP parallel region\nhas reached the barrier and each explicit OpenMP task bound to this region has\ncompleted its execution.\n\nThis function can be used to implement <c>\\#pragma omp barrier</c>."] pub fn starpu_omp_barrier () ; } extern "C" { # [doc = "Wait until no other thread is executing within the context of the selected\ncritical section, then proceeds to the exclusive execution of a function within\nthe critical section. \\p f is the function to be executed in the critical\nsection. \\p arg is an argument passed to function \\p f. \\p name is the name of\nthe selected critical section. If <c>name == NULL</c>, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement <c>\\#pragma omp\ncritical</c>."] pub fn starpu_omp_critical (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Wait until execution can proceed exclusively within the context of the\nselected critical section. \\p name is the name of the selected critical\nsection. If <c>name == NULL</c>, the selected critical section is the unique\nanonymous critical section.\n\nThis function together with #starpu_omp_critical_inline_end can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "End the exclusive execution within the context of the selected critical\nsection. \\p name is the name of the selected critical section. If\n<c>name==NULL</c>, the selected critical section is the unique anonymous\ncritical section.\n\nThis function together with #starpu_omp_critical_inline_begin can be used to\nimplement <c>\\#pragma omp critical</c> without code outlining."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } extern "C" { # [doc = "Ensure that a single participating thread of the innermost OpenMP parallel\nregion executes a function. \\p f is the function to be executed by a single\nthread. \\p arg is an argument passed to function \\p f. \\p nowait is a flag\nindicating whether an implicit barrier is requested after the single section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp single</c>."] pub fn starpu_omp_single (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread is elected to run the following single\nsection among the participating threads of the innermost OpenMP parallel\nregion.\n\nThis function can be used to implement <c>\\#pragma omp single</c> without code\noutlining.\n\\return <c>!0</c> if the calling thread has won the election.\n\\return <c>0</c> if the calling thread has lost the election."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Execute \\p f on a single task of the current parallel region\ntask, and then broadcast the contents of the memory block pointed by the\ncopyprivate pointer \\p data and of size \\p data_size to the corresponding \\p\ndata pointed memory blocks of all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) > , arg : * mut :: std :: os :: raw :: c_void , data : * mut :: std :: os :: raw :: c_void , data_size : :: std :: os :: raw :: c_ulonglong) ; } extern "C" { # [doc = "Elect one task among the tasks of the current parallel region\ntask to execute the following single section, and then broadcast the\ncopyprivate pointer \\p data to all the other participating region tasks. This\nfunction can be used to implement <c>\\#pragma omp single</c> with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end"] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and <c>NULL</c> for\nthe task that won the election. This function can be used to implement\n<c>\\#pragma omp single</c> with a copyprivate clause without code outlining.\n\n\\return the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\n\\return <c>NULL</c> for the task that won the election and executed the code of the single section.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_begin"] pub fn starpu_omp_single_copyprivate_inline_end () ; } extern "C" { # [doc = "Execute a parallel loop together with the other threads participating to the\ninnermost parallel region. \\p f is the function to be executed iteratively. \\p\narg is an argument passed to function \\p f. \\p nb_iterations is the number of\niterations to be performed by the parallel loop. \\p chunk is the number of\nconsecutive iterations that should be affected to the same thread when\nscheduling the loop workshares, it follows the semantics of the \\c modifier\nargument in OpenMP <c>\\#pragma omp for</c> specification. \\p schedule is the\nscheduling mode according to the OpenMP specification. \\p ordered is a flag\nindicating whether the loop region may contain an ordered section\n(<c>ordered==!0</c>) or not (<c>ordered==0</c>). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThe function \\p f will be called with arguments \\p _first_i, the first iteration\nto perform, \\p _nb_i, the number of consecutive iterations to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>."] pub fn starpu_omp_for (f : :: std :: option :: Option < unsafe extern "C" fn (_first_i : :: std :: os :: raw :: c_ulonglong , _nb_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Decide whether the current thread should start to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_next can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread participates to the loop region and\nshould execute a first chunk of iterations. In that case, \\p *_first_i will be\nset to the first iteration of the chunk to perform and \\p *_nb_i will be set to\nthe number of iterations of the chunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate to the loop region\nbecause all the available iterations have been affected to the other threads of\nthe parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_first (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Decide whether the current thread should continue to execute a parallel loop\nsection. See #starpu_omp_for for the argument description.\n\nThis function together with #starpu_omp_for_inline_first can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\return <c>!0</c> if the calling thread should execute a next chunk of\niterations. In that case, \\p *_first_i will be set to the first iteration of the\nchunk to perform and \\p *_nb_i will be set to the number of iterations of the\nchunk to perform.\n\n\\return <c>0</c> if the calling thread does not participate anymore to the loop\nregion because all the available iterations have been affected to the other\nthreads of the parallel region.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_inline_next (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _first_i : * mut :: std :: os :: raw :: c_ulonglong , _nb_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Alternative implementation of a parallel loop. Differ from\n#starpu_omp_for in the expected arguments of the loop function \\c f.\n\nThe function \\p f will be called with arguments \\p _begin_i, the first iteration\nto perform, \\p _end_i, the first iteration not to perform before\nreturning, \\p arg, the free \\p arg argument.\n\nThis function can be used to implement <c>\\#pragma omp for</c>.\n\n\\sa starpu_omp_for"] pub fn starpu_omp_for_alt (f : :: std :: option :: Option < unsafe extern "C" fn (_begin_i : :: std :: os :: raw :: c_ulonglong , _end_i : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void , nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_next_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first"] pub fn starpu_omp_for_inline_first_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Inline version of the alternative implementation of a parallel loop.\n\nThis function together with #starpu_omp_for_inline_first_alt can be used to\nimplement <c>\\#pragma omp for</c> without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next"] pub fn starpu_omp_for_inline_next_alt (nb_iterations : :: std :: os :: raw :: c_ulonglong , chunk : :: std :: os :: raw :: c_ulonglong , schedule : :: std :: os :: raw :: c_int , ordered : :: std :: os :: raw :: c_int , _begin_i : * mut :: std :: os :: raw :: c_ulonglong , _end_i : * mut :: std :: os :: raw :: c_ulonglong) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Ensure that a function is sequentially executed once for each iteration in\norder within a parallel loop, by the thread that own the iteration. \\p f is the\nfunction to be executed by the thread that own the current iteration. \\p arg is\nan argument passed to function \\p f.\n\nThis function can be used to implement <c>\\#pragma omp ordered</c>."] pub fn starpu_omp_ordered (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Wait until all the iterations of a parallel loop below the iteration owned by\nthe current thread have been executed.\n\nThis function together with #starpu_omp_ordered_inline_end can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_begin () ; } extern "C" { # [doc = "Notify that the ordered section for the current iteration has been completed.\n\nThis function together with #starpu_omp_ordered_inline_begin can be used to\nimplement <c>\\#pragma omp ordered</c> without code code outlining."] pub fn starpu_omp_ordered_inline_end () ; } extern "C" { # [doc = "Ensure that each function of a given array of functions is executed by one and\nonly one thread. \\p nb_sections is the number of functions in the array \\p\nsection_f. \\p section_f is the array of functions to be executed as sections. \\p\nsection_arg is an array of arguments to be passed to the corresponding function.\n\\p nowait is a flag indicating whether an implicit barrier is requested after\nthe execution of all the sections (<c>nowait==0</c>) or not (<c>nowait==!0</c>).\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>."] pub fn starpu_omp_sections (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : * mut :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Alternative implementation of sections. Differ from\n#starpu_omp_sections in that all the sections are combined within a single\nfunction in this version. \\p section_f is the function implementing the combined\nsections.\n\nThe function \\p section_f will be called with arguments \\p section_num, the\nsection number to be executed, \\p arg, the entry of \\p section_arg corresponding\nto this section.\n\nThis function can be used to implement <c>\\#pragma omp sections</c> and <c>\\#pragma omp section</c>.\n\n\\sa starpu_omp_sections"] pub fn starpu_omp_sections_combined (nb_sections : :: std :: os :: raw :: c_ulonglong , section_f : :: std :: option :: Option < unsafe extern "C" fn (section_num : :: std :: os :: raw :: c_ulonglong , arg : * mut :: std :: os :: raw :: c_void) > , section_arg : * mut :: std :: os :: raw :: c_void , nowait : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Generate an explicit child task. The execution of the generated task is\nasynchronous with respect to the calling code unless specified otherwise.\n\\p attr specifies the attributes for the generated task region.\n\nThis function can be used to implement <c>\\#pragma omp task</c>."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Wait for the completion of the tasks generated by the current task. This\nfunction does not wait for the descendants of the tasks generated by the current\ntask.\n\nThis function can be used to implement <c>\\#pragma omp taskwait</c>."] pub fn starpu_omp_taskwait () ; } extern "C" { # [doc = "Launch a function and wait for the completion of every descendant task\ngenerated during the execution of the function.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c>.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup (f : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void) > , arg : * mut :: std :: os :: raw :: c_void) ; } extern "C" { # [doc = "Launch a function and gets ready to wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end"] pub fn starpu_omp_taskgroup_inline_begin () ; } extern "C" { # [doc = "Wait for the completion of every descendant task\ngenerated during the dynamic scope of the taskgroup.\n\nThis function can be used to implement <c>\\#pragma omp taskgroup</c> without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin"] pub fn starpu_omp_taskgroup_inline_end () ; } extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } extern "C" { # [doc = "Set ICVS nthreads_var for the parallel regions to be created\nwith the current region.\n\nNote: The StarPU OpenMP runtime support currently ignores\nthis setting for nested parallel regions.\n\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of threads of the current region.\n\n\\return the number of threads of the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the rank of the current thread among the threads\nof the current region.\n\n\\return the rank of the current thread in the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_max_threads\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum number of threads that can be used to\ncreate a region from the current region.\n\n\\return the maximum number of threads that can be used to create a region from the current region.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_num_procs"] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\n\\sa starpu_omp_set_num_threads\n\\sa starpu_omp_get_num_threads\n\\sa starpu_omp_get_thread_num\n\\sa starpu_omp_get_max_threads"] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return <c>!0</c> if called from a parallel region scope.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) dynamically adjusting the number of parallel threads.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_dynamic"] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return <c>!0</c> if dynamic thread number adjustment is enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_dynamic"] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Enable (1) or disable (0) nested parallel regions.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return <c>!0</c> if nested parallel sections are enabled.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the state of the cancel ICVS var."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the default scheduling kind for upcoming loops within the\ncurrent parallel section. \\p kind is the scheduler kind, \\p modifier\ncomplements the scheduler kind with informations such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule"] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current selected default loop scheduler.\n\n\\return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule"] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Set the maximum number of allowed active parallel section levels.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function and assume \\p max_levels equals <c>1</c> instead.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the current maximum number of allowed active parallel section levels\n\n\\return the current maximum number of allowed active parallel section levels.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nesting level of the current parallel section.\n\n\\return the nesting level of the current parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_active_level"] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the ancestor of the current parallel section.\n\n\\return the number of the ancestor of the current parallel section."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the size of the team of the current parallel section.\n\n\\return the size of the team of the current parallel section."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the nestinglevel of the current innermost active parallel section.\n\n\\return the nestinglevel of the current innermost active parallel section.\n\n\\sa starpu_omp_set_nested\n\\sa starpu_omp_get_nested\n\\sa starpu_omp_get_max_active_levels\n\\sa starpu_omp_set_max_active_levels\n\\sa starpu_omp_get_level"] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return <c>!0</c> if called from a final task.\n\\return <c>0</c> otherwise."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the proc_bind setting of the current parallel region.\n\n\\return the proc_bind setting of the current parallel region."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } extern "C" { pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } extern "C" { pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Set the number of the device to use as default.\n\nNote: The StarPU OpenMP runtime support currently ignores the argument of this function.\n\n\\sa starpu_omp_get_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = "Return the number of the device used as default.\n\n\\return the number of the device used as default.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_is_initial_device"] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the number of teams in the current teams region.\n\n\\return the number of teams in the current teams region.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the team number of the calling thread.\n\n\\return the team number of the calling thread.\n\n\\sa starpu_omp_get_num_teams"] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Check whether the current device is the initial device or not."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return <c>!0</c> if called from the host device.\n\\return <c>0</c> otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device"] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object.\n\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object. If the lock is already locked, the\nfunction will block until it succeeds in exclusively acquiring the lock.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_unset_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_test_lock"] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_lock\n\\sa starpu_omp_destroy_lock\n\\sa starpu_omp_set_lock\n\\sa starpu_omp_unset_lock"] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Initialize an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Destroy an opaque lock object supporting nested locking operations.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Lock an opaque lock object supporting nested locking operations.\nIf the lock is already locked by another task, the function will block until\nit succeeds in exclusively acquiring the lock. If the lock is already taken by\nthe current task, the function will increase the nested locking level of the\nlock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_unset_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unlock a previously locked lock object supporting nested locking\noperations. If the lock has been locked multiple times in nested fashion, the\nnested locking level is decreased and the lock remains locked. Otherwise, if\nthe lock has only been locked once, it becomes unlocked. The behaviour of this\nfunction is unspecified if it is called on an unlocked lock object. The\nbehaviour of this function is unspecified if it is called from a different task\nthan the one that locked the lock object.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_test_nest_lock"] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } extern "C" { # [doc = "Unblocking attempt to lock an opaque lock object supporting\nnested locking operations and returns whether it succeeded or not. If the lock\nis already locked by another task, the function will return without having\nacquired the lock. If the lock is already taken by the current task, the\nfunction will increase the nested locking level of the lock object.\n\n\\return <c>!0</c> if the function succeeded in acquiring the lock.\n\\return <c>0</c> if the lock was already locked.\n\n\\sa starpu_omp_init_nest_lock\n\\sa starpu_omp_destroy_nest_lock\n\\sa starpu_omp_set_nest_lock\n\\sa starpu_omp_unset_nest_lock"] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Implement the entry point of a fallback global atomic region.\nBlock until it succeeds in acquiring exclusive access to the global atomic\nregion.\n\n\\sa starpu_omp_atomic_fallback_inline_end"] pub fn starpu_omp_atomic_fallback_inline_begin () ; } extern "C" { # [doc = "Implement the exit point of a fallback global atomic region.\nRelease the exclusive access to the global atomic region.\n\n\\sa starpu_omp_atomic_fallback_inline_begin"] pub fn starpu_omp_atomic_fallback_inline_end () ; } extern "C" { # [doc = "Return the elapsed wallclock time in seconds.\n\n\\return the elapsed wallclock time in seconds.\n\n\\sa starpu_omp_get_wtick"] pub fn starpu_omp_get_wtime () -> f64 ; } extern "C" { # [doc = "Return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\return the precision of the time used by \\p starpu_omp_get_wtime().\n\n\\sa starpu_omp_get_wtime"] pub fn starpu_omp_get_wtick () -> f64 ; } extern "C" { # [doc = "Enable setting additional vector metadata needed by the OpenMP Runtime Support.\n\n\\p handle is vector data handle.\n\\p slice_base is the base of an array slice, expressed in number of vector elements from the array base.\n\n\\sa STARPU_VECTOR_GET_SLICE_BASE"] pub fn starpu_omp_vector_annotate (handle : starpu_data_handle_t , slice_base : u32) ; } extern "C" { pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_bitmap { _unused : [u8 ; 0] , } extern "C" { # [doc = " create a empty starpu_bitmap"] pub fn starpu_bitmap_create () -> * mut starpu_bitmap ; } extern "C" { # [doc = " free \\p b"] pub fn starpu_bitmap_destroy (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " set bit \\p e in \\p b"] pub fn starpu_bitmap_set (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset bit \\p e in \\p b"] pub fn starpu_bitmap_unset (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) ; } extern "C" { # [doc = " unset all bits in \\p b"] pub fn starpu_bitmap_unset_all (b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return true iff bit \\p e is set in \\p b"] pub fn starpu_bitmap_get (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " Basically compute \\c starpu_bitmap_unset_all(\\p a) ; \\p a = \\p b & \\p c;"] pub fn starpu_bitmap_unset_and (a : * mut starpu_bitmap , b : * mut starpu_bitmap , c : * mut starpu_bitmap) ; } extern "C" { # [doc = " Basically compute \\p a |= \\p b"] pub fn starpu_bitmap_or (a : * mut starpu_bitmap , b : * mut starpu_bitmap) ; } extern "C" { # [doc = " return 1 iff \\p e is set in \\p b1 AND \\p e is set in \\p b2"] pub fn starpu_bitmap_and_get (b1 : * mut starpu_bitmap , b2 : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the number of set bits in \\p b"] pub fn starpu_bitmap_cardinal (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the index of the first set bit of \\p b, -1 if none"] pub fn starpu_bitmap_first (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of the last set bit of \\p b, -1 if none"] pub fn starpu_bitmap_last (b : * mut starpu_bitmap) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " return the position of set bit right after \\p e in \\p b, -1 if none"] pub fn starpu_bitmap_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = " todo"] pub fn starpu_bitmap_has_next (b : * mut starpu_bitmap , e : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } # [doc = "Structure passed to the starpu_init() function to configure StarPU.\nIt has to be initialized with starpu_conf_init(). When the default\nvalue is used, StarPU automatically selects the number of\nprocessing units and takes the default scheduling policy. The\nenvironment variables overwrite the equivalent parameters."] # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct starpu_conf { # [doc = "@private\nWill be initialized by starpu_conf_init(). Should not be\nset by hand."] pub magic : :: std :: os :: raw :: c_int , # [doc = "@private\nTell starpu_init() if MPI will be initialized later."] pub will_use_mpi : :: std :: os :: raw :: c_int , # [doc = "Name of the scheduling policy. This can also be specified\nwith the environment variable \\ref STARPU_SCHED. (default =\n<c>NULL</c>)."] pub sched_policy_name : * const :: std :: os :: raw :: c_char , # [doc = "Definition of the scheduling policy. This field is ignored\nif starpu_conf::sched_policy_name is set.\n(default = <c>NULL</c>)"] pub sched_policy : * mut starpu_sched_policy , pub sched_policy_init : :: std :: option :: Option < unsafe extern "C" fn (arg1 : :: std :: os :: raw :: c_uint) > , # [doc = "For all parameters specified in this structure that can\nalso be set with environment variables, by default,\nStarPU chooses the value of the environment variable\nagainst the value set in starpu_conf. Setting the parameter\nstarpu_conf::precedence_over_environment_variables to 1 allows to give precedence\nto the value set in the structure over the environment\nvariable."] pub precedence_over_environment_variables : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NCPU.\n(default = -1)"] pub ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CPU cores to that StarPU should leave aside. They can then\nbe used by application threads, by calling starpu_get_next_bindid() to\nget their ID, and starpu_bind_thread_on() to bind the current thread to them."] pub reserve_ncpus : :: std :: os :: raw :: c_int , # [doc = "Number of CUDA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NCUDA.\n(default = -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of OpenCL devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NOPENCL.\n(default = -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of MIC devices that StarPU can use. This can also be\nspecified with the environment variable \\ref STARPU_NMIC.\n(default = -1)"] pub nmic : :: std :: os :: raw :: c_int , # [doc = "Number of MPI Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NMPI_MS.\n(default = -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, the starpu_conf::workers_bindid array\nindicates where the different workers are bound, otherwise\nStarPU automatically selects where to bind the different\nworkers. This can also be specified with the environment\nvariable \\ref STARPU_WORKERS_CPUID.\n(default = 0)"] pub use_explicit_workers_bindid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_bindid flag is\nset, this array indicates where to bind the different\nworkers. The i-th entry of the starpu_conf::workers_bindid\nindicates the logical identifier of the processor which\nshould execute the i-th worker. Note that the logical\nordering of the CPUs is either determined by the OS, or\nprovided by the hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the CUDA workers will be attached to\nthe CUDA devices specified in the\nstarpu_conf::workers_cuda_gpuid array. Otherwise, StarPU\naffects the CUDA devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_CUDAID.\n(default = 0)"] pub use_explicit_workers_cuda_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_cuda_gpuid flag is\nset, this array contains the logical identifiers of the\nCUDA devices (as used by \\c cudaGetDevice())."] pub workers_cuda_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the OpenCL workers will be attached to\nthe OpenCL devices specified in the\nstarpu_conf::workers_opencl_gpuid array. Otherwise, StarPU\naffects the OpenCL devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_OPENCLID.\n(default = 0)"] pub use_explicit_workers_opencl_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_opencl_gpuid flag\nis set, this array contains the logical identifiers of the\nOpenCL devices to be used."] pub workers_opencl_gpuid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MIC workers will be attached to\nthe MIC devices specified in the array\nstarpu_conf::workers_mic_deviceid. Otherwise, StarPU\naffects the MIC devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_MICID.\n(default = 0)"] pub use_explicit_workers_mic_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag starpu_conf::use_explicit_workers_mic_deviceid\nis set, the array contains the logical identifiers of the\nMIC devices to be used."] pub workers_mic_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, the MPI Master Slave workers will be\nattached to the MPI Master Slave devices specified in the\narray starpu_conf::workers_mpi_ms_deviceid. Otherwise,\nStarPU affects the MPI Master Slave devices in a\nround-robin fashion.\n(default = 0)"] pub use_explicit_workers_mpi_ms_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the flag\nstarpu_conf::use_explicit_workers_mpi_ms_deviceid is set,\nthe array contains the logical identifiers of the MPI\nMaster Slave devices to be used."] pub workers_mpi_ms_deviceid : [:: std :: os :: raw :: c_uint ; 80usize] , # [doc = "If this flag is set, StarPU will recalibrate the bus.  If\nthis value is equal to -1, the default value is used. This\ncan also be specified with the environment variable \\ref\nSTARPU_BUS_CALIBRATE.\n(default = 0)"] pub bus_calibrate : :: std :: os :: raw :: c_int , # [doc = "If this flag is set, StarPU will calibrate the performance\nmodels when executing tasks. If this value is equal to -1,\nthe default value is used. If the value is equal to 1, it\nwill force continuing calibration. If the value is equal to\n2, the existing performance models will be overwritten.\nThis can also be specified with the environment variable\n\\ref STARPU_CALIBRATE.\n(default = 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "By default, StarPU executes parallel tasks concurrently.\nSome parallel libraries (e.g. most OpenMP implementations)\nhowever do not support concurrent calls to parallel code.\nIn such case, setting this flag makes StarPU only start one\nparallel task at a time (but other CPU and GPU tasks are\nnot affected and can be run concurrently). The parallel\ntask scheduler will however still try varying combined\nworker sizes to look for the most efficient ones.\nThis can also be specified with the environment variable\n\\ref STARPU_SINGLE_COMBINED_WORKER.\n(default = 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [doc = "Path to the kernel to execute on the MIC device, compiled\nfor MIC architecture. When set to <c>NULL</c>, StarPU\nautomatically looks next to the host program location.\n(default = <c>NULL</c>)"] pub mic_sink_program_path : * mut :: std :: os :: raw :: c_char , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and all accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-copy \"--disable-asynchronous-copy\".\n(default = 0)"] pub disable_asynchronous_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and CUDA accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_CUDA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-cuda-copy\n\"--disable-asynchronous-cuda-copy\".\n(default = 0)"] pub disable_asynchronous_cuda_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and OpenCL accelerators.\nThe AMD implementation of OpenCL is known to fail when\ncopying data asynchronously. When using this\nimplementation, it is therefore necessary to disable\nasynchronous data transfers.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_OPENCL_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-opencl-copy\n\"--disable-asynchronous-opencl-copy\".\n(default = 0)"] pub disable_asynchronous_opencl_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MIC accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MIC_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mic-copy\n\"--disable-asynchronous-mic-copy\".\n(default = 0)."] pub disable_asynchronous_mic_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and MPI Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MPI_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-mpi-master-slave-copy\n\"--disable-asynchronous-mpi-master-slave-copy\".\n(default = 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "Enable CUDA/OpenGL interoperation on these CUDA devices.\nThis can be set to an array of CUDA device identifiers for\nwhich \\c cudaGLSetGLDevice() should be called instead of \\c\ncudaSetDevice(). Its size is specified by the\nstarpu_conf::n_cuda_opengl_interoperability field below\n(default = <c>NULL</c>)"] pub cuda_opengl_interoperability : * mut :: std :: os :: raw :: c_uint , # [doc = "Size of the array starpu_conf::cuda_opengl_interoperability"] pub n_cuda_opengl_interoperability : :: std :: os :: raw :: c_uint , # [doc = "Array of drivers that should not be launched by StarPU. The\napplication will run in one of its own threads.\n(default = <c>NULL</c>)"] pub not_launched_drivers : * mut starpu_driver , # [doc = "The number of StarPU drivers that should not be launched by\nStarPU, i.e number of elements of the array\nstarpu_conf::not_launched_drivers.\n(default = 0)"] pub n_not_launched_drivers : :: std :: os :: raw :: c_uint , # [doc = "Specify the buffer size used for FxT tracing. Starting from\nFxT version 0.2.12, the buffer will automatically be\nflushed when it fills in, but it may still be interesting\nto specify a bigger value to avoid any flushing (which\nwould disturb the trace)."] pub trace_buffer_size : u64 , pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch SIGINT, SIGSEGV and SIGTRAP\nsignals to make sure final actions (e.g dumping FxT trace\nfiles) are done even though the application has crashed. By\ndefault (value = \\c 1), signals are catched. It should be\ndisabled on systems which already catch these signals for\ntheir own needs (e.g JVM)\nThis can also be specified with the environment variable\n\\ref STARPU_CATCH_SIGNALS"] pub catch_signals : :: std :: os :: raw :: c_int , # [doc = "Minimum spinning backoff of drivers. Default value: \\c 1"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. Default value: \\c 32"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , } # [test] fn bindgen_test_layout_starpu_conf () { const UNINIT : :: std :: mem :: MaybeUninit < starpu_conf > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < starpu_conf > () , 1792usize , concat ! ("Size of: " , stringify ! (starpu_conf))) ; assert_eq ! (:: std :: mem :: align_of :: < starpu_conf > () , 8usize , concat ! ("Alignment of " , stringify ! (starpu_conf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . magic) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (magic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . will_use_mpi) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (will_use_mpi))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_name) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_name))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . sched_policy_init) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (sched_policy_init))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . precedence_over_environment_variables) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (precedence_over_environment_variables))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncpus) as usize - ptr as usize } , 36usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reserve_ncpus) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (reserve_ncpus))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . ncuda) as usize - ptr as usize } , 44usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (ncuda))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nopencl) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nopencl))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmic) as usize - ptr as usize } , 52usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmic))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . nmpi_ms) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (nmpi_ms))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_bindid) as usize - ptr as usize } , 60usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_bindid) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_bindid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_cuda_gpuid) as usize - ptr as usize } , 384usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_cuda_gpuid) as usize - ptr as usize } , 388usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_cuda_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_opencl_gpuid) as usize - ptr as usize } , 708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_opencl_gpuid) as usize - ptr as usize } , 712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_opencl_gpuid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mic_deviceid) as usize - ptr as usize } , 1032usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mic_deviceid) as usize - ptr as usize } , 1036usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mic_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . use_explicit_workers_mpi_ms_deviceid) as usize - ptr as usize } , 1356usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (use_explicit_workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . workers_mpi_ms_deviceid) as usize - ptr as usize } , 1360usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (workers_mpi_ms_deviceid))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . bus_calibrate) as usize - ptr as usize } , 1680usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (bus_calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . calibrate) as usize - ptr as usize } , 1684usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (calibrate))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . single_combined_worker) as usize - ptr as usize } , 1688usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (single_combined_worker))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mic_sink_program_path) as usize - ptr as usize } , 1696usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (mic_sink_program_path))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_copy) as usize - ptr as usize } , 1704usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_cuda_copy) as usize - ptr as usize } , 1708usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_cuda_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_opencl_copy) as usize - ptr as usize } , 1712usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_opencl_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mic_copy) as usize - ptr as usize } , 1716usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mic_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . disable_asynchronous_mpi_ms_copy) as usize - ptr as usize } , 1720usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (disable_asynchronous_mpi_ms_copy))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cuda_opengl_interoperability) as usize - ptr as usize } , 1728usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_cuda_opengl_interoperability) as usize - ptr as usize } , 1736usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_cuda_opengl_interoperability))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . not_launched_drivers) as usize - ptr as usize } , 1744usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_not_launched_drivers) as usize - ptr as usize } , 1752usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (n_not_launched_drivers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . trace_buffer_size) as usize - ptr as usize } , 1760usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (trace_buffer_size))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_min_priority) as usize - ptr as usize } , 1768usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_min_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . global_sched_ctx_max_priority) as usize - ptr as usize } , 1772usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (global_sched_ctx_max_priority))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . catch_signals) as usize - ptr as usize } , 1776usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (catch_signals))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_min) as usize - ptr as usize } , 1780usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_min))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . driver_spinning_backoff_max) as usize - ptr as usize } , 1784usize , concat ! ("Offset of field: " , stringify ! (starpu_conf) , "::" , stringify ! (driver_spinning_backoff_max))) ; } impl Default for starpu_conf { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } extern "C" { # [doc = "Initialize the \\p conf structure with the default values. In case\nsome configuration parameters are already specified through\nenvironment variables, starpu_conf_init() initializes the fields of\n\\p conf according to the environment variables.\nFor instance if \\ref STARPU_CALIBRATE is set, its value is put in\nthe field starpu_conf::calibrate of \\p conf.\nUpon successful completion, this function returns 0. Otherwise,\n<c>-EINVAL</c> indicates that the argument was <c>NULL</c>."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "StarPU initialization method, must be called prior to any other\nStarPU call. It is possible to specify StarPU’s configuration (e.g.\nscheduling policy, number of cores, ...) by passing a\nnon-<c>NULL</c> \\p conf. Default configuration is used if \\p conf\nis <c>NULL</c>. Upon successful completion, this function returns\n0. Otherwise, <c>-ENODEV</c> indicates that no worker was available\n(and thus StarPU was not initialized)."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram."] pub fn starpu_initialize (user_conf : * mut starpu_conf , argc : * mut :: std :: os :: raw :: c_int , argv : * mut * mut * mut :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if StarPU is already initialized."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Wait for starpu_init() call to finish."] pub fn starpu_wait_initialized () ; } extern "C" { # [doc = "StarPU termination method, must be called at the end of the\napplication: statistics and other post-mortem debugging information\nare not guaranteed to be available until this method has been\ncalled."] pub fn starpu_shutdown () ; } extern "C" { # [doc = "Suspend the processing of new tasks by workers. It can be used in a\nprogram where StarPU is used during only a part of the execution.\nWithout this call, the workers continue to poll for new tasks in a\ntight loop, wasting CPU time. The symmetric call to starpu_resume()\nshould be used to unfreeze the workers."] pub fn starpu_pause () ; } extern "C" { # [doc = "Symmetrical call to starpu_pause(), used to resume the workers\npolling for new tasks. This would be typically called only once\nhaving submitted all tasks."] pub fn starpu_resume () ; } extern "C" { # [doc = "Return a PU binding ID which can be used to bind threads with\nstarpu_bind_thread_on(). \\p flags can be set to\nSTARPU_THREAD_ACTIVE or 0. When \\p npreferred is set to non-zero,\n\\p preferred is an array of size \\p npreferred in which a\npreference of PU binding IDs can be set. By default StarPU will\nreturn the first PU available for binding."] pub fn starpu_get_next_bindid (flags : :: std :: os :: raw :: c_uint , preferred : * mut :: std :: os :: raw :: c_uint , npreferred : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid (which should have\nbeen obtained with starpu_get_next_bindid()).\n\nReturn -1 if a thread was already bound to this PU (but binding\nwill still have been done, and a warning will have been printed),\nso the caller can tell the user how to avoid the issue.\n\n\\p name should be set to a unique string so that different calls\nwith the same name for the same cpuid does not produce a warning."] pub fn starpu_bind_thread_on (cpuid : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_uint , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Print a description of the topology on \\p f."] pub fn starpu_topology_print (f : * mut FILE) ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MIC devices\nare disabled."] pub fn starpu_asynchronous_mic_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn starpu_display_stats () ; } extern "C" { pub fn starpu_get_version (major : * mut :: std :: os :: raw :: c_int , minor : * mut :: std :: os :: raw :: c_int , release : * mut :: std :: os :: raw :: c_int) ; } pub type __builtin_va_list = [__va_list_tag ; 1usize] ; # [repr (C)] # [derive (Debug , Copy , Clone , PartialEq)] pub struct __va_list_tag { pub gp_offset : :: std :: os :: raw :: c_uint , pub fp_offset : :: std :: os :: raw :: c_uint , pub overflow_arg_area : * mut :: std :: os :: raw :: c_void , pub reg_save_area : * mut :: std :: os :: raw :: c_void , } # [test] fn bindgen_test_layout___va_list_tag () { const UNINIT : :: std :: mem :: MaybeUninit < __va_list_tag > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < __va_list_tag > () , 24usize , concat ! ("Size of: " , stringify ! (__va_list_tag))) ; assert_eq ! (:: std :: mem :: align_of :: < __va_list_tag > () , 8usize , concat ! ("Alignment of " , stringify ! (__va_list_tag))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . gp_offset) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (gp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fp_offset) as usize - ptr as usize } , 4usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (fp_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . overflow_arg_area) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (overflow_arg_area))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . reg_save_area) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (__va_list_tag) , "::" , stringify ! (reg_save_area))) ; } impl Default for __va_list_tag { fn default () -> Self { let mut s = :: std :: mem :: MaybeUninit :: < Self > :: uninit () ; unsafe { :: std :: ptr :: write_bytes (s . as_mut_ptr () , 0 , 1) ; s . assume_init () } } } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone , PartialEq)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout]      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ++++++++++
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] error[E0412]: cannot find type `cl_event` in this scope
[INFO] [stdout]     --> /opt/rustwide/target/debug/build/starpu-sys-080b318772b2d208/out/bindings.rs:3:81779
[INFO] [stdout]      |
[INFO] [stdout] 3    |   ...oid , dst_node : :: std :: os :: raw :: c_uint , event : * mut cl_event) -> :: std :: os :: raw :: c_int > , # [doc = "Define how to c...
[INFO] [stdout]      |                                                                     ^^^^^^^^
[INFO] [stdout]      |
[INFO] [stdout]     ::: /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.169/src/unix/linux_like/linux/mod.rs:1270:1
[INFO] [stdout]      |
[INFO] [stdout] 1270 | / s_no_extra_traits! {
[INFO] [stdout] 1271 | |     pub struct sockaddr_nl {
[INFO] [stdout] 1272 | |         pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1273 | |         nl_pad: c_ushort,
[INFO] [stdout] ...    |
[INFO] [stdout] 1702 | | }
[INFO] [stdout]      | |_- similarly named struct `iw_event` defined here
[INFO] [stdout]      |
[INFO] [stdout] help: a struct with a similar name exists
[INFO] [stdout]      |
[WARN] too much data in the log, truncating it
