[INFO] fetching crate starpu-sys 3.0.0...
[INFO] checking starpu-sys-3.0.0 against master#8c32e313cccf7df531e2d49ffb8227bb92304aee for pr-145608-1
[INFO] extracting crate starpu-sys 3.0.0 into /workspace/builds/worker-3-tc1/source
[INFO] started tweaking crates.io crate starpu-sys 3.0.0
[INFO] removed 0 missing tests
[INFO] finished tweaking crates.io crate starpu-sys 3.0.0
[INFO] tweaked toml for crates.io crate starpu-sys 3.0.0 written to /workspace/builds/worker-3-tc1/source/Cargo.toml
[INFO] validating manifest of crates.io crate starpu-sys 3.0.0 on toolchain 8c32e313cccf7df531e2d49ffb8227bb92304aee
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate crates.io crate starpu-sys 3.0.0 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" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr] Updating crates.io index
[INFO] [stderr] Downloading crates ...
[INFO] [stderr] Downloaded hwlocality-sys v0.6.0
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] [stdout] 2e999743b297d70ac987079c793f3d2e9ca79bd6e27cf50c0ec690831a85452b
[INFO] running `Command { std: "docker" "start" "-a" "2e999743b297d70ac987079c793f3d2e9ca79bd6e27cf50c0ec690831a85452b", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "2e999743b297d70ac987079c793f3d2e9ca79bd6e27cf50c0ec690831a85452b", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "2e999743b297d70ac987079c793f3d2e9ca79bd6e27cf50c0ec690831a85452b", kill_on_drop: false }`
[INFO] [stdout] 2e999743b297d70ac987079c793f3d2e9ca79bd6e27cf50c0ec690831a85452b
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-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:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }`
[INFO] [stdout] 5d9edb7a1110b3a851e9eded71e362b771a450bbd23ecfa03ca6c7e07054454b
[INFO] running `Command { std: "docker" "start" "-a" "5d9edb7a1110b3a851e9eded71e362b771a450bbd23ecfa03ca6c7e07054454b", kill_on_drop: false }`
[INFO] [stderr] Compiling hwlocality-sys v0.6.0
[INFO] [stderr] Compiling syn v2.0.104
[INFO] [stderr] Compiling bindgen v0.72.0
[INFO] [stderr] Compiling prettyplease v0.2.35
[INFO] [stderr] Compiling starpu-sys v3.0.0 (/opt/rustwide/workdir)
[INFO] [stdout] error[E0412]: cannot find type `cl_program` in this scope
[INFO] [stdout] --> /opt/rustwide/target/debug/build/starpu-sys-d9f436f8999da027/out/bindings.rs:3:17660
[INFO] [stdout] |
[INFO] [stdout] 3 | ...program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [allow (clippy :: unnecessary_operation , clippy :: ident...
[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-d9f436f8999da027/out/bindings.rs:3:18818
[INFO] [stdout] |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding ...
[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-d9f436f8999da027/out/bindings.rs:3:19062
[INFO] [stdout] |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the devic...
[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-d9f436f8999da027/out/bindings.rs:3:19320
[INFO] [stdout] |
[INFO] [stdout] 3 | ...: :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current w...
[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-d9f436f8999da027/out/bindings.rs:3:19517
[INFO] [stdout] |
[INFO] [stdout] 3 | ...tarpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command ...
[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-d9f436f8999da027/out/bindings.rs:3:19730
[INFO] [stdout] |
[INFO] [stdout] 3 | ...starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel...
[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-d9f436f8999da027/out/bindings.rs:3:20534
[INFO] [stdout] |
[INFO] [stdout] 3 | ...opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { #...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:20558
[INFO] [stdout] |
[INFO] [stdout] 3 | ..._kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "S...
[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-d9f436f8999da027/out/bindings.rs:3:25223
[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-d9f436f8999da027/out/bindings.rs:3:25249
[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-d9f436f8999da027/out/bindings.rs:3:25632
[INFO] [stdout] |
[INFO] [stdout] 3 | ...."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Collect...
[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-d9f436f8999da027/out/bindings.rs:3:26086
[INFO] [stdout] |
[INFO] [stdout] 3 | ...tarpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error messa...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:26339
[INFO] [stdout] |
[INFO] [stdout] 3 | ...tarpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Given a valid e...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:26885
[INFO] [stdout] |
[INFO] [stdout] 3 | ...d :: os :: raw :: c_char , status : cl_int) ; } unsafe extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:27207
[INFO] [stdout] |
[INFO] [stdout] 3 | ...devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe extern "C" { # ...
[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-d9f436f8999da027/out/bindings.rs:3:27239
[INFO] [stdout] |
[INFO] [stdout] 3 | ...t , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes from 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-d9f436f8999da027/out/bindings.rs:3:27256
[INFO] [stdout] |
[INFO] [stdout] 3 | ... : usize , flags : cl_mem_flags) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:28120
[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-d9f436f8999da027/out/bindings.rs:3:28218
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "C...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:28274
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buf...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:29066
[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_event` in this scope
[INFO] [stdout] --> /opt/rustwide/target/debug/build/starpu-sys-d9f436f8999da027/out/bindings.rs:3:29251
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "C...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:29307
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p s...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:30089
[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-d9f436f8999da027/out/bindings.rs:3:30168
[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-d9f436f8999da027/out/bindings.rs:3:30270
[INFO] [stdout] |
[INFO] [stdout] 3 | ...size , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "C...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:30326
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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_program` in this scope
[INFO] [stdout] --> /opt/rustwide/target/debug/build/starpu-sys-d9f436f8999da027/out/bindings.rs:3:17660
[INFO] [stdout] |
[INFO] [stdout] 3 | ...program for each OpenCL device."] pub programs : [cl_program ; 8usize] , } # [allow (clippy :: unnecessary_operation , clippy :: ident...
[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-d9f436f8999da027/out/bindings.rs:3:31154
[INFO] [stdout] |
[INFO] [stdout] 3 | ...uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[INFO] [stdout] | |_- similarly named struct `iw_event` defined here
[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-d9f436f8999da027/out/bindings.rs:3:18818
[INFO] [stdout] |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding ...
[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-d9f436f8999da027/out/bindings.rs:3:19062
[INFO] [stdout] |
[INFO] [stdout] 3 | ... : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the devic...
[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-d9f436f8999da027/out/bindings.rs:3:19320
[INFO] [stdout] |
[INFO] [stdout] 3 | ...: :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current w...
[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-d9f436f8999da027/out/bindings.rs:3:19517
[INFO] [stdout] |
[INFO] [stdout] 3 | ...tarpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command ...
[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-d9f436f8999da027/out/bindings.rs:3:31167
[INFO] [stdout] |
[INFO] [stdout] 3 | ... usize , event : * mut cl_event) -> cl_int ; } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va_list ; pub 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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:19730
[INFO] [stdout] |
[INFO] [stdout] 3 | ...starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel...
[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-d9f436f8999da027/out/bindings.rs:3:20534
[INFO] [stdout] |
[INFO] [stdout] 3 | ...opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { #...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:20558
[INFO] [stdout] |
[INFO] [stdout] 3 | ..._kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "S...
[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-d9f436f8999da027/out/bindings.rs:3:25223
[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-d9f436f8999da027/out/bindings.rs:3:25249
[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-d9f436f8999da027/out/bindings.rs:3:25632
[INFO] [stdout] |
[INFO] [stdout] 3 | ...."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Collect...
[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-d9f436f8999da027/out/bindings.rs:3:26086
[INFO] [stdout] |
[INFO] [stdout] 3 | ...tarpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error messa...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:26339
[INFO] [stdout] |
[INFO] [stdout] 3 | ...tarpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Given a valid e...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:26885
[INFO] [stdout] |
[INFO] [stdout] 3 | ...d :: os :: raw :: c_char , status : cl_int) ; } unsafe extern "C" { # [doc = "Allocate \\p size bytes of memory, stored in \\p addr. \...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:27207
[INFO] [stdout] |
[INFO] [stdout] 3 | ...devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe extern "C" { # ...
[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-d9f436f8999da027/out/bindings.rs:3:27239
[INFO] [stdout] |
[INFO] [stdout] 3 | ...t , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes from 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-d9f436f8999da027/out/bindings.rs:3:27256
[INFO] [stdout] |
[INFO] [stdout] 3 | ... : usize , flags : cl_mem_flags) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes from the given \\p ptr on RAM \\p src...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:28120
[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-d9f436f8999da027/out/bindings.rs:3:28218
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "C...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:28274
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes asynchronously from the given \\p buf...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:95037
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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] fn extract_bit (byte : u8 , index : usize) -> bool { 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 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] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { 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 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] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [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 unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , 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) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; 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 } ; unsafe { Self :: raw_set_bit (this , 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 = 4 ; pub const STARPU_RELEASE_VERSION : u32 = 3 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_USE_TCPIP_MASTER_SLAVE : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_PARALLEL_WORKER : 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_CBLAS_H : 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_PAPI : 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_BOOL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : 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_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_MAXCPUS : u32 = 32 ; pub const STARPU_MAXNUMANODES : u32 = 4 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMAXFPGADEVS : u32 = 12 ; pub const STARPU_MAXHIPDEVS : u32 = 8 ; pub const STARPU_NMAXWORKERS : u32 = 48 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; 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_HAVE_MPI_COMM_CREATE_GROUP : u32 = 1 ; pub const STARPU_USE_FXT : 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_PTHREAD_MUTEX_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_COND_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO : 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 STARPU_PYTHON_HAVE_NUMPY : u32 = 1 ; pub const STARPU_PROF_TOOL : 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_MALLOC_SIMULATION_UNIQUE : u32 = 128 ; pub const STARPU_NOWHERE : u32 = 1 ; 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_HIP_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_SPECIFIC_NODE_LOCAL_OR_CPU : i32 = - 5 ; pub const STARPU_SPECIFIC_NODE_NONE : i32 = - 6 ; 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_TRANSACTION : u32 = 5505024 ; pub const STARPU_TASK_FILE : u32 = 5636096 ; pub const STARPU_TASK_LINE : u32 = 5767168 ; pub const STARPU_EPILOGUE_CALLBACK : u32 = 5898240 ; pub const STARPU_EPILOGUE_CALLBACK_ARG : u32 = 6029312 ; pub const STARPU_BUBBLE_FUNC : u32 = 6160384 ; pub const STARPU_BUBBLE_FUNC_ARG : u32 = 6291456 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC : u32 = 6422528 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC_ARG : u32 = 6553600 ; pub const STARPU_BUBBLE_PARENT : u32 = 6684672 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 6815744 ; 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_PARALLEL_WORKER_MIN_NB : u32 = 131072 ; pub const STARPU_PARALLEL_WORKER_MAX_NB : u32 = 262144 ; pub const STARPU_PARALLEL_WORKER_NB : u32 = 393216 ; pub const STARPU_PARALLEL_WORKER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_PARALLEL_WORKER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_PARALLEL_WORKER_POLICY_NAME : u32 = 786432 ; pub const STARPU_PARALLEL_WORKER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_PARALLEL_WORKER_TYPE : u32 = 1310720 ; pub const STARPU_PARALLEL_WORKER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_PARALLEL_WORKER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_PARALLEL_WORKER_NEW : u32 = 1703936 ; pub const STARPU_PARALLEL_WORKER_NCORES : u32 = 1835008 ; pub const STARPU_CLUSTER_MIN_NB : u32 = 131072 ; pub const STARPU_CLUSTER_MAX_NB : u32 = 262144 ; pub const STARPU_CLUSTER_NB : u32 = 393216 ; pub const STARPU_CLUSTER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_CLUSTER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_CLUSTER_POLICY_NAME : u32 = 786432 ; pub const STARPU_CLUSTER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_CLUSTER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_CLUSTER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_CLUSTER_TYPE : u32 = 1310720 ; pub const STARPU_CLUSTER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_CLUSTER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_CLUSTER_NEW : u32 = 1703936 ; pub const STARPU_CLUSTER_NCORES : u32 = 1835008 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of drand48_data"] [:: std :: mem :: size_of :: < drand48_data > () - 24usize] ; ["Alignment of drand48_data"] [:: std :: mem :: align_of :: < drand48_data > () - 8usize] ; ["Offset of field: drand48_data::__x"] [:: std :: mem :: offset_of ! (drand48_data , __x) - 0usize] ; ["Offset of field: drand48_data::__old_x"] [:: std :: mem :: offset_of ! (drand48_data , __old_x) - 6usize] ; ["Offset of field: drand48_data::__c"] [:: std :: mem :: offset_of ! (drand48_data , __c) - 12usize] ; ["Offset of field: drand48_data::__init"] [:: std :: mem :: offset_of ! (drand48_data , __init) - 14usize] ; ["Offset of field: drand48_data::__a"] [:: std :: mem :: offset_of ! (drand48_data , __a) - 16usize] ; } ; 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_opencl_program"] [:: std :: mem :: size_of :: < starpu_opencl_program > () - 64usize] ; ["Alignment of starpu_opencl_program"] [:: std :: mem :: align_of :: < starpu_opencl_program > () - 8usize] ; ["Offset of field: starpu_opencl_program::programs"] [:: std :: mem :: offset_of ! (starpu_opencl_program , programs) - 0usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current worker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as (size_t size_of_the_argument, cl_mem *\npointer_to_the_argument). 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\n\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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 share/starpu/opencl 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. See \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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$STARPU_HOME/.starpu/opencl/\\.\\.vendor_id_\\_device_id_\\.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a file.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a string.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Unload an OpenCL compiled code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe 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). See \\ref OpenCL-specificOptimizations for more details."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe 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 NULL, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not NULL, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns -EAGAIN if the asynchronous launch was\nsuccessful. It returns 0 if the synchronous copy was successful, or\nfails otherwise.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_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 ; unsafe extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe 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)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_pthread_spinlock_t"] [:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Alignment of starpu_pthread_spinlock_t"] [:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Offset of field: starpu_pthread_spinlock_t::taken"] [:: std :: mem :: offset_of ! (starpu_pthread_spinlock_t , taken) - 0usize] ; } ; unsafe 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 ; } unsafe extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; unsafe extern "C" { pub fn starpu_sem_trywait (sem : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sem_wait (sem : * 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. See \\ref DataInterface for more details."] 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\nNULL pointer, since the value\nof the provided buffer is simply\nignored for now.\n\nSee \\ref ScratchData for more details."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< Reduction mode.\nStarPU will allocate on the fly a per-worker\nbuffer, so that various tasks that access the\nsame data in ::STARPU_REDUX mode can execute\nin parallel. When a task accesses the\ndata without ::STARPU_REDUX, StarPU will\nautomatically reduce the different contributions.\n\nCodelets contributing to these reductions\nwith ::STARPU_REDUX must be registered with\n::STARPU_RW | ::STARPU_COMMUTE access modes.\n\nSee \\ref DataReduction for more details."] 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).\n\nSee \\ref DataCommute for more details."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_task_insert() 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.\n\nTODO add extended description in documentation."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Inter-node reduction only.\nThis is similar to ::STARPU_REDUX, except that\nStarPU will allocate a per-node buffer only,\ni.e. parallelism will be achieved between\nnodes, but not within each node. This is\nuseful when the per-worker buffers allocated\nwith ::STARPU_REDUX consume too much memory.\n\nSee \\ref MPIMpiRedux for more details."] pub const STARPU_MPI_REDUX : starpu_data_access_mode = 128 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning, only use internally by StarPU"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< Request unmapping the destination replicate, only use internally by StarPU"] pub const STARPU_UNMAP : starpu_data_access_mode = 512 ; # [doc = "< Ignore this data for the footprint computation. See \\ref ScratchData"] pub const STARPU_NOFOOTPRINT : starpu_data_access_mode = 1024 ; # [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 = 2048 ; # [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 ; unsafe extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] 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]) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] 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 ; } unsafe 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.\nSee \\ref TaskSubmission for more details."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref TemporaryData for more details."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks. See \\ref DataReduction for more details."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } unsafe 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) ; } unsafe 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\nexplicitly 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 -EDEADLK). Upon successful\ncompletion, this function returns 0. See \\ref DataAccess for more details."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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.\n\n\\p callback_acquired is called when the data is acquired in terms of semantic,\nbut the data is not fetched yet. It is given a pointer to the node, which it\ncan modify if it wishes so.\n\nThis is a very internal interface, subject to changes, do not use this."] 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_acquired : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , node : * mut :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) > , callback : :: std :: option :: Option < unsafe extern "C" fn (arg : * 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 , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb(). See \\ref DataAccess for more details."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Partly release the piece of data acquired by the application either by\nstarpu_data_acquire() or by starpu_data_acquire_cb(), switching the\nacquisition down to \\p down_to_mode. For now, only releasing from ::STARPU_RW\nor ::STARPU_W acquisition down to ::STARPU_R is supported, or down to the same\nacquisition. ::STARPU_NONE can also be passed as \\p down_to_mode, in which\ncase this is equivalent to calling starpu_data_release(). See \\ref DataAccess for more details."] pub fn starpu_data_release_to (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release_to(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_to_on_node (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode , 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 ; unsafe extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } unsafe extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter, see \\ref\nConcurrentDataAccess for the details."] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Destroy the \\p arbiter. This must only be called after all data\nassigned to it have been unregistered. See \\ref\nConcurrentDataAccess for the details."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A task really needs it now!"] pub const STARPU_FETCH : starpu_is_prefetch = 0 ; # [doc = " A task will need it soon"] pub const STARPU_TASK_PREFETCH : starpu_is_prefetch = 1 ; # [doc = " It is a good idea to have it asap"] pub const STARPU_PREFETCH : starpu_is_prefetch = 2 ; # [doc = " Get this here when you have time to"] pub const STARPU_IDLEFETCH : starpu_is_prefetch = 3 ; # [doc = " Get this here when you have time to"] pub const STARPU_NFETCH : starpu_is_prefetch = 4 ; # [doc = "Prefetch levels\n\nData requests are ordered by priorities, but also by prefetching level,\nbetween data that a task wants now, and data that we will probably want\n\"soon\"."] pub type starpu_is_prefetch = :: std :: os :: raw :: c_uint ; unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node (or a transfer request for getting so is ongoing). See \\ref SchedulingHelpers for more details."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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. See \\ref DataPrefetch for more details."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Advise StarPU to evict \\p handle from the memory node \\p node\nStarPU will thus write its value back to its home node, before evicting it.\nThis may however fail if e.g. some task is still working on it.\n\nIf the eviction was successful, 0 is returned ; -1 is returned otherwise.\n\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_evict_from_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 transferred into those memory nodes. For\ninstance a 1<<0 write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0). See \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } unsafe 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().\nSee \\ref SequentialConsistency and \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the default sequential consistency flag. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } unsafe 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(). See \\ref SequentialConsistency for more details."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1. See \\ref OOCDataRegistration for more details."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0). See \\ref OOCDataRegistration for more details."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node.\n\n\\p is_allocated tells whether memory was allocated there for the data.\n\\p is_valid tells whether the actual value is available there.\n\\p is_loading tells whether the actual value is getting loaded there.\n\\p is_requested tells whether the actual value is requested to be loaded\nthere by some fetch/prefetch/idlefetch request.\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_query_status2 (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_loading : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Same as starpu_data_query_status2(), but without the is_loading parameter. See \\ref DataPrefetch for more details."] 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) ; } unsafe 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 (which has to take one handle with ::STARPU_W), and\nreduction between per-worker buffers will be done with the codelet \\p\nredux_cl (which has to take a first accumulation handle with\n::STARPU_RW|::STARPU_COMMUTE, and a second contribution handle with ::STARPU_R).\nSee \\ref DataReduction and \\ref TemporaryData for more details."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Same as starpu_data_set_reduction_methods() but allows to pass\narguments to the reduction and init tasks"] pub fn starpu_data_set_reduction_methods_with_args (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , redux_cl_arg : * mut :: std :: os :: raw :: c_void , init_cl : * mut starpu_codelet , init_cl_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_data_test_if_mapped_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Set the field \\c sched_data for the \\p handle to \\p sched_data . It can\nthen be retrieved with starpu_data_get_sched_data(). \\p sched_data can be any\nscheduler-defined value.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_sched_data (handle : starpu_data_handle_t , sched_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c sched_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_sched_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Check whether data \\p handle can be evicted now from node \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_can_evict (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , is_prefetch : starpu_is_prefetch) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Retrieve the value of an environment variable.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the current date in micro-seconds. See \\ref Preparing for more details."] pub fn starpu_timing_now () -> f64 ; } unsafe 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Like starpu_data_cpy(), copy the content of \\p src_handle into \\p dst_handle,\nbut additionally take a \\p priority parameter to sort it among the whole task\ngraph.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_cpy_priority (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 , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Create a copy of \\p src_handle, and return a new handle in \\p dst_handle,\nwhich is to be used only for read accesses. This allows StarPU to optimize it\nby not actually copying the data whenever possible (e.g. it may possibly\nsimply return src_handle itself).\nThe parameter \\p asynchronous indicates whether the function should block\nor not. In the case of an asynchronous call, it is possible to synchronize\nwith the 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_dup_ro (dst_handle : * mut starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call hwloc-ps to display binding of each process and thread running on\nthe machine.
\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU.\nSee \\ref MiscellaneousAndDebug for more details."] pub fn starpu_display_bindings () ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a bitmap representing logical indexes of NUMA nodes where the buffer\ntargeted by \\p ptr is allocated. An error is notified by a negative result.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_memory_location_bitmap (ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_long ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate data on disk. See \\ref DiskFunctions for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 data 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 data, 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 data \\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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_disk_ops"] [:: std :: mem :: size_of :: < starpu_disk_ops > () - 152usize] ; ["Alignment of starpu_disk_ops"] [:: std :: mem :: align_of :: < starpu_disk_ops > () - 8usize] ; ["Offset of field: starpu_disk_ops::plug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , plug) - 0usize] ; ["Offset of field: starpu_disk_ops::unplug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , unplug) - 8usize] ; ["Offset of field: starpu_disk_ops::bandwidth"] [:: std :: mem :: offset_of ! (starpu_disk_ops , bandwidth) - 16usize] ; ["Offset of field: starpu_disk_ops::alloc"] [:: std :: mem :: offset_of ! (starpu_disk_ops , alloc) - 24usize] ; ["Offset of field: starpu_disk_ops::free"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free) - 32usize] ; ["Offset of field: starpu_disk_ops::open"] [:: std :: mem :: offset_of ! (starpu_disk_ops , open) - 40usize] ; ["Offset of field: starpu_disk_ops::close"] [:: std :: mem :: offset_of ! (starpu_disk_ops , close) - 48usize] ; ["Offset of field: starpu_disk_ops::read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , read) - 56usize] ; ["Offset of field: starpu_disk_ops::write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , write) - 64usize] ; ["Offset of field: starpu_disk_ops::full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_read) - 72usize] ; ["Offset of field: starpu_disk_ops::full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_write) - 80usize] ; ["Offset of field: starpu_disk_ops::async_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_write) - 88usize] ; ["Offset of field: starpu_disk_ops::async_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_read) - 96usize] ; ["Offset of field: starpu_disk_ops::async_full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_read) - 104usize] ; ["Offset of field: starpu_disk_ops::async_full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_write) - 112usize] ; ["Offset of field: starpu_disk_ops::copy"] [:: std :: mem :: offset_of ! (starpu_disk_ops , copy) - 120usize] ; ["Offset of field: starpu_disk_ops::wait_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , wait_request) - 128usize] ; ["Offset of field: starpu_disk_ops::test_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , test_request) - 136usize] ; ["Offset of field: starpu_disk_ops::free_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free_request) - 144usize] ; } ; unsafe extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\nWarning: It creates one file per allocation !\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the HDF5 library.\n\nIt doesn't support multiple opening from different processes. \n\nYou may only allow one process to write in the HDF5 file.\n\nIf HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. "] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\nWarning: It creates one file per allocation !"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\nWarning: It creates one file per allocation !\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Close an existing data opened with starpu_disk_open(). See \\ref OutOfCore_Introduction for more details."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe 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. See \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndata. 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
\nSUCCESS: return the disk node.
\nFAIL: return an error code.
\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size.\n\nSee \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe 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, HIP or OpenCL support.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 HIP node. Return 0 on success."] pub ram_to_hip : :: 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 FPGA node. Return 0 on success."] pub ram_to_max_fpga : :: 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 HIP node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub hip_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 HIP node to the \\p dst_interface interface on the \\p\ndst_node HIP node. Return 0 on success."] pub hip_to_hip : :: 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 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 FPGA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub max_fpga_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 > , 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 > , pub ram_to_hip_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_hip_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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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 FPGA node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_max_fpga_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 FPGA 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 -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub max_fpga_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 -EAGAIN if any of the starpu_interface_copy()\ncalls has returned -EAGAIN (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::peek_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 > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_copy_methods"] [:: std :: mem :: size_of :: < starpu_data_copy_methods > () - 200usize] ; ["Alignment of starpu_data_copy_methods"] [:: std :: mem :: align_of :: < starpu_data_copy_methods > () - 8usize] ; ["Offset of field: starpu_data_copy_methods::can_copy"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , can_copy) - 0usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_ram) - 8usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda) - 16usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip) - 24usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl) - 32usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga) - 40usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram) - 48usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda) - 56usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram) - 64usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip) - 72usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram) - 80usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl) - 88usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram) - 96usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda_async) - 104usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram_async) - 112usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda_async) - 120usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip_async) - 128usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram_async) - 136usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip_async) - 144usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl_async) - 152usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram_async) - 160usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl_async) - 168usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga_async) - 176usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram_async) - 184usize] ; ["Offset of field: starpu_data_copy_methods::any_to_any"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , any_to_any) - 192usize] ; } ; # [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 = "< Identifier for the tensor data interface"] pub const STARPU_TENSOR_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "< Identifier for the ndim array data interface"] pub const STARPU_NDIM_INTERFACE_ID : starpu_data_interface_id = 10 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 11 ; # [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)] 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 (if >= 0), 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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 = "Cache the buffers from the given node to a caching interface.\n\nThis method is optional, mostly useful when also making\nstarpu_data_interface_ops::unregister_data_handle check that pointers are NULL.\n\n\\p src_interface is an interface that already has buffers\nallocated, but which we don't need any more. \\p cached_interface\nis a new interface into which the buffer pointers should be\ntransferred, for later reuse when allocating data of the same kind.\n\nUsually we can just memcpy over the set of pointers and descriptions\n(this is what StarPU does when this method is not implemented), but\nif unregister_data_handle checks that pointers are NULL, we need to\nadditionally clear the pointers in \\p src_interface. Also,\nit is not useful to copy the whole interface, only the\npointers need to be copied (essentially the pointers that\nstarpu_data_interface_ops::reuse_data_on_node will then transfer into\na new handle interface), as well as the properties\nthat starpu_data_interface_ops::compare (or\nstarpu_data_interface_ops::alloc_compare if defined) needs for\ncomparing interfaces for caching compatibility.\n\nWhen this method is not defined, StarPU will just copy the \\p\ncached_interface into \\p src_interface.\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub cache_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (cached_interface : * mut :: std :: os :: raw :: c_void , src_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Reuse on the given node the buffers of the provided interface\n\nThis method is optional, mostly useful when also defining\nalloc_footprint to share tiles of the same allocation size but\ndifferent shapes, or when the interface contains pointers which\nare initialized at registration (e.g. nn array in the ndim interface)\n\n\\p cached_interface is an already-allocated buffer that we want to\nreuse, and \\p new_data_interface is an interface in which we want to\ninstall that already-allocated buffer. Usually we can just memcpy over\nthe set of pointers and descriptions. But e.g. with 2D tiles the ld\nvalue may not be correct, and memcpy would wrongly overwrite it in\nnew_data_interface, i.e. reusing a vertical tile allocation for a horizontal tile, or vice-versa.\n\nreuse_data_on_node should thus copy over pointers, and define fields\nthat are usually set by allocate_data_on_node (e.g. ld).\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub reuse_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (dst_data_interface : * mut :: std :: os :: raw :: c_void , cached_interface : * const :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Map data from a source to a destination.\nDefine function starpu_interface_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub map_data : :: 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 = "Unmap data from a source to a destination.\nDefine function starpu_interface_unmap() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub unmap_data : :: 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 = "Update map data from a source to a destination.\nDefine function starpu_interface_update_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub update_map : :: 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 = "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 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 the maximum size that the data may need to increase to. For\ninstance, in the case of compressed matrix tiles this is the size\nwhen the block is fully dense.\nThis is currently only used for feedback tools."] pub get_max_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.\nIf specified, alloc_compare should be set to provide the strict\ncomparison, and reuse_data_on_node should be set to provide correct buffer reuse."] 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 starpu_malloc_flags(ptr, size, 0) (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is NULL, 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 = "Read the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count."] pub peek_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 = "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 = "Pack the interface into a contiguous buffer and set the\nsize of the newly created buffer in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub pack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the interface from the given buffer and set the size\nof the unpacked data in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub unpack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Free the allocated memory by a previous call to unpack_meta()"] pub free_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_data_interface_ops > () - 264usize] ; ["Alignment of starpu_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_data_interface_ops::register_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , register_data_handle) - 0usize] ; ["Offset of field: starpu_data_interface_ops::unregister_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unregister_data_handle) - 8usize] ; ["Offset of field: starpu_data_interface_ops::allocate_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , allocate_data_on_node) - 16usize] ; ["Offset of field: starpu_data_interface_ops::free_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_data_on_node) - 24usize] ; ["Offset of field: starpu_data_interface_ops::cache_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , cache_data_on_node) - 32usize] ; ["Offset of field: starpu_data_interface_ops::reuse_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , reuse_data_on_node) - 40usize] ; ["Offset of field: starpu_data_interface_ops::map_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , map_data) - 48usize] ; ["Offset of field: starpu_data_interface_ops::unmap_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unmap_data) - 56usize] ; ["Offset of field: starpu_data_interface_ops::update_map"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , update_map) - 64usize] ; ["Offset of field: starpu_data_interface_ops::init"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , init) - 72usize] ; ["Offset of field: starpu_data_interface_ops::copy_methods"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , copy_methods) - 80usize] ; ["Offset of field: starpu_data_interface_ops::handle_to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , handle_to_pointer) - 88usize] ; ["Offset of field: starpu_data_interface_ops::to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , to_pointer) - 96usize] ; ["Offset of field: starpu_data_interface_ops::get_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_size) - 104usize] ; ["Offset of field: starpu_data_interface_ops::get_alloc_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_alloc_size) - 112usize] ; ["Offset of field: starpu_data_interface_ops::get_max_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_max_size) - 120usize] ; ["Offset of field: starpu_data_interface_ops::footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , footprint) - 128usize] ; ["Offset of field: starpu_data_interface_ops::alloc_footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_footprint) - 136usize] ; ["Offset of field: starpu_data_interface_ops::compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , compare) - 144usize] ; ["Offset of field: starpu_data_interface_ops::alloc_compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_compare) - 152usize] ; ["Offset of field: starpu_data_interface_ops::display"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , display) - 160usize] ; ["Offset of field: starpu_data_interface_ops::describe"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , describe) - 168usize] ; ["Offset of field: starpu_data_interface_ops::interfaceid"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interfaceid) - 176usize] ; ["Offset of field: starpu_data_interface_ops::interface_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interface_size) - 184usize] ; ["Offset of field: starpu_data_interface_ops::is_multiformat"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , is_multiformat) - 192usize] ; ["Offset of field: starpu_data_interface_ops::dontcache"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , dontcache) - 193usize] ; ["Offset of field: starpu_data_interface_ops::get_mf_ops"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_mf_ops) - 200usize] ; ["Offset of field: starpu_data_interface_ops::pack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_data) - 208usize] ; ["Offset of field: starpu_data_interface_ops::peek_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , peek_data) - 216usize] ; ["Offset of field: starpu_data_interface_ops::unpack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_data) - 224usize] ; ["Offset of field: starpu_data_interface_ops::pack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_meta) - 232usize] ; ["Offset of field: starpu_data_interface_ops::unpack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_meta) - 240usize] ; ["Offset of field: starpu_data_interface_ops::free_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_meta) - 248usize] ; ["Offset of field: starpu_data_interface_ops::name"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , name) - 256usize] ; } ; 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 () } } } unsafe 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()).\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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) ; } unsafe extern "C" { # [doc = "Register the given data interface operations. If the field\nstarpu_data_interface_ops::field is set to\n::STARPU_UNKNOWN_INTERFACE_ID, then a new identifier will be set by\ncalling starpu_data_interface_get_next_id().\nThe function is automatically called when registering a piece of\ndata with starpu_data_register(). It is only necessary to call it\nbeforehand for some specific cases (such as the usmaster slave mode)."] pub fn starpu_data_register_ops (ops : * mut starpu_data_interface_ops) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or NULL\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node.\nSee \\ref DataPointers for more details."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle or NULL if\n\\p handle’s interface does not have any data allocated locally.\nSee \\ref DataPointers for more details."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node.\nSee \\ref DefiningANewDataInterface_pack for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle.\nSee \\ref DefiningANewDataInterface_helpers for more details."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } unsafe 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 on node \\p node 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 NULL, 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_pack_node (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 ; } unsafe extern "C" { # [doc = "Like starpu_data_pack_node(), but for the local memory node.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Read in handle's \\p node replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek_node (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 ; } unsafe extern "C" { # [doc = "Read in handle's local replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count allocated\non node \\p node as described by the interface of the data. The interface\nregistered at \\p handle must define an unpacking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack_node (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 ; } unsafe 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).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the size of the data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the maximum size that the \\p handle data may need to increase to.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_max_size (handle : starpu_data_handle_t) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "See \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print basic information on \\p handle on \\p node.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_print (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , stream : * mut FILE) ; } unsafe 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 ; } unsafe 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 -EAGAIN if the\ntransfer is still ongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 4D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe extern "C" { # [doc = "Copy \\p nn[1] * \\p nn[2]...* \\p nn[ndim-1] blocks of \\p nn[0] * \\p elemsize 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 nn[i] blocks (i = 1, 2, ... ndim-1) whose start addresses are\nldn_src[i] * \\p elemsize (resp. ld1_dst[i] * \\p elemsize) bytes apart\nin the source (resp. destination) interface.\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 Ndim data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_copynd (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , elemsize : usize , ndim : usize , nn : * mut u32 , ldn_src : * mut u32 , ldn_dst : * mut u32 , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "When an asynchronous 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().\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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) ; } unsafe extern "C" { # [doc = "See starpu_interface_start_driver_copy_async().\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } unsafe extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node.\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node_flags().\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::map_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_map (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize , ret : * mut :: std :: os :: raw :: c_int) -> usize ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::unmap_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_unmap (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::update_map.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_update_map (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) -> :: std :: os :: raw :: c_int ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_matrix_interface"] [:: std :: mem :: size_of :: < starpu_matrix_interface > () - 64usize] ; ["Alignment of starpu_matrix_interface"] [:: std :: mem :: align_of :: < starpu_matrix_interface > () - 8usize] ; ["Offset of field: starpu_matrix_interface::id"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , id) - 0usize] ; ["Offset of field: starpu_matrix_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ptr) - 8usize] ; ["Offset of field: starpu_matrix_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_matrix_interface::offset"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , offset) - 24usize] ; ["Offset of field: starpu_matrix_interface::nx"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , nx) - 32usize] ; ["Offset of field: starpu_matrix_interface::ny"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ny) - 36usize] ; ["Offset of field: starpu_matrix_interface::ld"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ld) - 40usize] ; ["Offset of field: starpu_matrix_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , elemsize) - 48usize] ; ["Offset of field: starpu_matrix_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_coo_interface"] [:: std :: mem :: size_of :: < starpu_coo_interface > () - 56usize] ; ["Alignment of starpu_coo_interface"] [:: std :: mem :: align_of :: < starpu_coo_interface > () - 8usize] ; ["Offset of field: starpu_coo_interface::id"] [:: std :: mem :: offset_of ! (starpu_coo_interface , id) - 0usize] ; ["Offset of field: starpu_coo_interface::columns"] [:: std :: mem :: offset_of ! (starpu_coo_interface , columns) - 8usize] ; ["Offset of field: starpu_coo_interface::rows"] [:: std :: mem :: offset_of ! (starpu_coo_interface , rows) - 16usize] ; ["Offset of field: starpu_coo_interface::values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , values) - 24usize] ; ["Offset of field: starpu_coo_interface::nx"] [:: std :: mem :: offset_of ! (starpu_coo_interface , nx) - 32usize] ; ["Offset of field: starpu_coo_interface::ny"] [:: std :: mem :: offset_of ! (starpu_coo_interface , ny) - 36usize] ; ["Offset of field: starpu_coo_interface::n_values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , n_values) - 40usize] ; ["Offset of field: starpu_coo_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_coo_interface , elemsize) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref COODataInterface for more details."] 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) ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_block_interface"] [:: std :: mem :: size_of :: < starpu_block_interface > () - 64usize] ; ["Alignment of starpu_block_interface"] [:: std :: mem :: align_of :: < starpu_block_interface > () - 8usize] ; ["Offset of field: starpu_block_interface::id"] [:: std :: mem :: offset_of ! (starpu_block_interface , id) - 0usize] ; ["Offset of field: starpu_block_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_block_interface , ptr) - 8usize] ; ["Offset of field: starpu_block_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_block_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_block_interface::offset"] [:: std :: mem :: offset_of ! (starpu_block_interface , offset) - 24usize] ; ["Offset of field: starpu_block_interface::nx"] [:: std :: mem :: offset_of ! (starpu_block_interface , nx) - 32usize] ; ["Offset of field: starpu_block_interface::ny"] [:: std :: mem :: offset_of ! (starpu_block_interface , ny) - 36usize] ; ["Offset of field: starpu_block_interface::nz"] [:: std :: mem :: offset_of ! (starpu_block_interface , nz) - 40usize] ; ["Offset of field: starpu_block_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldy) - 44usize] ; ["Offset of field: starpu_block_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldz) - 48usize] ; ["Offset of field: starpu_block_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_block_interface , elemsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Tensor Data Interface\n@{"] pub static mut starpu_interface_tensor_ops : starpu_data_interface_ops ; } # [doc = "Tensor interface for 4D dense tensors"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_tensor_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the tensor"] pub ptr : usize , # [doc = "< device handle of the tensor."] pub dev_handle : usize , # [doc = "< offset in the tensor."] pub offset : usize , # [doc = "< number of elements on the x-axis of the tensor."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the tensor."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the tensor."] pub nz : u32 , # [doc = "< number of elements on the t-axis of the tensor."] pub nt : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< number of elements between two cubes"] pub ldt : u32 , # [doc = "< size of the elements of the tensor."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tensor_interface"] [:: std :: mem :: size_of :: < starpu_tensor_interface > () - 72usize] ; ["Alignment of starpu_tensor_interface"] [:: std :: mem :: align_of :: < starpu_tensor_interface > () - 8usize] ; ["Offset of field: starpu_tensor_interface::id"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , id) - 0usize] ; ["Offset of field: starpu_tensor_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ptr) - 8usize] ; ["Offset of field: starpu_tensor_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_tensor_interface::offset"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , offset) - 24usize] ; ["Offset of field: starpu_tensor_interface::nx"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nx) - 32usize] ; ["Offset of field: starpu_tensor_interface::ny"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ny) - 36usize] ; ["Offset of field: starpu_tensor_interface::nz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nz) - 40usize] ; ["Offset of field: starpu_tensor_interface::nt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nt) - 44usize] ; ["Offset of field: starpu_tensor_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldy) - 48usize] ; ["Offset of field: starpu_tensor_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldz) - 52usize] ; ["Offset of field: starpu_tensor_interface::ldt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldt) - 56usize] ; ["Offset of field: starpu_tensor_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , elemsize) - 64usize] ; } ; impl Default for starpu_tensor_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz x \\p nt 4D tensor of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy,\n\\p ldz, and \\p ldt specify the number of elements between rows, between z planes and between t cubes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *tensor;\nstarpu_data_handle_t tensor_handle;\ntensor = (float*)malloc(nx*ny*nz*nt*sizeof(float));\nstarpu_tensor_data_register(&tensor_handle, STARPU_MAIN_RAM, (uintptr_t)tensor, nx, nx*ny, nx*ny*nz, nx, ny, nz, nt, sizeof(float));\n\\endcode\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , ldt : u32 , nx : u32 , ny : u32 , nz : u32 , nt : u32 , elemsize : usize) ; } unsafe 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, and \\p ldt elements between t cubes."] pub fn starpu_tensor_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32 , ldt : u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on the x-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nx (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the y-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_ny (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the z-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the t-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each row of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each z plane of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each t cubes of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_tensor_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the tensor designated by\n\\p handle."] pub fn starpu_tensor_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Ndim Array Data Interface\n@{"] pub static mut starpu_interface_ndim_ops : starpu_data_interface_ops ; } # [doc = "ndim interface for ndim array"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_ndim_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the ndim"] pub ptr : usize , # [doc = "< device handle of the ndim."] pub dev_handle : usize , # [doc = "< offset in the ndim."] pub offset : usize , # [doc = "< size actually currently allocated."] pub allocsize : usize , # [doc = "< array of element number on each dimension"] pub nn : * mut u32 , # [doc = "< array of element number between two units on each dimension"] pub ldn : * mut u32 , # [doc = "< size of the dimension."] pub ndim : usize , # [doc = "< size of the elements of the ndim."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_ndim_interface"] [:: std :: mem :: size_of :: < starpu_ndim_interface > () - 72usize] ; ["Alignment of starpu_ndim_interface"] [:: std :: mem :: align_of :: < starpu_ndim_interface > () - 8usize] ; ["Offset of field: starpu_ndim_interface::id"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , id) - 0usize] ; ["Offset of field: starpu_ndim_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ptr) - 8usize] ; ["Offset of field: starpu_ndim_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_ndim_interface::offset"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , offset) - 24usize] ; ["Offset of field: starpu_ndim_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , allocsize) - 32usize] ; ["Offset of field: starpu_ndim_interface::nn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , nn) - 40usize] ; ["Offset of field: starpu_ndim_interface::ldn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ldn) - 48usize] ; ["Offset of field: starpu_ndim_interface::ndim"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ndim) - 56usize] ; ["Offset of field: starpu_ndim_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , elemsize) - 64usize] ; } ; impl Default for starpu_ndim_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nn[0] x \\p nn[1] x ... \\p ndim-dimension matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldn,\nspecifies the number of elements between two units on each dimension.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *ndim_arr;\nsize_t arrsize = 1;\nint i;\nfor (i = 0; i < ndim; i++)\narrsize = arrsize * nn[i];\nstarpu_data_handle_t ndim_handle;\nndim_arr = (float*)malloc(arrsize*sizeof(float));\nstarpu_ndim_data_register(&ndim_handle, STARPU_MAIN_RAM, (uintptr_t)ndim_arr, ldn, nn, ndim, sizeof(float));\n\\endcode\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldn : * mut u32 , nn : * mut u32 , ndim : usize , elemsize : usize) ; } unsafe 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 ldn elements between two units on each dimension."] pub fn starpu_ndim_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldn : * mut u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on each dimension of the ndim array\ndesignated by \\p handle."] pub fn starpu_ndim_get_nn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the i-axis of the ndim array\ndesignated by \\p handle. When i=0, it means x-axis,\nwhen i=1, it means y-axis, when i=2, it means z-axis, etc."] pub fn starpu_ndim_get_ni (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units on each dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units i-axis dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldi (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_ndim_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the dimension size."] pub fn starpu_ndim_get_ndim (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the ndim array designated by\n\\p handle."] pub fn starpu_ndim_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_vector_interface"] [:: std :: mem :: size_of :: < starpu_vector_interface > () - 64usize] ; ["Alignment of starpu_vector_interface"] [:: std :: mem :: align_of :: < starpu_vector_interface > () - 8usize] ; ["Offset of field: starpu_vector_interface::id"] [:: std :: mem :: offset_of ! (starpu_vector_interface , id) - 0usize] ; ["Offset of field: starpu_vector_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_vector_interface , ptr) - 8usize] ; ["Offset of field: starpu_vector_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_vector_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_vector_interface::offset"] [:: std :: mem :: offset_of ! (starpu_vector_interface , offset) - 24usize] ; ["Offset of field: starpu_vector_interface::nx"] [:: std :: mem :: offset_of ! (starpu_vector_interface , nx) - 32usize] ; ["Offset of field: starpu_vector_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , elemsize) - 40usize] ; ["Offset of field: starpu_vector_interface::slice_base"] [:: std :: mem :: offset_of ! (starpu_vector_interface , slice_base) - 48usize] ; ["Offset of field: starpu_vector_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_vector_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize.\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_variable_interface"] [:: std :: mem :: size_of :: < starpu_variable_interface > () - 40usize] ; ["Alignment of starpu_variable_interface"] [:: std :: mem :: align_of :: < starpu_variable_interface > () - 8usize] ; ["Offset of field: starpu_variable_interface::id"] [:: std :: mem :: offset_of ! (starpu_variable_interface , id) - 0usize] ; ["Offset of field: starpu_variable_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_variable_interface , ptr) - 8usize] ; ["Offset of field: starpu_variable_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_variable_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_variable_interface::offset"] [:: std :: mem :: offset_of ! (starpu_variable_interface , offset) - 24usize] ; ["Offset of field: starpu_variable_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_variable_interface , elemsize) - 32usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VariableDataInterface for more details."] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } unsafe 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 void\ndata in read-write concurrently.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } unsafe 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)] 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 = "< position of non-zero entries on the row (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitioning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_csr_interface"] [:: std :: mem :: size_of :: < starpu_csr_interface > () - 72usize] ; ["Alignment of starpu_csr_interface"] [:: std :: mem :: align_of :: < starpu_csr_interface > () - 8usize] ; ["Offset of field: starpu_csr_interface::id"] [:: std :: mem :: offset_of ! (starpu_csr_interface , id) - 0usize] ; ["Offset of field: starpu_csr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nnz) - 4usize] ; ["Offset of field: starpu_csr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nrow) - 8usize] ; ["Offset of field: starpu_csr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nzval) - 16usize] ; ["Offset of field: starpu_csr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , colind) - 24usize] ; ["Offset of field: starpu_csr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_csr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_csr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_csr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_csr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_csr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_csr_interface , elemsize) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix.\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 = "< array of nnz elements (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< array of nrow+1 elements (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitioning 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bcsr_interface"] [:: std :: mem :: size_of :: < starpu_bcsr_interface > () - 80usize] ; ["Alignment of starpu_bcsr_interface"] [:: std :: mem :: align_of :: < starpu_bcsr_interface > () - 8usize] ; ["Offset of field: starpu_bcsr_interface::id"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , id) - 0usize] ; ["Offset of field: starpu_bcsr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nnz) - 4usize] ; ["Offset of field: starpu_bcsr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nrow) - 8usize] ; ["Offset of field: starpu_bcsr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nzval) - 16usize] ; ["Offset of field: starpu_bcsr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , colind) - 24usize] ; ["Offset of field: starpu_bcsr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_bcsr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_bcsr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_bcsr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_bcsr_interface::r"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , r) - 60usize] ; ["Offset of field: starpu_bcsr_interface::c"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , c) - 64usize] ; ["Offset of field: starpu_bcsr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , elemsize) - 72usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () - 56usize] ; ["Alignment of starpu_multiformat_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_elemsize) - 0usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_elemsize) - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_opencl_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_opencl_cl) - 16usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_to_cpu_cl) - 24usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_elemsize) - 32usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_cuda_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_cuda_cl) - 40usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_to_cpu_cl) - 48usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 hip_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_interface"] [:: std :: mem :: size_of :: < starpu_multiformat_interface > () - 56usize] ; ["Alignment of starpu_multiformat_interface"] [:: std :: mem :: align_of :: < starpu_multiformat_interface > () - 8usize] ; ["Offset of field: starpu_multiformat_interface::id"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , id) - 0usize] ; ["Offset of field: starpu_multiformat_interface::cpu_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cpu_ptr) - 8usize] ; ["Offset of field: starpu_multiformat_interface::cuda_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cuda_ptr) - 16usize] ; ["Offset of field: starpu_multiformat_interface::hip_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , hip_ptr) - 24usize] ; ["Offset of field: starpu_multiformat_interface::opencl_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , opencl_ptr) - 32usize] ; ["Offset of field: starpu_multiformat_interface::nx"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , nx) - 40usize] ; ["Offset of field: starpu_multiformat_interface::ops"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , ops) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref TheMultiformatInterface for more details."] 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().\nSee \\ref DefiningANewDataFilter for more details."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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
\n- id 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
\n- nx, ny 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).
\n- ld for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange.
\n- elemsize is usually just copied over.
\n- ptr, the pointer to the data, has to be\ncomputed according to \\p i and the father's ptr, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has ptr different\nfrom NULL: in the OpenCL case notably, the\ndev_handle and offset fields are used\ninstead.
\n- dev_handle should be just copied over from the\nparent.
\n- offset has to be computed according to \\p i and\nthe father's offset, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n
"] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_filter"] [:: std :: mem :: size_of :: < starpu_data_filter > () - 48usize] ; ["Alignment of starpu_data_filter"] [:: std :: mem :: align_of :: < starpu_data_filter > () - 8usize] ; ["Offset of field: starpu_data_filter::filter_func"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_func) - 0usize] ; ["Offset of field: starpu_data_filter::nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , nchildren) - 8usize] ; ["Offset of field: starpu_data_filter::get_nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_nchildren) - 16usize] ; ["Offset of field: starpu_data_filter::get_child_ops"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_child_ops) - 24usize] ; ["Offset of field: starpu_data_filter::filter_arg"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg) - 32usize] ; ["Offset of field: starpu_data_filter::filter_arg_ptr"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg_ptr) - 40usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitioned beforehand.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list.\nSee \\ref PartitioningData for more details."] 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 ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The pointer of the filter list \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_parray (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut * mut starpu_data_filter) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The list of filter \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_array (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_readonly_submit(), but allow to\nspecify the coherency to be used for the main data \\p initial_handle.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\nin read-write mode through starpu_data_partition_submit(), and will downgrade\nthat partitioning into read-only mode for the \\p children, fetching data back to the \\p\ninitial_handle, and adding the necessary dependencies.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_downgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_clean() but the root data will be\ngathered on the given node.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean_node (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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().\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] 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 ; } unsafe 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.\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices.\n\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a matrix along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_vector.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_vector_y().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a matrix. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_variable.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_variable().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr, thus getting a vector\nof size (n-2*shadow)/nparts+2*shadow. The starpu_data_filter::filter_arg_ptr field\nof \\p f must be the shadow size casted into \\c void*.\n\nIMPORTANT: 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in 2 chunks of\nequal size, ignoring nparts. Thus, \\p id must be 0 or 1.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a vector. The starting\nposition is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_vector_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fvector_pick_variable.c\n\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_vector_filter_pick_variable().\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_matrix_z()\nand starpu_block_filter_pick_matrix_y().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a block. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_variable.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_variable().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, thus getting\n(x/\\p nparts ,y,z,t) tensors. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z,t) tensors. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, thus getting\n(x,y/\\p nparts ,z,t) tensors. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z,t) tensors. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, thus getting\n(x,y,z/\\p nparts,t) tensors. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow,t) tensors. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, thus getting\n(x,y,z,t/\\p nparts) tensors. If \\p nparts does not divide t, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,z,(t-2*shadow)/\\p nparts +2*shadow) tensors. If \\p nparts does not\ndivide t, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe T dimension. The starting position on T-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_t (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_block_t(),\nstarpu_tensor_filter_pick_block_z() and starpu_tensor_filter_pick_block_y().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a tensor. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_variable.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_variable().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg, with a shadow border\nstarpu_data_filter::filter_arg_ptr. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a 4-dim array into \\p nparts tensors along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_to_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor (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) ; } unsafe extern "C" { # [doc = "Partition a 3-dim array into \\p nparts blocks along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_block_child_ops(). A usage example is\navailable in examples/filters/fndim_to_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_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) ; } unsafe extern "C" { # [doc = "Partition a 2-dim array into \\p nparts matrices along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_to_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix (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) ; } unsafe extern "C" { # [doc = "Partition a 1-dim array into \\p nparts vectors.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_to_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector (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) ; } unsafe extern "C" { # [doc = "Transfer a 0-dim array to a variable.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_to_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous (n-1)dim arrays from a ndim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nA usage example is available in examples/filters/fndim_pick_ndim.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_ndim (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous tensors from a 5-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_5d_pick_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_5d_pick_tensor (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a 4-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/fndim_4d_pick_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_4d_pick_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a 3-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_3d_pick_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_3d_pick_matrix (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a 2-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_2d_pick_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_2d_pick_vector (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a 1-dim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_1d_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_1d_pick_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a ndim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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 blocksize, which is most often 1.\nSee \\ref DefiningANewDataFilter for more details."] 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 , blocksize : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_align (align : usize) ; } unsafe 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_noflag() function.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "@deprecated\nFree memory which has previously been allocated with\nstarpu_malloc(). This function is deprecated, one should use\nstarpu_free_noflag().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe extern "C" { # [doc = "Free memory by specifying its size. Should be used for memory\nallocated with starpu_malloc().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free_noflag (A : * mut :: std :: os :: raw :: c_void , dim : usize) -> :: 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 > ; unsafe 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().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on the node.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used (node : :: std :: os :: raw :: c_uint) -> usize ; } unsafe extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref DataManagementAllocation)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nDataManagementAllocation)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on all memory nodes.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used_all_nodes () -> usize ; } unsafe 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 -ENOMEM 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_sec seconds. Similar to calling Unix' \\c\nsleep function, except that it takes a float to allow sub-second\nsleeping, and when StarPU is compiled in SimGrid mode it does not\nreally sleep but just makes SimGrid record that the thread has\ntaken some time to sleep.\nSee \\ref Helpers for more details."] pub fn starpu_sleep (nb_sec : f32) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_micro_sec micro-seconds.\nIn simgrid mode, this only sleeps within virtual time.\nSee \\ref Helpers for more details."] pub fn starpu_usleep (nb_micro_sec : f32) ; } unsafe extern "C" { # [doc = "Account for \\p joules J being used.\nThis is support in simgrid mode, to record how much energy was used, and will\nshow up in further call to starpu_energy_used().\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_use (joules : f32) ; } unsafe extern "C" { # [doc = "Return the amount of energy having been used in J.\nThis account the amounts passed to starpu_energy_use(), but also the static\nenergy use set by the \\ref STARPU_IDLE_POWER environment variable.\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_used () -> f64 ; } # [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 ; unsafe 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) ; } unsafe 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 -EPERM, if\n\\p task was already submitted it returns -EINVAL."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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-ENOENT."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] 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]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\nNULL 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifier. It is possible to associate a task\nwith a unique tag 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 ; unsafe 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\nWARNING! Use with caution. 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\n0x200000003 instead of 0x2 and 0x3 when\ncalling starpu_tag_declare_deps(0x1, 2, 0x2, 0x3). 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } unsafe 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 structure starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled).\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Clear the already notified 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } unsafe 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().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } unsafe extern "C" { # [doc = "Return the task associated to the tag \\p id.\nSee \\ref TasksAndTagsDependencies for more details."] 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 submitted, 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 ; # [doc = "todo"] 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 = "HIP implementation of a codelet."] pub type starpu_hip_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 = "Maxeler FPGA implementation of a codelet."] pub type starpu_max_fpga_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 = "@ingroup API_Bubble Hierarchical Dags\nBubble decision function"] pub type starpu_bubble_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = "@ingroup API_Bubble Hierarchical Dags\nBubble DAG generation function"] pub type starpu_bubble_gen_dag_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_trs_epoch { _unused : [u8 ; 0] , } pub type starpu_trs_epoch_t = * mut _starpu_trs_epoch ; # [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.\n\nNote that the codelet structure needs to exist until the task is\nterminated. If dynamic codelet allocation is desired, release should be done\nno sooner than the starpu_task::callback_func callback time.\n\nIf the application wants to make the structure constant, it needs to be\nfilled exactly as StarPU expects:\n\n- starpu_codelet::cpu_funcs, starpu_codelet::cuda_funcs, etc. must be used instead\nof the deprecated starpu_codelet::cpu_func, starpu_codelet::cuda_func, etc.\n\n- the starpu_codelet::where field must be set.\n\nand additionally, starpu_codelet::checked must be set to 1 to tell StarPU\nthat the conditions above are properly met. Also, the \\ref\nSTARPU_CODELET_PROFILING environment variable must be set to 0.\nAn example is provided in tests/main/const_codelet.c"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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_HIP, ::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-NULL 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-NULL 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 HIP\nimplementations of the codelet. The functions must be\nhost-functions written in the HIP runtime API. Their\nprototype must be:\n\\code{.c}\nvoid hip_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::hip_funcs is ignored if ::STARPU_HIP does\nnot appear in the field starpu_codelet::where, it must be\nnon-NULL otherwise."] pub hip_funcs : [starpu_hip_func_t ; 4usize] , # [doc = "Optional array of flags for HIP execution. They specify\nsome semantic details about HIP kernel execution, such as\nasynchronous execution."] pub hip_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-NULL 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 the Maxeler FPGA\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid fpga_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 starpu_codelet::max_fpga_funcs is ignored if\n::STARPU_MAX_FPGA does not appear in the field\nstarpu_codelet::where, it must be non-NULL otherwise."] pub max_fpga_funcs : [starpu_max_fpga_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\nMPI MS devices for StarPU to simply look\nup the MPI MS function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional function to decide if the task is to be\ntransformed into a bubble"] pub bubble_func : starpu_bubble_func_t , # [doc = "Optional function to transform the task into a new graph"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\nvoid *buffers[] 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 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,\nand should not exceed \\ref STARPU_NMAXBUFS. If\ninsufficient, 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\ndata 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 data 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 NULL 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 (in J). This optional field is\nignored when set to NULL 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 ; 48usize] , # [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. Value 0 acts like if this field wasn't specified.\nColor representation is hex triplet (for example: 0xff0000 is red,\n0x0000ff is blue, 0xffa500 is orange, ...)."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL."] 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 , pub perf_counter_sample : * mut starpu_perf_counter_sample , pub perf_counter_values : * mut starpu_perf_counter_sample_cl_values , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet"] [:: std :: mem :: size_of :: < starpu_codelet > () - 832usize] ; ["Alignment of starpu_codelet"] [:: std :: mem :: align_of :: < starpu_codelet > () - 8usize] ; ["Offset of field: starpu_codelet::where_"] [:: std :: mem :: offset_of ! (starpu_codelet , where_) - 0usize] ; ["Offset of field: starpu_codelet::can_execute"] [:: std :: mem :: offset_of ! (starpu_codelet , can_execute) - 8usize] ; ["Offset of field: starpu_codelet::type_"] [:: std :: mem :: offset_of ! (starpu_codelet , type_) - 16usize] ; ["Offset of field: starpu_codelet::max_parallelism"] [:: std :: mem :: offset_of ! (starpu_codelet , max_parallelism) - 20usize] ; ["Offset of field: starpu_codelet::cpu_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_func) - 24usize] ; ["Offset of field: starpu_codelet::cuda_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_func) - 32usize] ; ["Offset of field: starpu_codelet::opencl_func"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_func) - 40usize] ; ["Offset of field: starpu_codelet::cpu_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs) - 48usize] ; ["Offset of field: starpu_codelet::cuda_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_funcs) - 80usize] ; ["Offset of field: starpu_codelet::cuda_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_flags) - 112usize] ; ["Offset of field: starpu_codelet::hip_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_funcs) - 120usize] ; ["Offset of field: starpu_codelet::hip_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_flags) - 152usize] ; ["Offset of field: starpu_codelet::opencl_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_funcs) - 160usize] ; ["Offset of field: starpu_codelet::opencl_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_flags) - 192usize] ; ["Offset of field: starpu_codelet::max_fpga_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , max_fpga_funcs) - 200usize] ; ["Offset of field: starpu_codelet::cpu_funcs_name"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs_name) - 232usize] ; ["Offset of field: starpu_codelet::bubble_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_func) - 264usize] ; ["Offset of field: starpu_codelet::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_gen_dag_func) - 272usize] ; ["Offset of field: starpu_codelet::nbuffers"] [:: std :: mem :: offset_of ! (starpu_codelet , nbuffers) - 280usize] ; ["Offset of field: starpu_codelet::modes"] [:: std :: mem :: offset_of ! (starpu_codelet , modes) - 284usize] ; ["Offset of field: starpu_codelet::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_modes) - 320usize] ; ["Offset of field: starpu_codelet::specific_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , specific_nodes) - 328usize] ; ["Offset of field: starpu_codelet::nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , nodes) - 332usize] ; ["Offset of field: starpu_codelet::dyn_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_nodes) - 368usize] ; ["Offset of field: starpu_codelet::model"] [:: std :: mem :: offset_of ! (starpu_codelet , model) - 376usize] ; ["Offset of field: starpu_codelet::energy_model"] [:: std :: mem :: offset_of ! (starpu_codelet , energy_model) - 384usize] ; ["Offset of field: starpu_codelet::per_worker_stats"] [:: std :: mem :: offset_of ! (starpu_codelet , per_worker_stats) - 392usize] ; ["Offset of field: starpu_codelet::name"] [:: std :: mem :: offset_of ! (starpu_codelet , name) - 776usize] ; ["Offset of field: starpu_codelet::color"] [:: std :: mem :: offset_of ! (starpu_codelet , color) - 784usize] ; ["Offset of field: starpu_codelet::callback_func"] [:: std :: mem :: offset_of ! (starpu_codelet , callback_func) - 792usize] ; ["Offset of field: starpu_codelet::flags"] [:: std :: mem :: offset_of ! (starpu_codelet , flags) - 800usize] ; ["Offset of field: starpu_codelet::perf_counter_sample"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_sample) - 808usize] ; ["Offset of field: starpu_codelet::perf_counter_values"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_values) - 816usize] ; ["Offset of field: starpu_codelet::checked"] [:: std :: mem :: offset_of ! (starpu_codelet , checked) - 824usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Codelet with empty function defined for all drivers"] pub static mut starpu_codelet_nop : starpu_codelet ; } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_descr"] [:: std :: mem :: size_of :: < starpu_data_descr > () - 16usize] ; ["Alignment of starpu_data_descr"] [:: std :: mem :: align_of :: < starpu_data_descr > () - 8usize] ; ["Offset of field: starpu_data_descr::handle"] [:: std :: mem :: offset_of ! (starpu_data_descr , handle) - 0usize] ; ["Offset of field: starpu_data_descr::mode"] [:: std :: mem :: offset_of ! (starpu_data_descr , mode) - 8usize] ; } ; 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)] 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 = "Optional file name where the task was submitted. This can be useful\nfor debugging purposes."] pub file : * const :: std :: os :: raw :: c_char , # [doc = "Optional line number where the task was submitted. This can be useful\nfor debugging purposes."] pub line : :: std :: os :: raw :: c_int , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to NULL,\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 data 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\ndata 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 insufficient, 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 needed 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 insufficient,\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 NULL. 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 pointer which points to the return value of submitted task.\nThe default value is NULL. starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be used to respectively\npack and unpack the return value into and form it. starpu_task::cl_ret\ncan be used for MPI support. The only requirement is that\nthe size of the return value must be set in starpu_task::cl_ret_size ."] pub cl_ret : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. The buffer of starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be allocated with\nthe starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret.\nstarpu_task::cl_ret_size can be used for MPI support."] pub cl_ret_size : usize , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *) which\nspecifies a possible callback. If this pointer is non-NULL,\nthe callback function is executed on the host after the execution of\nthe task. Contrary to starpu_task::callback_func, it is called\nbefore releasing tasks which depend on this task, so those cannot be\nalready executing. The callback is passed\nthe value contained in the starpu_task::epilogue_callback_arg field.\nNo callback is executed if the field is set to NULL.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EPILOGUE_CALLBACK followed by the function pointer."] pub epilogue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is NULL. This is\nthe pointer passed to the epilogue callback function. This field is\nignored if the field starpu_task::epilogue_callback_func is set to\nNULL."] pub epilogue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, the callback function is executed on the\nhost after the execution of the task. Contrary to\nstarpu_task::epilogue_callback, it is called after releasing\ntasks which depend on this task, so those\nmight 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 NULL.\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 NULL. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\nNULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void*)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 = "Transaction to which the task belongs, if any"] pub transaction : * mut starpu_transaction , # [doc = "Transaction epoch to which the task belongs, if any"] pub trs_epoch : starpu_trs_epoch_t , # [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 this task has failed and will thus have to be retried\n\nSet by StarPU."] pub failed : :: 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\nCall starpu_task_status_get_as_string() to get the status as a string.\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 NULL."] 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 starpu_perfmodel_plot, 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 in microseconds. 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 = "When using hierarchical dags, the job identifier of the\nbubble task which created the current task"] pub bubble_parent : :: std :: os :: raw :: c_ulong , # [doc = "When using hierarchical dags, a pointer to the bubble\ndecision function"] pub bubble_func : starpu_bubble_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble decision function"] pub bubble_func_arg : * mut :: std :: os :: raw :: c_void , # [doc = "When using hierarchical dags, a pointer to the bubble\nDAG generation function"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble DAG generation function"] pub bubble_gen_dag_func_arg : * mut :: std :: os :: raw :: c_void , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task"] [:: std :: mem :: size_of :: < starpu_task > () - 552usize] ; ["Alignment of starpu_task"] [:: std :: mem :: align_of :: < starpu_task > () - 8usize] ; ["Offset of field: starpu_task::name"] [:: std :: mem :: offset_of ! (starpu_task , name) - 0usize] ; ["Offset of field: starpu_task::file"] [:: std :: mem :: offset_of ! (starpu_task , file) - 8usize] ; ["Offset of field: starpu_task::line"] [:: std :: mem :: offset_of ! (starpu_task , line) - 16usize] ; ["Offset of field: starpu_task::cl"] [:: std :: mem :: offset_of ! (starpu_task , cl) - 24usize] ; ["Offset of field: starpu_task::where_"] [:: std :: mem :: offset_of ! (starpu_task , where_) - 32usize] ; ["Offset of field: starpu_task::nbuffers"] [:: std :: mem :: offset_of ! (starpu_task , nbuffers) - 36usize] ; ["Offset of field: starpu_task::dyn_handles"] [:: std :: mem :: offset_of ! (starpu_task , dyn_handles) - 40usize] ; ["Offset of field: starpu_task::dyn_interfaces"] [:: std :: mem :: offset_of ! (starpu_task , dyn_interfaces) - 48usize] ; ["Offset of field: starpu_task::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_task , dyn_modes) - 56usize] ; ["Offset of field: starpu_task::handles"] [:: std :: mem :: offset_of ! (starpu_task , handles) - 64usize] ; ["Offset of field: starpu_task::interfaces"] [:: std :: mem :: offset_of ! (starpu_task , interfaces) - 128usize] ; ["Offset of field: starpu_task::modes"] [:: std :: mem :: offset_of ! (starpu_task , modes) - 192usize] ; ["Offset of field: starpu_task::handles_sequential_consistency"] [:: std :: mem :: offset_of ! (starpu_task , handles_sequential_consistency) - 224usize] ; ["Offset of field: starpu_task::cl_arg"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg) - 232usize] ; ["Offset of field: starpu_task::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg_size) - 240usize] ; ["Offset of field: starpu_task::cl_ret"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret) - 248usize] ; ["Offset of field: starpu_task::cl_ret_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret_size) - 256usize] ; ["Offset of field: starpu_task::epilogue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_func) - 264usize] ; ["Offset of field: starpu_task::epilogue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_arg) - 272usize] ; ["Offset of field: starpu_task::callback_func"] [:: std :: mem :: offset_of ! (starpu_task , callback_func) - 280usize] ; ["Offset of field: starpu_task::callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , callback_arg) - 288usize] ; ["Offset of field: starpu_task::prologue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_func) - 296usize] ; ["Offset of field: starpu_task::prologue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_arg) - 304usize] ; ["Offset of field: starpu_task::prologue_callback_pop_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_func) - 312usize] ; ["Offset of field: starpu_task::prologue_callback_pop_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_arg) - 320usize] ; ["Offset of field: starpu_task::transaction"] [:: std :: mem :: offset_of ! (starpu_task , transaction) - 328usize] ; ["Offset of field: starpu_task::trs_epoch"] [:: std :: mem :: offset_of ! (starpu_task , trs_epoch) - 336usize] ; ["Offset of field: starpu_task::tag_id"] [:: std :: mem :: offset_of ! (starpu_task , tag_id) - 344usize] ; ["Offset of field: starpu_task::mf_skip"] [:: std :: mem :: offset_of ! (starpu_task , mf_skip) - 354usize] ; ["Offset of field: starpu_task::failed"] [:: std :: mem :: offset_of ! (starpu_task , failed) - 355usize] ; ["Offset of field: starpu_task::scheduled"] [:: std :: mem :: offset_of ! (starpu_task , scheduled) - 356usize] ; ["Offset of field: starpu_task::prefetched"] [:: std :: mem :: offset_of ! (starpu_task , prefetched) - 357usize] ; ["Offset of field: starpu_task::workerid"] [:: std :: mem :: offset_of ! (starpu_task , workerid) - 360usize] ; ["Offset of field: starpu_task::workerorder"] [:: std :: mem :: offset_of ! (starpu_task , workerorder) - 364usize] ; ["Offset of field: starpu_task::workerids"] [:: std :: mem :: offset_of ! (starpu_task , workerids) - 368usize] ; ["Offset of field: starpu_task::workerids_len"] [:: std :: mem :: offset_of ! (starpu_task , workerids_len) - 376usize] ; ["Offset of field: starpu_task::priority"] [:: std :: mem :: offset_of ! (starpu_task , priority) - 380usize] ; ["Offset of field: starpu_task::status"] [:: std :: mem :: offset_of ! (starpu_task , status) - 384usize] ; ["Offset of field: starpu_task::magic"] [:: std :: mem :: offset_of ! (starpu_task , magic) - 388usize] ; ["Offset of field: starpu_task::type_"] [:: std :: mem :: offset_of ! (starpu_task , type_) - 392usize] ; ["Offset of field: starpu_task::color"] [:: std :: mem :: offset_of ! (starpu_task , color) - 396usize] ; ["Offset of field: starpu_task::sched_ctx"] [:: std :: mem :: offset_of ! (starpu_task , sched_ctx) - 400usize] ; ["Offset of field: starpu_task::hypervisor_tag"] [:: std :: mem :: offset_of ! (starpu_task , hypervisor_tag) - 404usize] ; ["Offset of field: starpu_task::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_task , possibly_parallel) - 408usize] ; ["Offset of field: starpu_task::bundle"] [:: std :: mem :: offset_of ! (starpu_task , bundle) - 416usize] ; ["Offset of field: starpu_task::profiling_info"] [:: std :: mem :: offset_of ! (starpu_task , profiling_info) - 424usize] ; ["Offset of field: starpu_task::flops"] [:: std :: mem :: offset_of ! (starpu_task , flops) - 432usize] ; ["Offset of field: starpu_task::predicted"] [:: std :: mem :: offset_of ! (starpu_task , predicted) - 440usize] ; ["Offset of field: starpu_task::predicted_transfer"] [:: std :: mem :: offset_of ! (starpu_task , predicted_transfer) - 448usize] ; ["Offset of field: starpu_task::predicted_start"] [:: std :: mem :: offset_of ! (starpu_task , predicted_start) - 456usize] ; ["Offset of field: starpu_task::prev"] [:: std :: mem :: offset_of ! (starpu_task , prev) - 464usize] ; ["Offset of field: starpu_task::next"] [:: std :: mem :: offset_of ! (starpu_task , next) - 472usize] ; ["Offset of field: starpu_task::starpu_private"] [:: std :: mem :: offset_of ! (starpu_task , starpu_private) - 480usize] ; ["Offset of field: starpu_task::omp_task"] [:: std :: mem :: offset_of ! (starpu_task , omp_task) - 488usize] ; ["Offset of field: starpu_task::bubble_parent"] [:: std :: mem :: offset_of ! (starpu_task , bubble_parent) - 496usize] ; ["Offset of field: starpu_task::bubble_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func) - 504usize] ; ["Offset of field: starpu_task::bubble_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func_arg) - 512usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func) - 520usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func_arg) - 528usize] ; ["Offset of field: starpu_task::nb_termination_call_required"] [:: std :: mem :: offset_of ! (starpu_task , nb_termination_call_required) - 536usize] ; ["Offset of field: starpu_task::sched_data"] [:: std :: mem :: offset_of ! (starpu_task , sched_data) - 544usize] ; } ; 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 unsafe fn cl_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn cl_ret_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_cl_ret_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 unsafe fn cl_ret_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_ret_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn 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_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 unsafe fn callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn epilogue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_epilogue_callback_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 unsafe fn epilogue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_epilogue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 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 (4usize , 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 (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 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 (5usize , 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 (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_pop_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_pop_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 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 (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_tag_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_tag_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 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 (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn sequential_consistency_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_sequential_consistency_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 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 (8usize , 1u8 , val as u64) } } # [inline] pub unsafe fn synchronous_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 8usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_synchronous_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 8usize , 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 (9usize , 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 (9usize , 1u8 , val as u64) } } # [inline] pub unsafe fn execute_on_a_specific_worker_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 9usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_execute_on_a_specific_worker_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 9usize , 1u8 , val as u64 ,) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 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 (10usize , 1u8 , val as u64) } } # [inline] pub unsafe fn detach_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 10usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_detach_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 10usize , 1u8 , val as u64 ,) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 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 (11usize , 1u8 , val as u64) } } # [inline] pub unsafe fn destroy_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 11usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_destroy_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 11usize , 1u8 , val as u64 ,) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (12usize , 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 (12usize , 1u8 , val as u64) } } # [inline] pub unsafe fn regenerate_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 12usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_regenerate_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 12usize , 1u8 , val as u64 ,) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (13usize , 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 (13usize , 1u8 , val as u64) } } # [inline] pub unsafe fn no_submitorder_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 13usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_no_submitorder_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 13usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , cl_ret_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , epilogue_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 cl_ret_free : u32 = unsafe { :: std :: mem :: transmute (cl_ret_free) } ; cl_ret_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let epilogue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (epilogue_callback_arg_free) } ; epilogue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 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 (5usize , 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 (6usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (9usize , 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 (10usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (12usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (13usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } unsafe 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.\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_init (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_clean (task : * mut starpu_task) ; } unsafe 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().\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_create () -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Allocate a task structure that does nothing but accesses data \\p handle\nwith mode \\p mode. This allows to synchronize with the task graph, according\nto the sequential consistency, against tasks submitted before or after\nsubmitting this task. One can then use starpu_task_declare_deps_array() or\nstarpu_task_end_dep_add() / starpu_task_end_dep_release() to add dependencies\nagainst this task before submitting it.\nSee \\ref SynchronizationTasks for more details."] pub fn starpu_task_create_sync (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> * mut starpu_task ; } unsafe 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.\nSee \\ref Per-taskFeedback and \\ref PerformanceModelExample for more details."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Tell StarPU to free the resources associated with \\p task when the task is\nover. This is equivalent to having set task->destroy = 1 before submission,\nthe difference is that this can be called after submission and properly deals\nwith concurrency with the task execution.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_set_destroy (task : * mut starpu_task) ; } unsafe 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-ENODEV 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Submit \\p task to StarPU with dependency bypass.\n\nThis can only be called on behalf of another task which has already taken the\nproper dependencies, e.g. this task is just an attempt of doing the actual\ncomputation of that task.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_submit_nodeps (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingTasksToAContext for more details."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if \\p task is terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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, -EINVAL indicates that the\nspecified task was either synchronous or detached.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, -EINVAL indicates that\none of the tasks was either synchronous or detached.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowtoReuseMemory for more details."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] 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 ; } unsafe extern "C" { # [doc = "Wait until there is no more ready task.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_pop () ; } unsafe extern "C" { # [doc = "See \\ref GraphScheduling for more details."] pub fn starpu_do_schedule () ; } unsafe 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++.\nSee \\ref DefiningACodelet for more details."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl.\nSee \\ref Per-codeletFeedback for more details."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Return the task currently executed by the worker, or NULL 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.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_task_get_current () -> * mut starpu_task ; } unsafe 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.\n\nSee \\ref SpecifyingATargetNode for more details."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the name of the performance model of \\p task.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref TraceTaskDetails for more details."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Create and submit an empty task with the given callback.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Function to be used as a prologue callback to enable fault tolerance for the\ntask. This prologue will create a try-task, i.e a duplicate of the task,\nwhich will to the actual computation.\n\nThe prologue argument can be set to a check_ft function that will be\ncalled on termination of the duplicate, which can check the result of the\ntask, and either confirm success, or resubmit another attempt.\nIf it is not set, the default implementation is to just resubmit a new\ntry-task.\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_prologue (check_ft : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Create a try-task for a \\p meta_task, given a \\p template_task task\ntemplate. The meta task can be passed as template on the first call, but\nsince it is mangled by starpu_task_ft_create_retry(), further calls\n(typically made by the check_ft callback) need to be passed the previous\ntry-task as template task.\n\n\\p check_ft is similar to the prologue argument of\nstarpu_task_ft_prologue(), and is typically set to the very function calling\nstarpu_task_ft_create_retry().\n\nThe try-task is returned, and can be modified (e.g. to change scheduling\nparameters) before being submitted with starpu_task_submit_nodeps().\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_create_retry (meta_task : * const starpu_task , template_task : * const starpu_task , check_ft : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Record that this task failed, and should thus be retried.\nThis is usually called from the task codelet function itself, after checking\nthe result and noticing that the computation went wrong, and thus the task\nshould be retried. The performance of this task execution will not be\nrecorded for performance models.\n\nThis can only be called for a task whose data access modes are either\n::STARPU_R and ::STARPU_W."] pub fn starpu_task_ft_failed (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Notify that the try-task was successful and thus the meta-task was\nsuccessful.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_success (meta_task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for \\ref STARPU_WATCHDOG_TIMEOUT seconds.\nSee \\ref WatchdogSupport for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the given status as a string"] pub fn starpu_task_status_get_as_string (status : starpu_task_status) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Specify a minimum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MIN_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_min_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Specify a maximum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MAX_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_max_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Function to open a new transaction object and start the first transaction epoch.\n\n@return A pointer to an initializes struct starpu_transaction\nor \\c NULL if submitting the transaction begin task failed with \\c ENODEV.\nSee \\ref TransactionsCreation for more details."] pub fn starpu_transaction_open (do_start_func : :: std :: option :: Option < unsafe extern "C" fn (buffer : * mut :: std :: os :: raw :: c_void , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , do_start_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_transaction ; } unsafe extern "C" { # [doc = "Function to mark the end of the current transaction epoch and start a new epoch.\nSee \\ref TransactionsEpochNext for more details."] pub fn starpu_transaction_next_epoch (p_trs : * mut starpu_transaction , do_start_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Function to mark the end of the last transaction epoch and free the transaction object.\nSee \\ref TransactionsClosing for more details."] pub fn starpu_transaction_close (p_trs : * mut starpu_transaction) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; # [doc = "< CPU core"] pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; # [doc = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_RAM : starpu_node_kind = 4 ; # [doc = "< Disk memory"] pub const STARPU_DISK_RAM : starpu_node_kind = 5 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_RAM : starpu_node_kind = 7 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_RAM : starpu_node_kind = 8 ; # [doc = "< Maximum value of memory types"] pub const STARPU_MAX_RAM : starpu_node_kind = 8 ; # [doc = "< Number of memory types"] pub const STARPU_NRAM : starpu_node_kind = 9 ; # [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 = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_WORKER : starpu_worker_archtype = 4 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_WORKER : starpu_worker_archtype = 6 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_WORKER : starpu_worker_archtype = 7 ; # [doc = "< Number of arch types"] pub const STARPU_NARCH : starpu_worker_archtype = 8 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 255 ; # [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)] 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 ; 48usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_ctx_iterator"] [:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () - 80usize] ; ["Alignment of starpu_sched_ctx_iterator"] [:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::cursor"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , cursor) - 0usize] ; ["Offset of field: starpu_sched_ctx_iterator::value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , value) - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::possible_value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possible_value) - 16usize] ; ["Offset of field: starpu_sched_ctx_iterator::visited"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , visited) - 24usize] ; ["Offset of field: starpu_sched_ctx_iterator::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possibly_parallel) - 72usize] ; } ; 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)] 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 ; 48usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 48usize] , pub is_master : [:: std :: os :: raw :: c_char ; 48usize] , # [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 collection"] 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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_worker_collection"] [:: std :: mem :: size_of :: < starpu_worker_collection > () - 264usize] ; ["Alignment of starpu_worker_collection"] [:: std :: mem :: align_of :: < starpu_worker_collection > () - 8usize] ; ["Offset of field: starpu_worker_collection::workerids"] [:: std :: mem :: offset_of ! (starpu_worker_collection , workerids) - 0usize] ; ["Offset of field: starpu_worker_collection::collection_private"] [:: std :: mem :: offset_of ! (starpu_worker_collection , collection_private) - 8usize] ; ["Offset of field: starpu_worker_collection::nworkers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nworkers) - 16usize] ; ["Offset of field: starpu_worker_collection::unblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , unblocked_workers) - 24usize] ; ["Offset of field: starpu_worker_collection::nunblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nunblocked_workers) - 32usize] ; ["Offset of field: starpu_worker_collection::masters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , masters) - 40usize] ; ["Offset of field: starpu_worker_collection::nmasters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nmasters) - 48usize] ; ["Offset of field: starpu_worker_collection::present"] [:: std :: mem :: offset_of ! (starpu_worker_collection , present) - 52usize] ; ["Offset of field: starpu_worker_collection::is_unblocked"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_unblocked) - 100usize] ; ["Offset of field: starpu_worker_collection::is_master"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_master) - 148usize] ; ["Offset of field: starpu_worker_collection::type_"] [:: std :: mem :: offset_of ! (starpu_worker_collection , type_) - 196usize] ; ["Offset of field: starpu_worker_collection::has_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , has_next) - 200usize] ; ["Offset of field: starpu_worker_collection::get_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , get_next) - 208usize] ; ["Offset of field: starpu_worker_collection::add"] [:: std :: mem :: offset_of ! (starpu_worker_collection , add) - 216usize] ; ["Offset of field: starpu_worker_collection::remove"] [:: std :: mem :: offset_of ! (starpu_worker_collection , remove) - 224usize] ; ["Offset of field: starpu_worker_collection::init"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init) - 232usize] ; ["Offset of field: starpu_worker_collection::deinit"] [:: std :: mem :: offset_of ! (starpu_worker_collection , deinit) - 240usize] ; ["Offset of field: starpu_worker_collection::init_iterator"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator) - 248usize] ; ["Offset of field: starpu_worker_collection::init_iterator_for_parallel_tasks"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator_for_parallel_tasks) - 256usize] ; } ; 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 () } } } unsafe extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } unsafe extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } unsafe extern "C" { # [doc = "Wait for all workers to be initialised. Calling this function is\nnormally not necessary. It is called for example in\ntools/starpu_machine_display to make sure all workers\ninformation are correctly set before printing their information.\nSee \\ref PauseResume for more details."] pub fn starpu_worker_wait_for_initialisation () ; } unsafe extern "C" { # [doc = "Return true if type matches one of StarPU's defined worker architectures.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_archtype_is_valid (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Convert a mask of architectures to a worker archtype.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_arch_mask_to_worker_archtype (mask : :: std :: os :: raw :: c_uint) -> starpu_worker_archtype ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of HIP devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXHIPDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_hip_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of TCPIP Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_tcpip_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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).\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_sched_find_all_worker_combinations () ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\nNULL) value is returned in case of success, -EINVAL\nindicates that \\p type is not valid otherwise.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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-ERANGE 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return true if worker type can execute this task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_type_can_execute_task (worker_type : starpu_worker_archtype , task : * const starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all workers.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_all (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe extern "C" { # [doc = "Display on \\p output the number of workers of the given \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_count (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe 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 hwloc in case it is available.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devnum (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_subworkerid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return when the current task is expected to be finished.\n\nNote: the returned date should be used with caution since the task might very\nwell end just after this function returns.\n\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_worker_get_current_task_exp_end (workerid : :: std :: os :: raw :: c_uint , date : * mut timespec) ; } unsafe extern "C" { # [doc = "Return whether worker \\p workerid is currently blocked in a parallel task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return worker \\p type from a string.\nReturns STARPU_UNKNOWN_WORKER if the string doesn't match a worker type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_from_string (type_ : * const :: std :: os :: raw :: c_char) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string suitable for environment variable names (CPU, CUDA, etc.).\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_env_var (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe 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().\nSee \\ref InteroperabilityHWLOC for more details."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } unsafe extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to the worker \\p workerid.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } unsafe extern "C" { # [doc = "See \\ref TopologyMemory for more details."] pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the memory node associated to the current worker.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes of a given \\p kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count_by_kind (kind : starpu_node_kind) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Get the list of memory nodes of kind \\p kind.\nFill the array \\p memory_nodes_ids with the memory nodes numbers.\nThe argument \\p maxsize indicates the size of the array\n\\p memory_nodes_ids. The return value gives the number of node numbers\nthat were put in the array. -ERANGE is returned if \\p maxsize\nis lower than the number of memory nodes with the appropriate kind: in that\ncase, the array is filled with the \\p maxsize first elements. To avoid such\noverflows, the value of maxsize can be chosen by the means of function\nstarpu_memory_nodes_get_count_by_kind(), or by passing a value greater or\nequal to \\ref STARPU_MAXNODES.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_ids_by_type (kind : starpu_node_kind , memory_nodes_ids : * mut :: std :: os :: raw :: c_uint , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } unsafe extern "C" { # [doc = "Return the type of worker which operates on memory node kind \\p node_kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_worker_archtype (node_kind : starpu_node_kind) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the type of memory node that arch type \\p type operates on.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node_kind (type_ : starpu_worker_archtype) -> starpu_node_kind ; } unsafe 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 ; } unsafe 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 UINT_MAX-1 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_on () ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_off () ; } unsafe extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Acquire the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock_self () ; } unsafe extern "C" { # [doc = "Release the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock_self () ; } unsafe extern "C" { # [doc = "Return the number of different combined workers.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the current combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref Fork-modeParallelTasks and \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Register a new combined worker and get its identifier.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Get the description of a combined worker.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } unsafe 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).\nSee \\ref SchedulingHelpers for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_device"] [:: std :: mem :: size_of :: < starpu_perfmodel_device > () - 12usize] ; ["Alignment of starpu_perfmodel_device"] [:: std :: mem :: align_of :: < starpu_perfmodel_device > () - 4usize] ; ["Offset of field: starpu_perfmodel_device::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , type_) - 0usize] ; ["Offset of field: starpu_perfmodel_device::devid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , devid) - 4usize] ; ["Offset of field: starpu_perfmodel_device::ncores"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , ncores) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_arch > () - 16usize] ; ["Alignment of starpu_perfmodel_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_arch::ndevices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , ndevices) - 0usize] ; ["Offset of field: starpu_perfmodel_arch::devices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , devices) - 8usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_entry"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () - 88usize] ; ["Alignment of starpu_perfmodel_history_entry"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::mean"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , mean) - 0usize] ; ["Offset of field: starpu_perfmodel_history_entry::deviation"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , deviation) - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum) - 16usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum2) - 24usize] ; ["Offset of field: starpu_perfmodel_history_entry::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nsample) - 32usize] ; ["Offset of field: starpu_perfmodel_history_entry::nerror"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nerror) - 36usize] ; ["Offset of field: starpu_perfmodel_history_entry::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel_history_entry::size"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , size) - 48usize] ; ["Offset of field: starpu_perfmodel_history_entry::flops"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , flops) - 56usize] ; ["Offset of field: starpu_perfmodel_history_entry::duration"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , duration) - 64usize] ; ["Offset of field: starpu_perfmodel_history_entry::tag"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , tag) - 72usize] ; ["Offset of field: starpu_perfmodel_history_entry::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , parameters) - 80usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_list"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () - 16usize] ; ["Alignment of starpu_perfmodel_history_list"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_list::next"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , next) - 0usize] ; ["Offset of field: starpu_perfmodel_history_list::entry"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , entry) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_regression_model"] [:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () - 120usize] ; ["Alignment of starpu_perfmodel_regression_model"] [:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlny) - 0usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx) - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx2) - 16usize] ; ["Offset of field: starpu_perfmodel_regression_model::minx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , minx) - 24usize] ; ["Offset of field: starpu_perfmodel_regression_model::maxx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , maxx) - 32usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnxlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnxlny) - 40usize] ; ["Offset of field: starpu_perfmodel_regression_model::alpha"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , alpha) - 48usize] ; ["Offset of field: starpu_perfmodel_regression_model::beta"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , beta) - 56usize] ; ["Offset of field: starpu_perfmodel_regression_model::valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , valid) - 64usize] ; ["Offset of field: starpu_perfmodel_regression_model::a"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , a) - 72usize] ; ["Offset of field: starpu_perfmodel_regression_model::b"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , b) - 80usize] ; ["Offset of field: starpu_perfmodel_regression_model::c"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , c) - 88usize] ; ["Offset of field: starpu_perfmodel_regression_model::nl_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nl_valid) - 96usize] ; ["Offset of field: starpu_perfmodel_regression_model::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nsample) - 100usize] ; ["Offset of field: starpu_perfmodel_regression_model::coeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , coeff) - 104usize] ; ["Offset of field: starpu_perfmodel_regression_model::ncoeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , ncoeff) - 112usize] ; ["Offset of field: starpu_perfmodel_regression_model::multi_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , multi_valid) - 116usize] ; } ; 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)] 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_per_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () - 408usize] ; ["Alignment of starpu_perfmodel_per_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , cost_function) - 0usize] ; ["Offset of field: starpu_perfmodel_per_arch::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , size_base) - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::history"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , history) - 16usize] ; ["Offset of field: starpu_perfmodel_per_arch::list"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , list) - 24usize] ; ["Offset of field: starpu_perfmodel_per_arch::regression"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , regression) - 32usize] ; ["Offset of field: starpu_perfmodel_per_arch::debug_path"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , debug_path) - 152usize] ; } ; 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-worker cost model function"] pub const STARPU_PER_WORKER : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 2 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 3 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic linear regression-based cost model (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 7 ; # [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)] pub struct starpu_perfmodel { # [doc = "type of performance model\n\n- \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
\n- \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
\n- \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
\n- \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
\n
"] 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_PER_ARCH. 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_PER_WORKER. Take a task, a worker id and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that worker."] pub worker_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not NULL, 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 NULL, 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 = "name of the file storing the performance model. It is non\nNULL if the model has been loaded or stored in a file."] pub path : * mut :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel"] [:: std :: mem :: size_of :: < starpu_perfmodel > () - 128usize] ; ["Alignment of starpu_perfmodel"] [:: std :: mem :: align_of :: < starpu_perfmodel > () - 8usize] ; ["Offset of field: starpu_perfmodel::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel , type_) - 0usize] ; ["Offset of field: starpu_perfmodel::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , cost_function) - 8usize] ; ["Offset of field: starpu_perfmodel::arch_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , arch_cost_function) - 16usize] ; ["Offset of field: starpu_perfmodel::worker_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , worker_cost_function) - 24usize] ; ["Offset of field: starpu_perfmodel::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel , size_base) - 32usize] ; ["Offset of field: starpu_perfmodel::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel::symbol"] [:: std :: mem :: offset_of ! (starpu_perfmodel , symbol) - 48usize] ; ["Offset of field: starpu_perfmodel::path"] [:: std :: mem :: offset_of ! (starpu_perfmodel , path) - 56usize] ; ["Offset of field: starpu_perfmodel::is_loaded"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_loaded) - 64usize] ; ["Offset of field: starpu_perfmodel::benchmarking"] [:: std :: mem :: offset_of ! (starpu_perfmodel , benchmarking) - 68usize] ; ["Offset of field: starpu_perfmodel::is_init"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_init) - 72usize] ; ["Offset of field: starpu_perfmodel::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters) - 80usize] ; ["Offset of field: starpu_perfmodel::parameters_names"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters_names) - 88usize] ; ["Offset of field: starpu_perfmodel::nparameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , nparameters) - 96usize] ; ["Offset of field: starpu_perfmodel::combinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , combinations) - 104usize] ; ["Offset of field: starpu_perfmodel::ncombinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , ncombinations) - 112usize] ; ["Offset of field: starpu_perfmodel::state"] [:: std :: mem :: offset_of ! (starpu_perfmodel , state) - 120usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = "Deinitialize the \\p model performance model structure. You need to call this\nbefore deallocating the structure. You will probably want to call\nstarpu_perfmodel_unload_model() before calling this function, to save the perfmodel."] pub fn starpu_perfmodel_deinit (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_start - start counting hardware events in an event set\n\n- \\p workerid is the worker on which calibration is to be performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration will be run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_start (workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_stop - stop counting hardware events in an event set\n\n- \\p model is the energy performance model to be filled with the result\n- \\p task is a task specimen, so the performance model folds the result according to the parameter sizes of the task.\n- \\p nimpl is the implementation number run during calibration\n- \\p ntasks is the number of tasks run during calibration\n- \\p workerid is the worker on which calibration was performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration was run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_stop (model : * mut starpu_perfmodel , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint , ntasks : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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$STARPU_HOME/.starpu. 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Save the performance model in its file."] pub fn starpu_save_history_based_model (model : * mut starpu_perfmodel) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } unsafe 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 tools/starpu_perfmodel_display.c."] pub fn starpu_perfmodel_free_sampling () ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the estimated time in µs 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 ; } unsafe 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 () ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with one explicit\nmeasurement (in µs or J), 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.\n\nNote that this records only one measurement, and StarPU would ignore\nthe first measurement (since it is usually disturbed by library loading\netc.). Make sure to call this function several times to record all your\nmeasurements.\n\nYou can also call starpu_perfmodel_update_history_n() to directly provide an\naverage performed on several tasks.\n\nSee \\ref PerformanceModelCalibration for more details."] 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) ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with an explicit average measurement (in µs or J).\n\nThis is similar to starpu_perfmodel_update_history(), but records a batch of\n\\p number measurements provided as the average of the measurements \\p average_measured."] pub fn starpu_perfmodel_update_history_n (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 , average_measured : f64 , number : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the latency of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task_list"] [:: std :: mem :: size_of :: < starpu_task_list > () - 16usize] ; ["Alignment of starpu_task_list"] [:: std :: mem :: align_of :: < starpu_task_list > () - 8usize] ; ["Offset of field: starpu_task_list::head"] [:: std :: mem :: offset_of ! (starpu_task_list , head) - 0usize] ; ["Offset of field: starpu_task_list::tail"] [:: std :: mem :: offset_of ! (starpu_task_list , tail) - 8usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize a list structure.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } unsafe extern "C" { # [doc = "Push \\p task at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Push \\p task at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Get the front of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the back of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test if \\p list is empty.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Remove \\p task from \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Remove the element at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Remove the element at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the first task of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the end of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Move list from one head \\p lsrc to another \\p ldst.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } unsafe 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\n- ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n
- ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n
- ::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
- ::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
- 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
\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.\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Identical to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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\ntask->dyn_handles array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating task->dyn_handles 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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().\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [doc = "Structure to be used for starpu_codelet_pack_arg_init() & co, and\nstarpu_codelet_unpack_arg_init() & co. The contents is public,\nhowever users should not directly access it, but only use as a\nparameter to the appropriate functions."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub arg_buffer_used : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet_pack_arg_data"] [:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () - 40usize] ; ["Alignment of starpu_codelet_pack_arg_data"] [:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer) - 0usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_size"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_size) - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_used"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_used) - 16usize] ; ["Offset of field: starpu_codelet_pack_arg_data::current_offset"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , current_offset) - 24usize] ; ["Offset of field: starpu_codelet_pack_arg_data::nargs"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , nargs) - 32usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } unsafe extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times.\nSee \\ref InsertTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } unsafe extern "C" { # [doc = "Initialize \\p state with \\p cl_arg and \\p cl_arg_size. This has to\nbe called before calling starpu_codelet_unpack_arg().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_init (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut :: std :: os :: raw :: c_void , cl_arg_size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of size \\p size from \\p state into \\p ptr with a copy.\n\\p state has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr\nwith a copy. \\p ptr is allocated before copying in it the value of\nthe argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_dup_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr.\n\\p ptr will be a pointer to the memory of the argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pick_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Finish unpacking data, after calling starpu_codelet_unpack_arg_init()\nonce and starpu_codelet_unpack_arg() or starpu_codelet_dup_arg() or\nstarpu_codelet_pick_arg() several times.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_fini (state : * mut starpu_codelet_pack_arg_data) ; } unsafe extern "C" { # [doc = "Call this function during unpacking to skip saving the argument in ptr.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_discard_arg (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] 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\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here given the task
\n- starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here gives back the task to the core. It must not\naccess this task any more
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- 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.
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n\nNote: to get an estimation of the task duration, \\p perf_workerid\nneeds to be used rather than \\p workerid, for the case of parallel\ntasks."] 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 NULL, 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 = "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 = " Whether this scheduling policy does data prefetching, and thus the\ncore should not try to do it opportunistically."] pub prefetches : :: std :: os :: raw :: c_int , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_policy"] [:: std :: mem :: size_of :: < starpu_sched_policy > () - 128usize] ; ["Alignment of starpu_sched_policy"] [:: std :: mem :: align_of :: < starpu_sched_policy > () - 8usize] ; ["Offset of field: starpu_sched_policy::init_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , init_sched) - 0usize] ; ["Offset of field: starpu_sched_policy::deinit_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , deinit_sched) - 8usize] ; ["Offset of field: starpu_sched_policy::push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task) - 16usize] ; ["Offset of field: starpu_sched_policy::simulate_push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , simulate_push_task) - 24usize] ; ["Offset of field: starpu_sched_policy::push_task_notify"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task_notify) - 32usize] ; ["Offset of field: starpu_sched_policy::pop_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pop_task) - 40usize] ; ["Offset of field: starpu_sched_policy::submit_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , submit_hook) - 48usize] ; ["Offset of field: starpu_sched_policy::pre_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pre_exec_hook) - 56usize] ; ["Offset of field: starpu_sched_policy::post_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , post_exec_hook) - 64usize] ; ["Offset of field: starpu_sched_policy::do_schedule"] [:: std :: mem :: offset_of ! (starpu_sched_policy , do_schedule) - 72usize] ; ["Offset of field: starpu_sched_policy::add_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , add_workers) - 80usize] ; ["Offset of field: starpu_sched_policy::remove_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , remove_workers) - 88usize] ; ["Offset of field: starpu_sched_policy::prefetches"] [:: std :: mem :: offset_of ! (starpu_sched_policy , prefetches) - 96usize] ; ["Offset of field: starpu_sched_policy::policy_name"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_name) - 104usize] ; ["Offset of field: starpu_sched_policy::policy_description"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_description) - 112usize] ; ["Offset of field: starpu_sched_policy::worker_type"] [:: std :: mem :: offset_of ! (starpu_sched_policy , worker_type) - 120usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Return an NULL-terminated array of all the predefined\nscheduling policies.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a scheduling policy to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policy (name : * const :: std :: os :: raw :: c_char) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a list of scheduling policies to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the default context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the given context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy () -> * mut starpu_sched_policy ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the job identifier associated with the task.\nSee \\ref TraceSchedTaskDetails for more details."] pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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 impl_mask == NULL to check for at\nleast one implementation without determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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\nimpl_mask == NULL to check for at least one implementation\nwithout determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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. \\p back is ignored: the task priority is\nused to order tasks in this queue.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions.\nSee \\ref PerformanceModelExample for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions).\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds on a given architecture \\p arch using given implementation \\p nimpl.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_length() but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_length (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the durations using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the durations.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } unsafe extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return expected energy use in J.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_energy but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_energy (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task energy use in J, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the energy uses using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the energy uses.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only).\nSee \\ref SchedulingHelpers for more details."] 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) > ; unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "The scheduling policy should call this when it makes a scheduling decision\nfor a task. This will possibly stop execution at this point, and then the\nprogrammer can inspect local variables etc. to determine why this scheduling\ndecision was done.\n\nSee \\ref STARPU_TASK_BREAK_ON_SCHED\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_task_break (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n- ::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
\n- ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n
\n- ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n
\n- ::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
\n
\nSee \\ref CreatingAContext for more details."] 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto.\nSee \\ref SubmittingTasksToAContext and \\ref TmpCTXS for more details."] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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.\nSee \\ref EmptyingAContext for more details."] pub fn starpu_sched_ctx_stop_task_submission () ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the function associated with the scheduler context \\p\nsched_ctx_id which was given through the field\nstarpu_conf::sched_policy_callback"] pub fn starpu_sched_ctx_get_sched_policy_callback (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; unsafe extern "C" { # [doc = "Initialize HIPBLAS on every HIPdevice. The\nHIPBLAS library must be initialized prior to any HIPBLAS call. Calling\nstarpu_hipblas_init() will initialize HIPBLAS on every HIP device\ncontrolled by StarPU. This call blocks until HIPBLAS has been properly\ninitialized on every device."] pub fn starpu_hipblas_init () ; } pub type hipblasHandle_t = * mut :: std :: os :: raw :: c_void ; unsafe extern "C" { # [doc = "Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It\nis properly initialized and configured for multistream by\nstarpu_hipblas_init()."] pub fn starpu_hipblas_get_local_handle () -> hipblasHandle_t ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the HIPBLAS library on\nevery HIP device."] pub fn starpu_hipblas_shutdown () ; } unsafe 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. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_init () ; } unsafe 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().\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_set_stream () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device.\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_shutdown () ; } unsafe extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_init () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_shutdown () ; } unsafe extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Stop recording tasks\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_stop () ; } unsafe extern "C" { # [doc = "Emit the DAG that was recorded on \\p output.\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } unsafe 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. \\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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_lp (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_mps (output : * mut FILE) ; } unsafe 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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a pointer value seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_ptr (input : * mut :: std :: os :: raw :: c_void , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc current\nstate. The return value should be considered as the new current\nstate for future CRC computation. This is used for computing data\nsize footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] 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 , # [doc = " PAPI Events"] pub papi_values : [:: std :: os :: raw :: c_longlong ; 15usize] , pub papi_event_set : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_task_info"] [:: std :: mem :: size_of :: < starpu_profiling_task_info > () - 368usize] ; ["Alignment of starpu_profiling_task_info"] [:: std :: mem :: align_of :: < starpu_profiling_task_info > () - 8usize] ; ["Offset of field: starpu_profiling_task_info::submit_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , submit_time) - 0usize] ; ["Offset of field: starpu_profiling_task_info::push_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_start_time) - 16usize] ; ["Offset of field: starpu_profiling_task_info::push_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_end_time) - 32usize] ; ["Offset of field: starpu_profiling_task_info::pop_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_start_time) - 48usize] ; ["Offset of field: starpu_profiling_task_info::pop_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_end_time) - 64usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_start_time) - 80usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_end_time) - 96usize] ; ["Offset of field: starpu_profiling_task_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , start_time) - 112usize] ; ["Offset of field: starpu_profiling_task_info::end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , end_time) - 128usize] ; ["Offset of field: starpu_profiling_task_info::release_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_start_time) - 144usize] ; ["Offset of field: starpu_profiling_task_info::release_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_end_time) - 160usize] ; ["Offset of field: starpu_profiling_task_info::callback_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_start_time) - 176usize] ; ["Offset of field: starpu_profiling_task_info::callback_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_end_time) - 192usize] ; ["Offset of field: starpu_profiling_task_info::workerid"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , workerid) - 208usize] ; ["Offset of field: starpu_profiling_task_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , used_cycles) - 216usize] ; ["Offset of field: starpu_profiling_task_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , stall_cycles) - 224usize] ; ["Offset of field: starpu_profiling_task_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , energy_consumed) - 232usize] ; ["Offset of field: starpu_profiling_task_info::papi_values"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_values) - 240usize] ; ["Offset of field: starpu_profiling_task_info::papi_event_set"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_event_set) - 360usize] ; } ; 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: {:?}, papi_values: {:?}, papi_event_set: {:?} }}" , self . workerid , self . energy_consumed , self . papi_values , self . papi_event_set) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info().\n\nThe executing_time, callback_time, waiting_time, sleeping_time, and\nscheduling_time are exclusive to each other, i.e. they can be added up, their\nsum is smaller than total_time. The difference between total_time and the sum\nis the uncategorized runtime overhead."] # [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 by the worker to execute callbacks, while not executing a\n task, during the profiling measurement interval."] pub callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish,\n while not executing a task or a callback, during the profiling\n measurement interval."] pub waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available, and\n not executing a task or a callback or waiting for a data transfer to\n finish, during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks, while not executing a\n task or a callback or waiting for a data transfer to finish, and there\n are tasks to be scheduled, during the profiling measurement interval."] pub scheduling_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval.\n Normally always equal to executing_time."] pub all_executing_time : timespec , # [doc = " Time spent by the worker to execute callbacks during the profiling measurement interval.\n Normally always greater than callback_time."] pub all_callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval.\n Normally always greater than waiting_time."] pub all_waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available during the profiling measurement interval.\n Normally always greater than sleeping_time."] pub all_sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks during the profiling measurement interval.\n Normally always greater than scheduling_time."] pub all_scheduling_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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_worker_info"] [:: std :: mem :: size_of :: < starpu_profiling_worker_info > () - 232usize] ; ["Alignment of starpu_profiling_worker_info"] [:: std :: mem :: align_of :: < starpu_profiling_worker_info > () - 8usize] ; ["Offset of field: starpu_profiling_worker_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_worker_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_worker_info::executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executing_time) - 32usize] ; ["Offset of field: starpu_profiling_worker_info::callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , callback_time) - 48usize] ; ["Offset of field: starpu_profiling_worker_info::waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , waiting_time) - 64usize] ; ["Offset of field: starpu_profiling_worker_info::sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , sleeping_time) - 80usize] ; ["Offset of field: starpu_profiling_worker_info::scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , scheduling_time) - 96usize] ; ["Offset of field: starpu_profiling_worker_info::all_executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_executing_time) - 112usize] ; ["Offset of field: starpu_profiling_worker_info::all_callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_callback_time) - 128usize] ; ["Offset of field: starpu_profiling_worker_info::all_waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_waiting_time) - 144usize] ; ["Offset of field: starpu_profiling_worker_info::all_sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_sleeping_time) - 160usize] ; ["Offset of field: starpu_profiling_worker_info::all_scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_scheduling_time) - 176usize] ; ["Offset of field: starpu_profiling_worker_info::executed_tasks"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executed_tasks) - 192usize] ; ["Offset of field: starpu_profiling_worker_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , used_cycles) - 200usize] ; ["Offset of field: starpu_profiling_worker_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , stall_cycles) - 208usize] ; ["Offset of field: starpu_profiling_worker_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , energy_consumed) - 216usize] ; ["Offset of field: starpu_profiling_worker_info::flops"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , flops) - 224usize] ; } ; 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) } } # [doc = "todo"] # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_bus_info"] [:: std :: mem :: size_of :: < starpu_profiling_bus_info > () - 48usize] ; ["Alignment of starpu_profiling_bus_info"] [:: std :: mem :: align_of :: < starpu_profiling_bus_info > () - 8usize] ; ["Offset of field: starpu_profiling_bus_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_bus_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_bus_info::transferred_bytes"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transferred_bytes) - 32usize] ; ["Offset of field: starpu_profiling_bus_info::transfer_count"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transfer_count) - 40usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_init () ; } unsafe extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init().\nSee \\ref TraceMpi for more details."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } unsafe 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 NULL, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned.\nSee \\ref Per-workerFeedback for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of buses in the machine.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the source point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the destination point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref FeedBackFigures for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } unsafe extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_bus_helper_display_summary () ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_worker_helper_display_summary () ; } unsafe 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).\nSee \\ref MemoryFeedback for more details."] pub fn starpu_data_display_memory_stats () ; } pub const starpu_prof_tool_event_none : starpu_prof_tool_event = 0 ; pub const starpu_prof_tool_event_init : starpu_prof_tool_event = 1 ; pub const starpu_prof_tool_event_terminate : starpu_prof_tool_event = 2 ; pub const starpu_prof_tool_event_init_begin : starpu_prof_tool_event = 3 ; pub const starpu_prof_tool_event_init_end : starpu_prof_tool_event = 4 ; pub const starpu_prof_tool_event_driver_init : starpu_prof_tool_event = 5 ; pub const starpu_prof_tool_event_driver_deinit : starpu_prof_tool_event = 6 ; pub const starpu_prof_tool_event_driver_init_start : starpu_prof_tool_event = 7 ; pub const starpu_prof_tool_event_driver_init_end : starpu_prof_tool_event = 8 ; pub const starpu_prof_tool_event_start_cpu_exec : starpu_prof_tool_event = 9 ; pub const starpu_prof_tool_event_end_cpu_exec : starpu_prof_tool_event = 10 ; pub const starpu_prof_tool_event_start_gpu_exec : starpu_prof_tool_event = 11 ; pub const starpu_prof_tool_event_end_gpu_exec : starpu_prof_tool_event = 12 ; pub const starpu_prof_tool_event_start_transfer : starpu_prof_tool_event = 13 ; pub const starpu_prof_tool_event_end_transfer : starpu_prof_tool_event = 14 ; pub const starpu_prof_tool_event_user_start : starpu_prof_tool_event = 15 ; pub const starpu_prof_tool_event_user_end : starpu_prof_tool_event = 16 ; # [doc = "Event type"] pub type starpu_prof_tool_event = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_driver_cpu : starpu_prof_tool_driver_type = 0 ; pub const starpu_prof_tool_driver_gpu : starpu_prof_tool_driver_type = 1 ; pub const starpu_prof_tool_driver_hip : starpu_prof_tool_driver_type = 2 ; pub const starpu_prof_tool_driver_ocl : starpu_prof_tool_driver_type = 3 ; # [doc = "todo"] pub type starpu_prof_tool_driver_type = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_command_reg : starpu_prof_tool_command = 0 ; pub const starpu_prof_tool_command_toggle : starpu_prof_tool_command = 1 ; pub const starpu_prof_tool_command_toggle_per_thread : starpu_prof_tool_command = 2 ; # [doc = "todo"] pub type starpu_prof_tool_command = :: std :: os :: raw :: c_uint ; # [doc = "General information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_prof_tool_info { pub conf : * mut starpu_conf , pub event_type : starpu_prof_tool_event , pub starpu_version : [:: std :: os :: raw :: c_uint ; 3usize] , pub thread_id : :: std :: os :: raw :: c_int , pub worker_id : :: std :: os :: raw :: c_int , pub device_number : :: std :: os :: raw :: c_int , pub driver_type : starpu_prof_tool_driver_type , pub memnode : :: std :: os :: raw :: c_uint , pub bytes_to_transfer : :: std :: os :: raw :: c_uint , pub bytes_transfered : :: std :: os :: raw :: c_uint , pub fun_ptr : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_info > () - 64usize] ; ["Alignment of starpu_prof_tool_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_info > () - 8usize] ; ["Offset of field: starpu_prof_tool_info::conf"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , conf) - 0usize] ; ["Offset of field: starpu_prof_tool_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , event_type) - 8usize] ; ["Offset of field: starpu_prof_tool_info::starpu_version"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , starpu_version) - 12usize] ; ["Offset of field: starpu_prof_tool_info::thread_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , thread_id) - 24usize] ; ["Offset of field: starpu_prof_tool_info::worker_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , worker_id) - 28usize] ; ["Offset of field: starpu_prof_tool_info::device_number"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , device_number) - 32usize] ; ["Offset of field: starpu_prof_tool_info::driver_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , driver_type) - 36usize] ; ["Offset of field: starpu_prof_tool_info::memnode"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , memnode) - 40usize] ; ["Offset of field: starpu_prof_tool_info::bytes_to_transfer"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_to_transfer) - 44usize] ; ["Offset of field: starpu_prof_tool_info::bytes_transfered"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_transfered) - 48usize] ; ["Offset of field: starpu_prof_tool_info::fun_ptr"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , fun_ptr) - 56usize] ; } ; impl Default for starpu_prof_tool_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 () } } } # [doc = "Event info"] # [repr (C)] # [derive (Copy , Clone)] pub union starpu_prof_tool_event_info { pub event_type : starpu_prof_tool_event , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_event_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Alignment of starpu_prof_tool_event_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Offset of field: starpu_prof_tool_event_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_event_info , event_type) - 0usize] ; } ; impl Default for starpu_prof_tool_event_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_prof_tool_event_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_prof_tool_event_info {{ union }}") } } # [doc = "API info"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_prof_tool_api_info { } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_api_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_api_info > () - 0usize] ; ["Alignment of starpu_prof_tool_api_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_api_info > () - 1usize] ; } ; pub type starpu_prof_tool_cb_func = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_prof_tool_info , arg2 : * mut starpu_prof_tool_event_info , arg3 : * mut starpu_prof_tool_api_info) > ; # [doc = "Register / unregister events"] pub type starpu_prof_tool_entry_register_func = :: std :: option :: Option < unsafe extern "C" fn (event_type : starpu_prof_tool_event , cb : starpu_prof_tool_cb_func , info : starpu_prof_tool_command) > ; # [doc = "A function with this signature must be implemented by external tools that want to use the callbacks"] pub type starpu_prof_tool_entry_func = :: std :: option :: Option < unsafe extern "C" fn (reg : starpu_prof_tool_entry_register_func , unreg : starpu_prof_tool_entry_register_func) > ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 2048usize] , 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_codelet_event"] [:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () - 2328usize] ; ["Alignment of starpu_fxt_codelet_event"] [:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () - 8usize] ; ["Offset of field: starpu_fxt_codelet_event::symbol"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , symbol) - 0usize] ; ["Offset of field: starpu_fxt_codelet_event::workerid"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , workerid) - 2048usize] ; ["Offset of field: starpu_fxt_codelet_event::perfmodel_archname"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , perfmodel_archname) - 2052usize] ; ["Offset of field: starpu_fxt_codelet_event::hash"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , hash) - 2308usize] ; ["Offset of field: starpu_fxt_codelet_event::size"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , size) - 2312usize] ; ["Offset of field: starpu_fxt_codelet_event::time"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , time) - 2320usize] ; } ; 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 () } } } # [doc = "Store information related to clock synchronizations: mainly the offset to apply to each time."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_fxt_mpi_offset { # [doc = "< node time for the barrier at the beginning of the program"] pub local_time_start : u64 , # [doc = "< offset to apply to node time, computed at the beginning of the program"] pub offset_start : i64 , # [doc = "< node time for the barrier at the end of the program (optional)"] pub local_time_end : u64 , # [doc = "< offset to apply to node time, computed at the end of the program (optional)"] pub offset_end : i64 , # [doc = "< number of barriers to synchronize clocks during the execution of the program\n(can be 0, 1 or 2)"] pub nb_barriers : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_mpi_offset"] [:: std :: mem :: size_of :: < starpu_fxt_mpi_offset > () - 40usize] ; ["Alignment of starpu_fxt_mpi_offset"] [:: std :: mem :: align_of :: < starpu_fxt_mpi_offset > () - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_start) - 0usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_start) - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_end) - 16usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_end) - 24usize] ; ["Offset of field: starpu_fxt_mpi_offset::nb_barriers"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , nb_barriers) - 32usize] ; } ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 sched_tasks_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 papi_path : * mut :: std :: os :: raw :: c_char , pub comms_path : * mut :: std :: os :: raw :: c_char , pub number_events_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 , pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 48usize] , pub nworkers : :: std :: os :: raw :: c_int , pub worker_archtypes : [starpu_perfmodel_arch ; 48usize] , # [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 synchronize clocks and apply an offset."] pub file_offset : starpu_fxt_mpi_offset , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), this variable stores the MPI rank of the trace file."] pub file_rank : :: 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, number\nof dumped codelets."] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_options"] [:: std :: mem :: size_of :: < starpu_fxt_options > () - 13800usize] ; ["Alignment of starpu_fxt_options"] [:: std :: mem :: align_of :: < starpu_fxt_options > () - 8usize] ; ["Offset of field: starpu_fxt_options::per_task_colour"] [:: std :: mem :: offset_of ! (starpu_fxt_options , per_task_colour) - 0usize] ; ["Offset of field: starpu_fxt_options::no_events"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_events) - 4usize] ; ["Offset of field: starpu_fxt_options::no_counter"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_counter) - 8usize] ; ["Offset of field: starpu_fxt_options::no_bus"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_bus) - 12usize] ; ["Offset of field: starpu_fxt_options::no_flops"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_flops) - 16usize] ; ["Offset of field: starpu_fxt_options::ninputfiles"] [:: std :: mem :: offset_of ! (starpu_fxt_options , ninputfiles) - 20usize] ; ["Offset of field: starpu_fxt_options::no_smooth"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_smooth) - 24usize] ; ["Offset of field: starpu_fxt_options::no_acquire"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_acquire) - 28usize] ; ["Offset of field: starpu_fxt_options::memory_states"] [:: std :: mem :: offset_of ! (starpu_fxt_options , memory_states) - 32usize] ; ["Offset of field: starpu_fxt_options::internal"] [:: std :: mem :: offset_of ! (starpu_fxt_options , internal) - 36usize] ; ["Offset of field: starpu_fxt_options::label_deps"] [:: std :: mem :: offset_of ! (starpu_fxt_options , label_deps) - 40usize] ; ["Offset of field: starpu_fxt_options::filenames"] [:: std :: mem :: offset_of ! (starpu_fxt_options , filenames) - 48usize] ; ["Offset of field: starpu_fxt_options::out_paje_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , out_paje_path) - 560usize] ; ["Offset of field: starpu_fxt_options::distrib_time_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , distrib_time_path) - 568usize] ; ["Offset of field: starpu_fxt_options::activity_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , activity_path) - 576usize] ; ["Offset of field: starpu_fxt_options::sched_tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , sched_tasks_path) - 584usize] ; ["Offset of field: starpu_fxt_options::dag_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dag_path) - 592usize] ; ["Offset of field: starpu_fxt_options::tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , tasks_path) - 600usize] ; ["Offset of field: starpu_fxt_options::data_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , data_path) - 608usize] ; ["Offset of field: starpu_fxt_options::papi_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , papi_path) - 616usize] ; ["Offset of field: starpu_fxt_options::comms_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , comms_path) - 624usize] ; ["Offset of field: starpu_fxt_options::number_events_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , number_events_path) - 632usize] ; ["Offset of field: starpu_fxt_options::anim_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , anim_path) - 640usize] ; ["Offset of field: starpu_fxt_options::states_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , states_path) - 648usize] ; ["Offset of field: starpu_fxt_options::dir"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dir) - 656usize] ; ["Offset of field: starpu_fxt_options::worker_names"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_names) - 664usize] ; ["Offset of field: starpu_fxt_options::nworkers"] [:: std :: mem :: offset_of ! (starpu_fxt_options , nworkers) - 12952usize] ; ["Offset of field: starpu_fxt_options::worker_archtypes"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_archtypes) - 12960usize] ; ["Offset of field: starpu_fxt_options::file_prefix"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_prefix) - 13728usize] ; ["Offset of field: starpu_fxt_options::file_offset"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_offset) - 13736usize] ; ["Offset of field: starpu_fxt_options::file_rank"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_rank) - 13776usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets) - 13784usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets_count"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets_count) - 13792usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } unsafe 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.\nThis function has to be called before starpu_init().\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_start_profiling () ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_stop_profiling () ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace_in_dir (filename_in : * mut :: std :: os :: raw :: c_char , dir : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } unsafe extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Pre-initialize drivers\nSo as to register information on device types, memory types, etc.\nOnly use internally by StarPU."] pub fn starpu_drivers_preinit () ; } # [doc = "structure for designating a given driver. See \\ref UsingTheDriverAPI for more details."] # [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 hip_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver__bindgen_ty_1"] [:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Alignment of starpu_driver__bindgen_ty_1"] [:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cpu_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cpu_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cuda_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cuda_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::hip_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , hip_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::opencl_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , opencl_id) - 0usize] ; } ; 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 }}") } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver"] [:: std :: mem :: size_of :: < starpu_driver > () - 16usize] ; ["Alignment of starpu_driver"] [:: std :: mem :: align_of :: < starpu_driver > () - 8usize] ; ["Offset of field: starpu_driver::type_"] [:: std :: mem :: offset_of ! (starpu_driver , type_) - 0usize] ; ["Offset of field: starpu_driver::id"] [:: std :: mem :: offset_of ! (starpu_driver , id) - 8usize] ; } ; 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) } } unsafe 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-EINVAL 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().\n\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Notify all running drivers that they should terminate.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_drivers_request_termination () ; } unsafe extern "C" { # [doc = "Initialize the given driver. Return 0 on success, -EINVAL\nif starpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Run the driver once, then return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tree"] [:: std :: mem :: size_of :: < starpu_tree > () - 32usize] ; ["Alignment of starpu_tree"] [:: std :: mem :: align_of :: < starpu_tree > () - 8usize] ; ["Offset of field: starpu_tree::nodes"] [:: std :: mem :: offset_of ! (starpu_tree , nodes) - 0usize] ; ["Offset of field: starpu_tree::father"] [:: std :: mem :: offset_of ! (starpu_tree , father) - 8usize] ; ["Offset of field: starpu_tree::arity"] [:: std :: mem :: offset_of ! (starpu_tree , arity) - 16usize] ; ["Offset of field: starpu_tree::id"] [:: std :: mem :: offset_of ! (starpu_tree , id) - 20usize] ; ["Offset of field: starpu_tree::level"] [:: std :: mem :: offset_of ! (starpu_tree , level) - 24usize] ; ["Offset of field: starpu_tree::is_pu"] [:: std :: mem :: offset_of ! (starpu_tree , is_pu) - 28usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } unsafe 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 ; } unsafe 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)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_lock_t > () - 8usize] ; ["Alignment of starpu_omp_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_lock_t , internal) - 0usize] ; } ; 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)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_nest_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Alignment of starpu_omp_nest_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_nest_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_nest_lock_t , internal) - 0usize] ; } ; 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 chosen 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)] 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 pragma omp parallel 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_parallel_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () - 872usize] ; ["Alignment of starpu_omp_parallel_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_parallel_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_parallel_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , if_clause) - 860usize] ; ["Offset of field: starpu_omp_parallel_region_attr::num_threads"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , num_threads) - 864usize] ; } ; 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)] 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 pragma omp task is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding pragma omp task is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding pragma omp task is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding pragma omp task 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_task_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () - 936usize] ; ["Alignment of starpu_omp_task_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_task_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_task_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_task_region_attr::priority"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , priority) - 860usize] ; ["Offset of field: starpu_omp_task_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , if_clause) - 864usize] ; ["Offset of field: starpu_omp_task_region_attr::final_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , final_clause) - 868usize] ; ["Offset of field: starpu_omp_task_region_attr::untied_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , untied_clause) - 872usize] ; ["Offset of field: starpu_omp_task_region_attr::mergeable_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , mergeable_clause) - 876usize] ; ["Offset of field: starpu_omp_task_region_attr::is_loop"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , is_loop) - 880usize] ; ["Offset of field: starpu_omp_task_region_attr::nogroup_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nogroup_clause) - 884usize] ; ["Offset of field: starpu_omp_task_region_attr::collapse"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , collapse) - 888usize] ; ["Offset of field: starpu_omp_task_region_attr::num_tasks"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , num_tasks) - 892usize] ; ["Offset of field: starpu_omp_task_region_attr::nb_iterations"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nb_iterations) - 896usize] ; ["Offset of field: starpu_omp_task_region_attr::grainsize"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , grainsize) - 904usize] ; ["Offset of field: starpu_omp_task_region_attr::begin_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , begin_i) - 912usize] ; ["Offset of field: starpu_omp_task_region_attr::end_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , end_i) - 920usize] ; ["Offset of field: starpu_omp_task_region_attr::chunk"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , chunk) - 928usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_shutdown () ; } unsafe 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 \\#pragma omp parallel.\nSee \\ref OMPParallel for more details."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } unsafe 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 \\#pragma omp master.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp master without code\noutlining.\n\\return !0 if called by the region's master thread.\n\\return 0 if not called by the region's master thread.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp barrier.\nSee \\ref OMPBarrier for more details."] pub fn starpu_omp_barrier () ; } unsafe 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 name == NULL, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement \\#pragma omp\ncritical.\n\nSee \\ref OMPCritical for more details."] 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) ; } unsafe 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 name == NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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\nname==NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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(nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp single.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single without code\noutlining.\n\\return !0 if the calling thread has won the election.\n\\return 0 if the calling thread has lost the election.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp single 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\n\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and NULL for\nthe task that won the election. This function can be used to implement\n\\#pragma omp single with a copyprivate clause without code outlining.\n\nReturn the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\nReturn NULL 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\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_end () ; } unsafe 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 \\#pragma omp for 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(ordered==!0) or not (ordered==0). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(nowait==0) or not (nowait==!0).\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 \\#pragma omp for.\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for.\n\n\\sa starpu_omp_for\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp ordered.\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_begin () ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_end () ; } unsafe 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 (nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp sections and \\#pragma omp section.\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp sections and \\#pragma omp section.\n\n\\sa starpu_omp_sections\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp task.\n\nSee \\ref OMPTaskExplicit for more details."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } unsafe 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 \\#pragma omp taskwait.\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskwait () ; } unsafe 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 \\#pragma omp taskgroup.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] 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) ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_begin () ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_end () ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return !0 if called from a parallel region scope.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return !0 if dynamic thread number adjustment is enabled.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_dynamic\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return !0 if nested parallel sections are enabled.\n\\return 0 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the state of the cancel ICVS var.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } unsafe 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 information such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } unsafe 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 1 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return !0 if called from a final task.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } unsafe extern "C" { # [doc = "Return the number of places available to the execution environment in the place list.\n\n\\return the number of places available to the execution environment in the place list.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of processors available to the execution environment in the specified place.\n\n\\return the number of processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the numerical identifiers of the processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the place number of the place to which the encountering thread is bound.\n\n\\return the place number of the place to which the encountering thread is bound.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of places in the place partition of the innermost implicit task.\n\n\\return the number of places in the place partition of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current device is the initial device or not.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a device number that represents the host device.\n\n\\return a device number that represents the host device.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return !0 if called from the host device.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } unsafe extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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 !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 () ; } unsafe 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 () ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtime () -> f64 ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtick () -> f64 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Only use internally by StarPU."] pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } unsafe extern "C" { # [doc = "Register a handle for ptr->handle data lookup.\n\n\\sa starpu_omp_handle_unregister\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_register (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Unregister a handle from ptr->handle data lookup.\n\n\\sa starpu_omp_handle_register\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_unregister (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer.\n\n\\return the handle or \\c NULL if not found.\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_bitmap { pub bits : [:: std :: os :: raw :: c_ulong ; 1usize] , pub cardinal : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bitmap"] [:: std :: mem :: size_of :: < starpu_bitmap > () - 16usize] ; ["Alignment of starpu_bitmap"] [:: std :: mem :: align_of :: < starpu_bitmap > () - 8usize] ; ["Offset of field: starpu_bitmap::bits"] [:: std :: mem :: offset_of ! (starpu_bitmap , bits) - 0usize] ; ["Offset of field: starpu_bitmap::cardinal"] [:: std :: mem :: offset_of ! (starpu_bitmap , cardinal) - 8usize] ; } ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_OPENMP : starpu_parallel_worker_types = 0 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_INTEL_OPENMP_MKL : starpu_parallel_worker_types = 1 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_GNU_OPENMP_MKL : starpu_parallel_worker_types = 2 ; # [doc = "These represent the default available functions to enforce parallel_worker\nuse by the sub-runtime"] pub type starpu_parallel_worker_types = :: std :: os :: raw :: c_uint ; # [doc = "Parallel_Worker configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_parallel_worker_config { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Create parallel_workers on the machine with the given parameters.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_init (parallel_worker_level : hwloc_obj_type_t , ...) -> * mut starpu_parallel_worker_config ; } unsafe extern "C" { # [doc = "Delete the given parallel_workers configuration"] pub fn starpu_parallel_worker_shutdown (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print the given parallel_workers configuration.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_print (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " Prologue functions"] pub fn starpu_parallel_worker_openmp_prologue (arg1 : * mut :: std :: os :: raw :: c_void) ; } # [doc = "< deprecated"] pub const STARPU_CLUSTER_OPENMP : starpu_cluster_types = 0 ; # [doc = "< deprecated"] pub const STARPU_CLUSTER_INTEL_OPENMP_MKL : starpu_cluster_types = 1 ; # [doc = "@deprecated Use ::starpu_parallel_worker_types"] pub type starpu_cluster_types = :: std :: os :: raw :: c_uint ; # [doc = " @deprecated Use starpu_parallel_worker_config"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_cluster_machine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_init()"] pub fn starpu_cluster_machine (cluster_level : hwloc_obj_type_t , ...) -> * mut starpu_cluster_machine ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_shutdown()"] pub fn starpu_uncluster_machine (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_print()"] pub fn starpu_cluster_print (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } # [doc = "< undefined scope"] pub const starpu_perf_counter_scope_undefined : starpu_perf_counter_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_counter_scope_global : starpu_perf_counter_scope = 2 ; # [doc = "< per-worker scope"] pub const starpu_perf_counter_scope_per_worker : starpu_perf_counter_scope = 4 ; # [doc = "< per-codelet scope"] pub const starpu_perf_counter_scope_per_codelet : starpu_perf_counter_scope = 6 ; # [doc = "Enum of all possible performance counter scopes."] pub type starpu_perf_counter_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_counter_type_undefined : starpu_perf_counter_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_counter_type_int32 : starpu_perf_counter_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_counter_type_int64 : starpu_perf_counter_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_counter_type_float : starpu_perf_counter_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_counter_type_double : starpu_perf_counter_type = 4 ; # [doc = "Enum of all possible performance counter value type."] pub type starpu_perf_counter_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_listener { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_sample { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_set { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Start collecting performance counter values."] pub fn starpu_perf_counter_collection_start () ; } unsafe extern "C" { # [doc = "Stop collecting performance counter values."] pub fn starpu_perf_counter_collection_stop () ; } unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_counter_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_counter_scope_id_to_name (scope : starpu_perf_counter_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_counter_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_counter_type_id_to_name (type_ : starpu_perf_counter_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance counters for the given scope."] pub fn starpu_perf_counter_nb (scope : starpu_perf_counter_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter name to its id."] pub fn starpu_perf_counter_name_to_id (scope : starpu_perf_counter_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter rank in its scope to its counter id."] pub fn starpu_perf_counter_nth_to_id (scope : starpu_perf_counter_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a counter id to its name constant string."] pub fn starpu_perf_counter_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the counter's type id."] pub fn starpu_perf_counter_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the counter's help string."] pub fn starpu_perf_counter_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of counters defined in the given scope."] pub fn starpu_perf_counter_list_avail (scope : starpu_perf_counter_scope) ; } unsafe extern "C" { # [doc = "Display the list of counters defined in all scopes."] pub fn starpu_perf_counter_list_all_avail () ; } unsafe extern "C" { # [doc = "Allocate a new performance counter set."] pub fn starpu_perf_counter_set_alloc (scope : starpu_perf_counter_scope) -> * mut starpu_perf_counter_set ; } unsafe extern "C" { # [doc = "Free a performance counter set."] pub fn starpu_perf_counter_set_free (set : * mut starpu_perf_counter_set) ; } unsafe extern "C" { # [doc = "Enable a given counter in the set."] pub fn starpu_perf_counter_set_enable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Disable a given counter in the set."] pub fn starpu_perf_counter_set_disable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Initialize a new performance counter listener."] pub fn starpu_perf_counter_listener_init (set : * mut starpu_perf_counter_set , callback : :: std :: option :: Option < unsafe extern "C" fn (listener : * mut starpu_perf_counter_listener , sample : * mut starpu_perf_counter_sample , context : * mut :: std :: os :: raw :: c_void) > , user_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_perf_counter_listener ; } unsafe extern "C" { # [doc = "End a performance counter listener."] pub fn starpu_perf_counter_listener_exit (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the global scope."] pub fn starpu_perf_counter_set_global_listener (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the per_worker scope on a given worker."] pub fn starpu_perf_counter_set_per_worker_listener (workerid : :: std :: os :: raw :: c_uint , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a common listener for all workers."] pub fn starpu_perf_counter_set_all_per_worker_listeners (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a per_codelet listener for a codelet."] pub fn starpu_perf_counter_set_per_codelet_listener (cl : * mut starpu_codelet , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Unset the global listener."] pub fn starpu_perf_counter_unset_global_listener () ; } unsafe extern "C" { # [doc = "Unset the per_worker listener."] pub fn starpu_perf_counter_unset_per_worker_listener (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Unset all per_worker listeners."] pub fn starpu_perf_counter_unset_all_per_worker_listeners () ; } unsafe extern "C" { # [doc = "Unset a per_codelet listener."] pub fn starpu_perf_counter_unset_per_codelet_listener (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Read an int32 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int32_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Read an int64 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int64_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Read a float counter value from a sample."] pub fn starpu_perf_counter_sample_get_float_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Read a double counter value from a sample."] pub fn starpu_perf_counter_sample_get_double_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f64 ; } # [doc = "< undefined scope"] pub const starpu_perf_knob_scope_undefined : starpu_perf_knob_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_knob_scope_global : starpu_perf_knob_scope = 1 ; # [doc = "< per-worker scope"] pub const starpu_perf_knob_scope_per_worker : starpu_perf_knob_scope = 3 ; # [doc = "< per-scheduler scope"] pub const starpu_perf_knob_scope_per_scheduler : starpu_perf_knob_scope = 5 ; # [doc = "Enum of all possible performance knob scopes."] pub type starpu_perf_knob_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_knob_type_undefined : starpu_perf_knob_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_knob_type_int32 : starpu_perf_knob_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_knob_type_int64 : starpu_perf_knob_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_knob_type_float : starpu_perf_knob_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_knob_type_double : starpu_perf_knob_type = 4 ; # [doc = "Enum of all possible performance knob value type."] pub type starpu_perf_knob_type = :: std :: os :: raw :: c_uint ; unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_knob_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_knob_scope_id_to_name (scope : starpu_perf_knob_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_knob_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_knob_type_id_to_name (type_ : starpu_perf_knob_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance steering knobs for the given scope."] pub fn starpu_perf_knob_nb (scope : starpu_perf_knob_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_name_to_id (scope : starpu_perf_knob_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_nth_to_id (scope : starpu_perf_knob_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob rank in its scope to its knob id."] pub fn starpu_perf_knob_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate a knob id to its name constant string."] pub fn starpu_perf_knob_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the knob's help string."] pub fn starpu_perf_knob_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in the given scope."] pub fn starpu_perf_knob_list_avail (scope : starpu_perf_knob_scope) ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in all scopes."] pub fn starpu_perf_knob_list_all_avail () ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int32_value (knob_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int64_value (knob_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_float_value (knob_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_double_value (knob_id : :: std :: os :: raw :: c_int) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int32_value (knob_id : :: std :: os :: raw :: c_int , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int64_value (knob_id : :: std :: os :: raw :: c_int , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float knob value for Global scope."] pub fn starpu_perf_knob_set_global_float_value (knob_id : :: std :: os :: raw :: c_int , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double knob value for Global scope."] pub fn starpu_perf_knob_set_global_double_value (knob_id : :: std :: os :: raw :: c_int , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f64) ; } # [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 unless\nstarpu_conf::precedence_over_environment_variables is set."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 =\nNULL)."] 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 = NULL)"] pub sched_policy : * mut starpu_sched_policy , # [doc = "Callback function that can later be used by the scheduler.\nThe scheduler can retrieve this function by calling\nstarpu_sched_ctx_get_sched_policy_callback()"] pub sched_policy_callback : :: 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 = \\c -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 = \\c -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of HIP devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NHIP.\n(default = \\c -1)"] pub nhip : :: 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 = \\c -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of Maxeler FPGA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NMAX_FPGA.\n(default = -1)"] pub nmax_fpga : :: 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 = \\c -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "Number of TCP/IP Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NTCPIP_MS.\n(default = \\c -1)"] pub ntcpip_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 = \\c 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 \\c hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the HIP workers will be attached to\nthe HIP devices specified in the\nstarpu_conf::workers_hip_gpuid array. Otherwise, StarPU\naffects the HIP devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_HIPID.\n(default = \\c 0)"] pub use_explicit_workers_hip_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_hip_gpuid flag is\nset, this array contains the logical identifiers of the\nHIP devices (as used by \\c hipGetDevice())."] pub workers_hip_gpuid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the Maxeler FPGA workers will be attached to\nthe Maxeler FPGA devices specified in the\nstarpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU\naffects the Maxeler FPGA devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_MAX_FPGAID.\n(default = 0)"] pub use_explicit_workers_max_fpga_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag\nis set, this array contains the logical identifiers of the\nMaxeler FPGA devices to be used."] pub workers_max_fpga_deviceid : [:: std :: os :: raw :: c_uint ; 48usize] , pub max_fpga_load : * mut :: std :: os :: raw :: c_void , # [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 = \\c 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 ; 48usize] , # [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 = \\c 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 = \\c 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to enforce data locality when\nchoosing a worker to execute a task.\nThis can also be specified with the environment variable\n\\ref STARPU_DATA_LOCALITY_ENFORCE.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\nenable-data-locality-enforce \"--enable-data-locality-enforce\".\n(default = \\c 0)"] pub data_locality_enforce : :: 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 = \\c 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [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 = \\c 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 = \\c 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 HIP accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-hip-copy\n\"--disable-asynchronous-hip-copy\".\n(default = \\c 0)"] pub disable_asynchronous_hip_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 = \\c 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 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 = \\c 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and TCP/IP Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-tcpip-master-slave-copy\n\"--disable-asynchronous-tcpip-master-slave-copy\".\n(default = \\c 0)."] pub disable_asynchronous_tcpip_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and Maxeler FPGA devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-fpga-copy\n\"--disable-asynchronous-fpga-copy\".\n(default = 0)."] pub disable_asynchronous_max_fpga_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable memory mapping\nsupport between memory nodes. This can also be specified\nwith the environment variable \\ref STARPU_ENABLE_MAP."] pub enable_map : :: 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 = NULL)"] 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 = NULL)"] 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 = \\c 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 , # [doc = "Set the minimum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MIN_PRIO"] pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , # [doc = "Set the maximum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MAX_PRIO"] pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch \\c SIGINT, \\c SIGSEGV and \\c 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 caught. 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 = "Specify whether StarPU should automatically start to collect\nperformance counters after initialization"] pub start_perf_counter_collection : :: std :: os :: raw :: c_uint , # [doc = "Minimum spinning backoff of drivers (default = \\c 1)"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. (default = \\c 32)"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , # [doc = "Specify if CUDA workers should do only fast allocations\nwhen running the datawizard progress of\nother memory nodes. This will pass the interval value\n_STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.\nDefault value is 0, allowing CUDA workers to do slow\nallocations.\nThis can also be specified with the environment variable\n\\ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES."] pub cuda_only_fast_alloc_other_memnodes : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_conf"] [:: std :: mem :: size_of :: < starpu_conf > () - 1376usize] ; ["Alignment of starpu_conf"] [:: std :: mem :: align_of :: < starpu_conf > () - 8usize] ; ["Offset of field: starpu_conf::magic"] [:: std :: mem :: offset_of ! (starpu_conf , magic) - 0usize] ; ["Offset of field: starpu_conf::will_use_mpi"] [:: std :: mem :: offset_of ! (starpu_conf , will_use_mpi) - 4usize] ; ["Offset of field: starpu_conf::sched_policy_name"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_name) - 8usize] ; ["Offset of field: starpu_conf::sched_policy"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy) - 16usize] ; ["Offset of field: starpu_conf::sched_policy_callback"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_callback) - 24usize] ; ["Offset of field: starpu_conf::precedence_over_environment_variables"] [:: std :: mem :: offset_of ! (starpu_conf , precedence_over_environment_variables) - 32usize] ; ["Offset of field: starpu_conf::ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , ncpus) - 36usize] ; ["Offset of field: starpu_conf::reserve_ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , reserve_ncpus) - 40usize] ; ["Offset of field: starpu_conf::ncuda"] [:: std :: mem :: offset_of ! (starpu_conf , ncuda) - 44usize] ; ["Offset of field: starpu_conf::nhip"] [:: std :: mem :: offset_of ! (starpu_conf , nhip) - 48usize] ; ["Offset of field: starpu_conf::nopencl"] [:: std :: mem :: offset_of ! (starpu_conf , nopencl) - 52usize] ; ["Offset of field: starpu_conf::nmax_fpga"] [:: std :: mem :: offset_of ! (starpu_conf , nmax_fpga) - 56usize] ; ["Offset of field: starpu_conf::nmpi_ms"] [:: std :: mem :: offset_of ! (starpu_conf , nmpi_ms) - 60usize] ; ["Offset of field: starpu_conf::ntcpip_ms"] [:: std :: mem :: offset_of ! (starpu_conf , ntcpip_ms) - 64usize] ; ["Offset of field: starpu_conf::use_explicit_workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_bindid) - 68usize] ; ["Offset of field: starpu_conf::workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_bindid) - 72usize] ; ["Offset of field: starpu_conf::use_explicit_workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_cuda_gpuid) - 264usize] ; ["Offset of field: starpu_conf::workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_cuda_gpuid) - 268usize] ; ["Offset of field: starpu_conf::use_explicit_workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_hip_gpuid) - 460usize] ; ["Offset of field: starpu_conf::workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_hip_gpuid) - 464usize] ; ["Offset of field: starpu_conf::use_explicit_workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_opencl_gpuid) - 656usize] ; ["Offset of field: starpu_conf::workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_opencl_gpuid) - 660usize] ; ["Offset of field: starpu_conf::use_explicit_workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_max_fpga_deviceid) - 852usize] ; ["Offset of field: starpu_conf::workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_max_fpga_deviceid) - 856usize] ; ["Offset of field: starpu_conf::max_fpga_load"] [:: std :: mem :: offset_of ! (starpu_conf , max_fpga_load) - 1048usize] ; ["Offset of field: starpu_conf::use_explicit_workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_mpi_ms_deviceid) - 1056usize] ; ["Offset of field: starpu_conf::workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_mpi_ms_deviceid) - 1060usize] ; ["Offset of field: starpu_conf::bus_calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , bus_calibrate) - 1252usize] ; ["Offset of field: starpu_conf::calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , calibrate) - 1256usize] ; ["Offset of field: starpu_conf::data_locality_enforce"] [:: std :: mem :: offset_of ! (starpu_conf , data_locality_enforce) - 1260usize] ; ["Offset of field: starpu_conf::single_combined_worker"] [:: std :: mem :: offset_of ! (starpu_conf , single_combined_worker) - 1264usize] ; ["Offset of field: starpu_conf::disable_asynchronous_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_copy) - 1268usize] ; ["Offset of field: starpu_conf::disable_asynchronous_cuda_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_cuda_copy) - 1272usize] ; ["Offset of field: starpu_conf::disable_asynchronous_hip_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_hip_copy) - 1276usize] ; ["Offset of field: starpu_conf::disable_asynchronous_opencl_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_opencl_copy) - 1280usize] ; ["Offset of field: starpu_conf::disable_asynchronous_mpi_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_mpi_ms_copy) - 1284usize] ; ["Offset of field: starpu_conf::disable_asynchronous_tcpip_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_tcpip_ms_copy) - 1288usize] ; ["Offset of field: starpu_conf::disable_asynchronous_max_fpga_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_max_fpga_copy) - 1292usize] ; ["Offset of field: starpu_conf::enable_map"] [:: std :: mem :: offset_of ! (starpu_conf , enable_map) - 1296usize] ; ["Offset of field: starpu_conf::cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_opengl_interoperability) - 1304usize] ; ["Offset of field: starpu_conf::n_cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , n_cuda_opengl_interoperability) - 1312usize] ; ["Offset of field: starpu_conf::not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , not_launched_drivers) - 1320usize] ; ["Offset of field: starpu_conf::n_not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , n_not_launched_drivers) - 1328usize] ; ["Offset of field: starpu_conf::trace_buffer_size"] [:: std :: mem :: offset_of ! (starpu_conf , trace_buffer_size) - 1336usize] ; ["Offset of field: starpu_conf::global_sched_ctx_min_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_min_priority) - 1344usize] ; ["Offset of field: starpu_conf::global_sched_ctx_max_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_max_priority) - 1348usize] ; ["Offset of field: starpu_conf::catch_signals"] [:: std :: mem :: offset_of ! (starpu_conf , catch_signals) - 1352usize] ; ["Offset of field: starpu_conf::start_perf_counter_collection"] [:: std :: mem :: offset_of ! (starpu_conf , start_perf_counter_collection) - 1356usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_min"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_min) - 1360usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_max"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_max) - 1364usize] ; ["Offset of field: starpu_conf::cuda_only_fast_alloc_other_memnodes"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_only_fast_alloc_other_memnodes) - 1368usize] ; } ; 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 () } } } unsafe 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-EINVAL indicates that the argument was NULL."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Set fields of \\p conf so that no worker is enabled, i.e. set\nstarpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.\n\nThis allows to portably enable only a given type of worker:\n
\n\nstarpu_conf_noworker(&conf);
\nconf.ncpus = -1;\n\n\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_conf_noworker (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe 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-NULL \\p conf. Default configuration is used if \\p conf\nis NULL. Upon successful completion, this function returns\n0. Otherwise, -ENODEV indicates that no worker was available\n(and thus StarPU was not initialized). See \\ref SubmittingATask for more details."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application, which is necessary when running in\nSimgrid mode or MPI Master Slave mode.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram. See \\ref SubmittingATask for more details."] 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 ; } unsafe extern "C" { # [doc = "Return 1 if StarPU is already initialized. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait for starpu_init() call to finish. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_wait_initialized () ; } unsafe 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. See \\ref SubmittingATask for more details."] pub fn starpu_shutdown () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_pause () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_resume () ; } unsafe extern "C" { # [doc = "Return !0 if task processing by workers is currently paused, 0 otherwise.\nSee \\ref StarPUEatsCPUs for more details."] pub fn starpu_is_paused () -> :: std :: os :: raw :: c_int ; } unsafe 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\n::STARPU_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.\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe 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 \\p cpuid does not produce a warning.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Bind the calling thread on the cores corresponding to the \\p workerid .\n\n\\p workerid can be a basic worker or a combined worker.\n\nThis can be used e.g. before initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_worker (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Bind the calling thread back to the core reserved for the main thread.\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_main () ; } unsafe extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_cpu (cpuid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the OS number of a given \\p cpuid\n\nStarPU uses logical numbering (as define by hwloc) all along, but in case\ninteraction is needed with another binding tool that uses numbering as\ndefined by the OS, we need to convert from hwloc logical numbering to hwloc\nphysical numbering."] pub fn starpu_cpu_os_index (cpuid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print a description of the topology on \\p f.\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_topology_print (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled.\nSee \\ref Basic for more details."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled.\nSee \\ref cudaWorkers for more details."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and HIP\naccelerators are disabled.\nSee \\ref hipWorkers for more details."] pub fn starpu_asynchronous_hip_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled.\nSee \\ref openclWorkers for more details."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and Maxeler FPGA\ndevices are disabled.\nSee \\ref maxfpgaWorkers for more details."] pub fn starpu_asynchronous_max_fpga_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled.\nSee \\ref mpimsWorkers for more details."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and TCP/IP Slave\ndevices are disabled.\nSee \\ref tcpipmsWorkers for more details."] pub fn starpu_asynchronous_tcpip_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers with a given kind of memory\nare disabled."] pub fn starpu_asynchronous_copy_disabled_for (kind : starpu_node_kind) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if memory mapping support between memory nodes is\nenabled.\nSee \\ref Basic for more details."] pub fn starpu_map_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call starpu_profiling_bus_helper_display_summary() and\nstarpu_profiling_worker_helper_display_summary().\nSee \\ref DataStatistics for more details."] pub fn starpu_display_stats () ; } unsafe extern "C" { # [doc = "Return as 3 integers the version of StarPU used when running the\napplication.\nSee \\ref ConfigurationAndInitialization for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_perf_counter_sample_cl_values { pub _address : u8 , } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_omp_task { pub _address : u8 , }
[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] fn extract_bit (byte : u8 , index : usize) -> bool { 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 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] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { 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 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] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [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 unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , 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) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; 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 } ; unsafe { Self :: raw_set_bit (this , 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 = 4 ; pub const STARPU_RELEASE_VERSION : u32 = 3 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_USE_TCPIP_MASTER_SLAVE : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_PARALLEL_WORKER : 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_CBLAS_H : 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_PAPI : 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_BOOL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : 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_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_MAXCPUS : u32 = 32 ; pub const STARPU_MAXNUMANODES : u32 = 4 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMAXFPGADEVS : u32 = 12 ; pub const STARPU_MAXHIPDEVS : u32 = 8 ; pub const STARPU_NMAXWORKERS : u32 = 48 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; 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_HAVE_MPI_COMM_CREATE_GROUP : u32 = 1 ; pub const STARPU_USE_FXT : 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_PTHREAD_MUTEX_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_COND_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO : 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 STARPU_PYTHON_HAVE_NUMPY : u32 = 1 ; pub const STARPU_PROF_TOOL : 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_MALLOC_SIMULATION_UNIQUE : u32 = 128 ; pub const STARPU_NOWHERE : u32 = 1 ; 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_HIP_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_SPECIFIC_NODE_LOCAL_OR_CPU : i32 = - 5 ; pub const STARPU_SPECIFIC_NODE_NONE : i32 = - 6 ; 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_TRANSACTION : u32 = 5505024 ; pub const STARPU_TASK_FILE : u32 = 5636096 ; pub const STARPU_TASK_LINE : u32 = 5767168 ; pub const STARPU_EPILOGUE_CALLBACK : u32 = 5898240 ; pub const STARPU_EPILOGUE_CALLBACK_ARG : u32 = 6029312 ; pub const STARPU_BUBBLE_FUNC : u32 = 6160384 ; pub const STARPU_BUBBLE_FUNC_ARG : u32 = 6291456 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC : u32 = 6422528 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC_ARG : u32 = 6553600 ; pub const STARPU_BUBBLE_PARENT : u32 = 6684672 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 6815744 ; 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_PARALLEL_WORKER_MIN_NB : u32 = 131072 ; pub const STARPU_PARALLEL_WORKER_MAX_NB : u32 = 262144 ; pub const STARPU_PARALLEL_WORKER_NB : u32 = 393216 ; pub const STARPU_PARALLEL_WORKER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_PARALLEL_WORKER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_PARALLEL_WORKER_POLICY_NAME : u32 = 786432 ; pub const STARPU_PARALLEL_WORKER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_PARALLEL_WORKER_TYPE : u32 = 1310720 ; pub const STARPU_PARALLEL_WORKER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_PARALLEL_WORKER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_PARALLEL_WORKER_NEW : u32 = 1703936 ; pub const STARPU_PARALLEL_WORKER_NCORES : u32 = 1835008 ; pub const STARPU_CLUSTER_MIN_NB : u32 = 131072 ; pub const STARPU_CLUSTER_MAX_NB : u32 = 262144 ; pub const STARPU_CLUSTER_NB : u32 = 393216 ; pub const STARPU_CLUSTER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_CLUSTER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_CLUSTER_POLICY_NAME : u32 = 786432 ; pub const STARPU_CLUSTER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_CLUSTER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_CLUSTER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_CLUSTER_TYPE : u32 = 1310720 ; pub const STARPU_CLUSTER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_CLUSTER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_CLUSTER_NEW : u32 = 1703936 ; pub const STARPU_CLUSTER_NCORES : u32 = 1835008 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of drand48_data"] [:: std :: mem :: size_of :: < drand48_data > () - 24usize] ; ["Alignment of drand48_data"] [:: std :: mem :: align_of :: < drand48_data > () - 8usize] ; ["Offset of field: drand48_data::__x"] [:: std :: mem :: offset_of ! (drand48_data , __x) - 0usize] ; ["Offset of field: drand48_data::__old_x"] [:: std :: mem :: offset_of ! (drand48_data , __old_x) - 6usize] ; ["Offset of field: drand48_data::__c"] [:: std :: mem :: offset_of ! (drand48_data , __c) - 12usize] ; ["Offset of field: drand48_data::__init"] [:: std :: mem :: offset_of ! (drand48_data , __init) - 14usize] ; ["Offset of field: drand48_data::__a"] [:: std :: mem :: offset_of ! (drand48_data , __a) - 16usize] ; } ; 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_opencl_program"] [:: std :: mem :: size_of :: < starpu_opencl_program > () - 64usize] ; ["Alignment of starpu_opencl_program"] [:: std :: mem :: align_of :: < starpu_opencl_program > () - 8usize] ; ["Offset of field: starpu_opencl_program::programs"] [:: std :: mem :: offset_of ! (starpu_opencl_program , programs) - 0usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current worker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as (size_t size_of_the_argument, cl_mem *\npointer_to_the_argument). 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\n\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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 share/starpu/opencl 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. See \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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$STARPU_HOME/.starpu/opencl/\\.\\.vendor_id_\\_device_id_\\.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a file.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a string.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Unload an OpenCL compiled code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe 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). See \\ref OpenCL-specificOptimizations for more details."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe 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 NULL, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not NULL, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns -EAGAIN if the asynchronous launch was\nsuccessful. It returns 0 if the synchronous copy was successful, or\nfails otherwise.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_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 ; unsafe extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe 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)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_pthread_spinlock_t"] [:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Alignment of starpu_pthread_spinlock_t"] [:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Offset of field: starpu_pthread_spinlock_t::taken"] [:: std :: mem :: offset_of ! (starpu_pthread_spinlock_t , taken) - 0usize] ; } ; unsafe 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 ; } unsafe extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; unsafe extern "C" { pub fn starpu_sem_trywait (sem : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sem_wait (sem : * 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. See \\ref DataInterface for more details."] 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\nNULL pointer, since the value\nof the provided buffer is simply\nignored for now.\n\nSee \\ref ScratchData for more details."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< Reduction mode.\nStarPU will allocate on the fly a per-worker\nbuffer, so that various tasks that access the\nsame data in ::STARPU_REDUX mode can execute\nin parallel. When a task accesses the\ndata without ::STARPU_REDUX, StarPU will\nautomatically reduce the different contributions.\n\nCodelets contributing to these reductions\nwith ::STARPU_REDUX must be registered with\n::STARPU_RW | ::STARPU_COMMUTE access modes.\n\nSee \\ref DataReduction for more details."] 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).\n\nSee \\ref DataCommute for more details."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_task_insert() 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.\n\nTODO add extended description in documentation."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Inter-node reduction only.\nThis is similar to ::STARPU_REDUX, except that\nStarPU will allocate a per-node buffer only,\ni.e. parallelism will be achieved between\nnodes, but not within each node. This is\nuseful when the per-worker buffers allocated\nwith ::STARPU_REDUX consume too much memory.\n\nSee \\ref MPIMpiRedux for more details."] pub const STARPU_MPI_REDUX : starpu_data_access_mode = 128 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning, only use internally by StarPU"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< Request unmapping the destination replicate, only use internally by StarPU"] pub const STARPU_UNMAP : starpu_data_access_mode = 512 ; # [doc = "< Ignore this data for the footprint computation. See \\ref ScratchData"] pub const STARPU_NOFOOTPRINT : starpu_data_access_mode = 1024 ; # [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 = 2048 ; # [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 ; unsafe extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] 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]) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] 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 ; } unsafe 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.\nSee \\ref TaskSubmission for more details."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref TemporaryData for more details."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks. See \\ref DataReduction for more details."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } unsafe 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) ; } unsafe 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\nexplicitly 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 -EDEADLK). Upon successful\ncompletion, this function returns 0. See \\ref DataAccess for more details."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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.\n\n\\p callback_acquired is called when the data is acquired in terms of semantic,\nbut the data is not fetched yet. It is given a pointer to the node, which it\ncan modify if it wishes so.\n\nThis is a very internal interface, subject to changes, do not use this."] 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_acquired : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , node : * mut :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) > , callback : :: std :: option :: Option < unsafe extern "C" fn (arg : * 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 , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb(). See \\ref DataAccess for more details."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Partly release the piece of data acquired by the application either by\nstarpu_data_acquire() or by starpu_data_acquire_cb(), switching the\nacquisition down to \\p down_to_mode. For now, only releasing from ::STARPU_RW\nor ::STARPU_W acquisition down to ::STARPU_R is supported, or down to the same\nacquisition. ::STARPU_NONE can also be passed as \\p down_to_mode, in which\ncase this is equivalent to calling starpu_data_release(). See \\ref DataAccess for more details."] pub fn starpu_data_release_to (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release_to(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_to_on_node (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode , 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 ; unsafe extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } unsafe extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter, see \\ref\nConcurrentDataAccess for the details."] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Destroy the \\p arbiter. This must only be called after all data\nassigned to it have been unregistered. See \\ref\nConcurrentDataAccess for the details."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A task really needs it now!"] pub const STARPU_FETCH : starpu_is_prefetch = 0 ; # [doc = " A task will need it soon"] pub const STARPU_TASK_PREFETCH : starpu_is_prefetch = 1 ; # [doc = " It is a good idea to have it asap"] pub const STARPU_PREFETCH : starpu_is_prefetch = 2 ; # [doc = " Get this here when you have time to"] pub const STARPU_IDLEFETCH : starpu_is_prefetch = 3 ; # [doc = " Get this here when you have time to"] pub const STARPU_NFETCH : starpu_is_prefetch = 4 ; # [doc = "Prefetch levels\n\nData requests are ordered by priorities, but also by prefetching level,\nbetween data that a task wants now, and data that we will probably want\n\"soon\"."] pub type starpu_is_prefetch = :: std :: os :: raw :: c_uint ; unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node (or a transfer request for getting so is ongoing). See \\ref SchedulingHelpers for more details."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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. See \\ref DataPrefetch for more details."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Advise StarPU to evict \\p handle from the memory node \\p node\nStarPU will thus write its value back to its home node, before evicting it.\nThis may however fail if e.g. some task is still working on it.\n\nIf the eviction was successful, 0 is returned ; -1 is returned otherwise.\n\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_evict_from_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 transferred into those memory nodes. For\ninstance a 1<<0 write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0). See \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } unsafe 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().\nSee \\ref SequentialConsistency and \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the default sequential consistency flag. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } unsafe 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(). See \\ref SequentialConsistency for more details."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1. See \\ref OOCDataRegistration for more details."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0). See \\ref OOCDataRegistration for more details."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node.\n\n\\p is_allocated tells whether memory was allocated there for the data.\n\\p is_valid tells whether the actual value is available there.\n\\p is_loading tells whether the actual value is getting loaded there.\n\\p is_requested tells whether the actual value is requested to be loaded\nthere by some fetch/prefetch/idlefetch request.\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_query_status2 (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_loading : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Same as starpu_data_query_status2(), but without the is_loading parameter. See \\ref DataPrefetch for more details."] 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) ; } unsafe 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 (which has to take one handle with ::STARPU_W), and\nreduction between per-worker buffers will be done with the codelet \\p\nredux_cl (which has to take a first accumulation handle with\n::STARPU_RW|::STARPU_COMMUTE, and a second contribution handle with ::STARPU_R).\nSee \\ref DataReduction and \\ref TemporaryData for more details."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Same as starpu_data_set_reduction_methods() but allows to pass\narguments to the reduction and init tasks"] pub fn starpu_data_set_reduction_methods_with_args (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , redux_cl_arg : * mut :: std :: os :: raw :: c_void , init_cl : * mut starpu_codelet , init_cl_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_data_test_if_mapped_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Set the field \\c sched_data for the \\p handle to \\p sched_data . It can\nthen be retrieved with starpu_data_get_sched_data(). \\p sched_data can be any\nscheduler-defined value.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_sched_data (handle : starpu_data_handle_t , sched_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c sched_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_sched_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Check whether data \\p handle can be evicted now from node \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_can_evict (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , is_prefetch : starpu_is_prefetch) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Retrieve the value of an environment variable.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the current date in micro-seconds. See \\ref Preparing for more details."] pub fn starpu_timing_now () -> f64 ; } unsafe 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Like starpu_data_cpy(), copy the content of \\p src_handle into \\p dst_handle,\nbut additionally take a \\p priority parameter to sort it among the whole task\ngraph.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_cpy_priority (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 , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Create a copy of \\p src_handle, and return a new handle in \\p dst_handle,\nwhich is to be used only for read accesses. This allows StarPU to optimize it\nby not actually copying the data whenever possible (e.g. it may possibly\nsimply return src_handle itself).\nThe parameter \\p asynchronous indicates whether the function should block\nor not. In the case of an asynchronous call, it is possible to synchronize\nwith the 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_dup_ro (dst_handle : * mut starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call hwloc-ps to display binding of each process and thread running on\nthe machine.
\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU.\nSee \\ref MiscellaneousAndDebug for more details."] pub fn starpu_display_bindings () ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a bitmap representing logical indexes of NUMA nodes where the buffer\ntargeted by \\p ptr is allocated. An error is notified by a negative result.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_memory_location_bitmap (ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_long ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate data on disk. See \\ref DiskFunctions for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 data 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 data, 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 data \\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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_disk_ops"] [:: std :: mem :: size_of :: < starpu_disk_ops > () - 152usize] ; ["Alignment of starpu_disk_ops"] [:: std :: mem :: align_of :: < starpu_disk_ops > () - 8usize] ; ["Offset of field: starpu_disk_ops::plug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , plug) - 0usize] ; ["Offset of field: starpu_disk_ops::unplug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , unplug) - 8usize] ; ["Offset of field: starpu_disk_ops::bandwidth"] [:: std :: mem :: offset_of ! (starpu_disk_ops , bandwidth) - 16usize] ; ["Offset of field: starpu_disk_ops::alloc"] [:: std :: mem :: offset_of ! (starpu_disk_ops , alloc) - 24usize] ; ["Offset of field: starpu_disk_ops::free"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free) - 32usize] ; ["Offset of field: starpu_disk_ops::open"] [:: std :: mem :: offset_of ! (starpu_disk_ops , open) - 40usize] ; ["Offset of field: starpu_disk_ops::close"] [:: std :: mem :: offset_of ! (starpu_disk_ops , close) - 48usize] ; ["Offset of field: starpu_disk_ops::read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , read) - 56usize] ; ["Offset of field: starpu_disk_ops::write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , write) - 64usize] ; ["Offset of field: starpu_disk_ops::full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_read) - 72usize] ; ["Offset of field: starpu_disk_ops::full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_write) - 80usize] ; ["Offset of field: starpu_disk_ops::async_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_write) - 88usize] ; ["Offset of field: starpu_disk_ops::async_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_read) - 96usize] ; ["Offset of field: starpu_disk_ops::async_full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_read) - 104usize] ; ["Offset of field: starpu_disk_ops::async_full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_write) - 112usize] ; ["Offset of field: starpu_disk_ops::copy"] [:: std :: mem :: offset_of ! (starpu_disk_ops , copy) - 120usize] ; ["Offset of field: starpu_disk_ops::wait_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , wait_request) - 128usize] ; ["Offset of field: starpu_disk_ops::test_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , test_request) - 136usize] ; ["Offset of field: starpu_disk_ops::free_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free_request) - 144usize] ; } ; unsafe extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\nWarning: It creates one file per allocation !\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the HDF5 library.\n\nIt doesn't support multiple opening from different processes. \n\nYou may only allow one process to write in the HDF5 file.\n\nIf HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. "] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\nWarning: It creates one file per allocation !"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\nWarning: It creates one file per allocation !\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Close an existing data opened with starpu_disk_open(). See \\ref OutOfCore_Introduction for more details."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe 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. See \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndata. 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
\nSUCCESS: return the disk node.
\nFAIL: return an error code.
\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size.\n\nSee \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe 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, HIP or OpenCL support.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 HIP node. Return 0 on success."] pub ram_to_hip : :: 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 FPGA node. Return 0 on success."] pub ram_to_max_fpga : :: 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 HIP node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub hip_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 HIP node to the \\p dst_interface interface on the \\p\ndst_node HIP node. Return 0 on success."] pub hip_to_hip : :: 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 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 FPGA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub max_fpga_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 > , 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 > , pub ram_to_hip_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_hip_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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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 FPGA node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_max_fpga_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 FPGA 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 -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub max_fpga_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 -EAGAIN if any of the starpu_interface_copy()\ncalls has returned -EAGAIN (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::peek_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 > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_copy_methods"] [:: std :: mem :: size_of :: < starpu_data_copy_methods > () - 200usize] ; ["Alignment of starpu_data_copy_methods"] [:: std :: mem :: align_of :: < starpu_data_copy_methods > () - 8usize] ; ["Offset of field: starpu_data_copy_methods::can_copy"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , can_copy) - 0usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_ram) - 8usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda) - 16usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip) - 24usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl) - 32usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga) - 40usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram) - 48usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda) - 56usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram) - 64usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip) - 72usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram) - 80usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl) - 88usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram) - 96usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda_async) - 104usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram_async) - 112usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda_async) - 120usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip_async) - 128usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram_async) - 136usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip_async) - 144usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl_async) - 152usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram_async) - 160usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl_async) - 168usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga_async) - 176usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram_async) - 184usize] ; ["Offset of field: starpu_data_copy_methods::any_to_any"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , any_to_any) - 192usize] ; } ; # [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 = "< Identifier for the tensor data interface"] pub const STARPU_TENSOR_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "< Identifier for the ndim array data interface"] pub const STARPU_NDIM_INTERFACE_ID : starpu_data_interface_id = 10 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 11 ; # [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)] 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 (if >= 0), 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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 = "Cache the buffers from the given node to a caching interface.\n\nThis method is optional, mostly useful when also making\nstarpu_data_interface_ops::unregister_data_handle check that pointers are NULL.\n\n\\p src_interface is an interface that already has buffers\nallocated, but which we don't need any more. \\p cached_interface\nis a new interface into which the buffer pointers should be\ntransferred, for later reuse when allocating data of the same kind.\n\nUsually we can just memcpy over the set of pointers and descriptions\n(this is what StarPU does when this method is not implemented), but\nif unregister_data_handle checks that pointers are NULL, we need to\nadditionally clear the pointers in \\p src_interface. Also,\nit is not useful to copy the whole interface, only the\npointers need to be copied (essentially the pointers that\nstarpu_data_interface_ops::reuse_data_on_node will then transfer into\na new handle interface), as well as the properties\nthat starpu_data_interface_ops::compare (or\nstarpu_data_interface_ops::alloc_compare if defined) needs for\ncomparing interfaces for caching compatibility.\n\nWhen this method is not defined, StarPU will just copy the \\p\ncached_interface into \\p src_interface.\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub cache_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (cached_interface : * mut :: std :: os :: raw :: c_void , src_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Reuse on the given node the buffers of the provided interface\n\nThis method is optional, mostly useful when also defining\nalloc_footprint to share tiles of the same allocation size but\ndifferent shapes, or when the interface contains pointers which\nare initialized at registration (e.g. nn array in the ndim interface)\n\n\\p cached_interface is an already-allocated buffer that we want to\nreuse, and \\p new_data_interface is an interface in which we want to\ninstall that already-allocated buffer. Usually we can just memcpy over\nthe set of pointers and descriptions. But e.g. with 2D tiles the ld\nvalue may not be correct, and memcpy would wrongly overwrite it in\nnew_data_interface, i.e. reusing a vertical tile allocation for a horizontal tile, or vice-versa.\n\nreuse_data_on_node should thus copy over pointers, and define fields\nthat are usually set by allocate_data_on_node (e.g. ld).\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub reuse_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (dst_data_interface : * mut :: std :: os :: raw :: c_void , cached_interface : * const :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Map data from a source to a destination.\nDefine function starpu_interface_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub map_data : :: 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 = "Unmap data from a source to a destination.\nDefine function starpu_interface_unmap() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub unmap_data : :: 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 = "Update map data from a source to a destination.\nDefine function starpu_interface_update_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub update_map : :: 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 = "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 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 the maximum size that the data may need to increase to. For\ninstance, in the case of compressed matrix tiles this is the size\nwhen the block is fully dense.\nThis is currently only used for feedback tools."] pub get_max_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.\nIf specified, alloc_compare should be set to provide the strict\ncomparison, and reuse_data_on_node should be set to provide correct buffer reuse."] 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 starpu_malloc_flags(ptr, size, 0) (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is NULL, 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 = "Read the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count."] pub peek_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 = "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 = "Pack the interface into a contiguous buffer and set the\nsize of the newly created buffer in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub pack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the interface from the given buffer and set the size\nof the unpacked data in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub unpack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Free the allocated memory by a previous call to unpack_meta()"] pub free_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_data_interface_ops > () - 264usize] ; ["Alignment of starpu_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_data_interface_ops::register_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , register_data_handle) - 0usize] ; ["Offset of field: starpu_data_interface_ops::unregister_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unregister_data_handle) - 8usize] ; ["Offset of field: starpu_data_interface_ops::allocate_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , allocate_data_on_node) - 16usize] ; ["Offset of field: starpu_data_interface_ops::free_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_data_on_node) - 24usize] ; ["Offset of field: starpu_data_interface_ops::cache_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , cache_data_on_node) - 32usize] ; ["Offset of field: starpu_data_interface_ops::reuse_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , reuse_data_on_node) - 40usize] ; ["Offset of field: starpu_data_interface_ops::map_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , map_data) - 48usize] ; ["Offset of field: starpu_data_interface_ops::unmap_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unmap_data) - 56usize] ; ["Offset of field: starpu_data_interface_ops::update_map"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , update_map) - 64usize] ; ["Offset of field: starpu_data_interface_ops::init"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , init) - 72usize] ; ["Offset of field: starpu_data_interface_ops::copy_methods"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , copy_methods) - 80usize] ; ["Offset of field: starpu_data_interface_ops::handle_to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , handle_to_pointer) - 88usize] ; ["Offset of field: starpu_data_interface_ops::to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , to_pointer) - 96usize] ; ["Offset of field: starpu_data_interface_ops::get_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_size) - 104usize] ; ["Offset of field: starpu_data_interface_ops::get_alloc_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_alloc_size) - 112usize] ; ["Offset of field: starpu_data_interface_ops::get_max_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_max_size) - 120usize] ; ["Offset of field: starpu_data_interface_ops::footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , footprint) - 128usize] ; ["Offset of field: starpu_data_interface_ops::alloc_footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_footprint) - 136usize] ; ["Offset of field: starpu_data_interface_ops::compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , compare) - 144usize] ; ["Offset of field: starpu_data_interface_ops::alloc_compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_compare) - 152usize] ; ["Offset of field: starpu_data_interface_ops::display"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , display) - 160usize] ; ["Offset of field: starpu_data_interface_ops::describe"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , describe) - 168usize] ; ["Offset of field: starpu_data_interface_ops::interfaceid"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interfaceid) - 176usize] ; ["Offset of field: starpu_data_interface_ops::interface_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interface_size) - 184usize] ; ["Offset of field: starpu_data_interface_ops::is_multiformat"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , is_multiformat) - 192usize] ; ["Offset of field: starpu_data_interface_ops::dontcache"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , dontcache) - 193usize] ; ["Offset of field: starpu_data_interface_ops::get_mf_ops"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_mf_ops) - 200usize] ; ["Offset of field: starpu_data_interface_ops::pack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_data) - 208usize] ; ["Offset of field: starpu_data_interface_ops::peek_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , peek_data) - 216usize] ; ["Offset of field: starpu_data_interface_ops::unpack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_data) - 224usize] ; ["Offset of field: starpu_data_interface_ops::pack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_meta) - 232usize] ; ["Offset of field: starpu_data_interface_ops::unpack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_meta) - 240usize] ; ["Offset of field: starpu_data_interface_ops::free_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_meta) - 248usize] ; ["Offset of field: starpu_data_interface_ops::name"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , name) - 256usize] ; } ; 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 () } } } unsafe 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()).\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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) ; } unsafe extern "C" { # [doc = "Register the given data interface operations. If the field\nstarpu_data_interface_ops::field is set to\n::STARPU_UNKNOWN_INTERFACE_ID, then a new identifier will be set by\ncalling starpu_data_interface_get_next_id().\nThe function is automatically called when registering a piece of\ndata with starpu_data_register(). It is only necessary to call it\nbeforehand for some specific cases (such as the usmaster slave mode)."] pub fn starpu_data_register_ops (ops : * mut starpu_data_interface_ops) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or NULL\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node.\nSee \\ref DataPointers for more details."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle or NULL if\n\\p handle’s interface does not have any data allocated locally.\nSee \\ref DataPointers for more details."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node.\nSee \\ref DefiningANewDataInterface_pack for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle.\nSee \\ref DefiningANewDataInterface_helpers for more details."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } unsafe 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 on node \\p node 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 NULL, 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_pack_node (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 ; } unsafe extern "C" { # [doc = "Like starpu_data_pack_node(), but for the local memory node.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Read in handle's \\p node replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek_node (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 ; } unsafe extern "C" { # [doc = "Read in handle's local replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count allocated\non node \\p node as described by the interface of the data. The interface\nregistered at \\p handle must define an unpacking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack_node (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 ; } unsafe 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).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the size of the data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the maximum size that the \\p handle data may need to increase to.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_max_size (handle : starpu_data_handle_t) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "See \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print basic information on \\p handle on \\p node.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_print (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , stream : * mut FILE) ; } unsafe 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 ; } unsafe 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 -EAGAIN if the\ntransfer is still ongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 4D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe extern "C" { # [doc = "Copy \\p nn[1] * \\p nn[2]...* \\p nn[ndim-1] blocks of \\p nn[0] * \\p elemsize 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 nn[i] blocks (i = 1, 2, ... ndim-1) whose start addresses are\nldn_src[i] * \\p elemsize (resp. ld1_dst[i] * \\p elemsize) bytes apart\nin the source (resp. destination) interface.\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 Ndim data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_copynd (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , elemsize : usize , ndim : usize , nn : * mut u32 , ldn_src : * mut u32 , ldn_dst : * mut u32 , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "When an asynchronous 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().\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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) ; } unsafe extern "C" { # [doc = "See starpu_interface_start_driver_copy_async().\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } unsafe extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node.\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node_flags().\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::map_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_map (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize , ret : * mut :: std :: os :: raw :: c_int) -> usize ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::unmap_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_unmap (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::update_map.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_update_map (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) -> :: std :: os :: raw :: c_int ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_matrix_interface"] [:: std :: mem :: size_of :: < starpu_matrix_interface > () - 64usize] ; ["Alignment of starpu_matrix_interface"] [:: std :: mem :: align_of :: < starpu_matrix_interface > () - 8usize] ; ["Offset of field: starpu_matrix_interface::id"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , id) - 0usize] ; ["Offset of field: starpu_matrix_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ptr) - 8usize] ; ["Offset of field: starpu_matrix_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_matrix_interface::offset"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , offset) - 24usize] ; ["Offset of field: starpu_matrix_interface::nx"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , nx) - 32usize] ; ["Offset of field: starpu_matrix_interface::ny"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ny) - 36usize] ; ["Offset of field: starpu_matrix_interface::ld"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ld) - 40usize] ; ["Offset of field: starpu_matrix_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , elemsize) - 48usize] ; ["Offset of field: starpu_matrix_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_coo_interface"] [:: std :: mem :: size_of :: < starpu_coo_interface > () - 56usize] ; ["Alignment of starpu_coo_interface"] [:: std :: mem :: align_of :: < starpu_coo_interface > () - 8usize] ; ["Offset of field: starpu_coo_interface::id"] [:: std :: mem :: offset_of ! (starpu_coo_interface , id) - 0usize] ; ["Offset of field: starpu_coo_interface::columns"] [:: std :: mem :: offset_of ! (starpu_coo_interface , columns) - 8usize] ; ["Offset of field: starpu_coo_interface::rows"] [:: std :: mem :: offset_of ! (starpu_coo_interface , rows) - 16usize] ; ["Offset of field: starpu_coo_interface::values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , values) - 24usize] ; ["Offset of field: starpu_coo_interface::nx"] [:: std :: mem :: offset_of ! (starpu_coo_interface , nx) - 32usize] ; ["Offset of field: starpu_coo_interface::ny"] [:: std :: mem :: offset_of ! (starpu_coo_interface , ny) - 36usize] ; ["Offset of field: starpu_coo_interface::n_values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , n_values) - 40usize] ; ["Offset of field: starpu_coo_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_coo_interface , elemsize) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref COODataInterface for more details."] 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) ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_block_interface"] [:: std :: mem :: size_of :: < starpu_block_interface > () - 64usize] ; ["Alignment of starpu_block_interface"] [:: std :: mem :: align_of :: < starpu_block_interface > () - 8usize] ; ["Offset of field: starpu_block_interface::id"] [:: std :: mem :: offset_of ! (starpu_block_interface , id) - 0usize] ; ["Offset of field: starpu_block_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_block_interface , ptr) - 8usize] ; ["Offset of field: starpu_block_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_block_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_block_interface::offset"] [:: std :: mem :: offset_of ! (starpu_block_interface , offset) - 24usize] ; ["Offset of field: starpu_block_interface::nx"] [:: std :: mem :: offset_of ! (starpu_block_interface , nx) - 32usize] ; ["Offset of field: starpu_block_interface::ny"] [:: std :: mem :: offset_of ! (starpu_block_interface , ny) - 36usize] ; ["Offset of field: starpu_block_interface::nz"] [:: std :: mem :: offset_of ! (starpu_block_interface , nz) - 40usize] ; ["Offset of field: starpu_block_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldy) - 44usize] ; ["Offset of field: starpu_block_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldz) - 48usize] ; ["Offset of field: starpu_block_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_block_interface , elemsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Tensor Data Interface\n@{"] pub static mut starpu_interface_tensor_ops : starpu_data_interface_ops ; } # [doc = "Tensor interface for 4D dense tensors"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_tensor_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the tensor"] pub ptr : usize , # [doc = "< device handle of the tensor."] pub dev_handle : usize , # [doc = "< offset in the tensor."] pub offset : usize , # [doc = "< number of elements on the x-axis of the tensor."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the tensor."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the tensor."] pub nz : u32 , # [doc = "< number of elements on the t-axis of the tensor."] pub nt : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< number of elements between two cubes"] pub ldt : u32 , # [doc = "< size of the elements of the tensor."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tensor_interface"] [:: std :: mem :: size_of :: < starpu_tensor_interface > () - 72usize] ; ["Alignment of starpu_tensor_interface"] [:: std :: mem :: align_of :: < starpu_tensor_interface > () - 8usize] ; ["Offset of field: starpu_tensor_interface::id"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , id) - 0usize] ; ["Offset of field: starpu_tensor_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ptr) - 8usize] ; ["Offset of field: starpu_tensor_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_tensor_interface::offset"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , offset) - 24usize] ; ["Offset of field: starpu_tensor_interface::nx"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nx) - 32usize] ; ["Offset of field: starpu_tensor_interface::ny"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ny) - 36usize] ; ["Offset of field: starpu_tensor_interface::nz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nz) - 40usize] ; ["Offset of field: starpu_tensor_interface::nt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nt) - 44usize] ; ["Offset of field: starpu_tensor_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldy) - 48usize] ; ["Offset of field: starpu_tensor_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldz) - 52usize] ; ["Offset of field: starpu_tensor_interface::ldt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldt) - 56usize] ; ["Offset of field: starpu_tensor_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , elemsize) - 64usize] ; } ; impl Default for starpu_tensor_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz x \\p nt 4D tensor of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy,\n\\p ldz, and \\p ldt specify the number of elements between rows, between z planes and between t cubes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *tensor;\nstarpu_data_handle_t tensor_handle;\ntensor = (float*)malloc(nx*ny*nz*nt*sizeof(float));\nstarpu_tensor_data_register(&tensor_handle, STARPU_MAIN_RAM, (uintptr_t)tensor, nx, nx*ny, nx*ny*nz, nx, ny, nz, nt, sizeof(float));\n\\endcode\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , ldt : u32 , nx : u32 , ny : u32 , nz : u32 , nt : u32 , elemsize : usize) ; } unsafe 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, and \\p ldt elements between t cubes."] pub fn starpu_tensor_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32 , ldt : u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on the x-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nx (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the y-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_ny (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the z-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the t-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each row of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each z plane of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each t cubes of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_tensor_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the tensor designated by\n\\p handle."] pub fn starpu_tensor_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Ndim Array Data Interface\n@{"] pub static mut starpu_interface_ndim_ops : starpu_data_interface_ops ; } # [doc = "ndim interface for ndim array"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_ndim_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the ndim"] pub ptr : usize , # [doc = "< device handle of the ndim."] pub dev_handle : usize , # [doc = "< offset in the ndim."] pub offset : usize , # [doc = "< size actually currently allocated."] pub allocsize : usize , # [doc = "< array of element number on each dimension"] pub nn : * mut u32 , # [doc = "< array of element number between two units on each dimension"] pub ldn : * mut u32 , # [doc = "< size of the dimension."] pub ndim : usize , # [doc = "< size of the elements of the ndim."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_ndim_interface"] [:: std :: mem :: size_of :: < starpu_ndim_interface > () - 72usize] ; ["Alignment of starpu_ndim_interface"] [:: std :: mem :: align_of :: < starpu_ndim_interface > () - 8usize] ; ["Offset of field: starpu_ndim_interface::id"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , id) - 0usize] ; ["Offset of field: starpu_ndim_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ptr) - 8usize] ; ["Offset of field: starpu_ndim_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_ndim_interface::offset"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , offset) - 24usize] ; ["Offset of field: starpu_ndim_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , allocsize) - 32usize] ; ["Offset of field: starpu_ndim_interface::nn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , nn) - 40usize] ; ["Offset of field: starpu_ndim_interface::ldn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ldn) - 48usize] ; ["Offset of field: starpu_ndim_interface::ndim"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ndim) - 56usize] ; ["Offset of field: starpu_ndim_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , elemsize) - 64usize] ; } ; impl Default for starpu_ndim_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nn[0] x \\p nn[1] x ... \\p ndim-dimension matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldn,\nspecifies the number of elements between two units on each dimension.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *ndim_arr;\nsize_t arrsize = 1;\nint i;\nfor (i = 0; i < ndim; i++)\narrsize = arrsize * nn[i];\nstarpu_data_handle_t ndim_handle;\nndim_arr = (float*)malloc(arrsize*sizeof(float));\nstarpu_ndim_data_register(&ndim_handle, STARPU_MAIN_RAM, (uintptr_t)ndim_arr, ldn, nn, ndim, sizeof(float));\n\\endcode\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldn : * mut u32 , nn : * mut u32 , ndim : usize , elemsize : usize) ; } unsafe 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 ldn elements between two units on each dimension."] pub fn starpu_ndim_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldn : * mut u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on each dimension of the ndim array\ndesignated by \\p handle."] pub fn starpu_ndim_get_nn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the i-axis of the ndim array\ndesignated by \\p handle. When i=0, it means x-axis,\nwhen i=1, it means y-axis, when i=2, it means z-axis, etc."] pub fn starpu_ndim_get_ni (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units on each dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units i-axis dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldi (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_ndim_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the dimension size."] pub fn starpu_ndim_get_ndim (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the ndim array designated by\n\\p handle."] pub fn starpu_ndim_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_vector_interface"] [:: std :: mem :: size_of :: < starpu_vector_interface > () - 64usize] ; ["Alignment of starpu_vector_interface"] [:: std :: mem :: align_of :: < starpu_vector_interface > () - 8usize] ; ["Offset of field: starpu_vector_interface::id"] [:: std :: mem :: offset_of ! (starpu_vector_interface , id) - 0usize] ; ["Offset of field: starpu_vector_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_vector_interface , ptr) - 8usize] ; ["Offset of field: starpu_vector_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_vector_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_vector_interface::offset"] [:: std :: mem :: offset_of ! (starpu_vector_interface , offset) - 24usize] ; ["Offset of field: starpu_vector_interface::nx"] [:: std :: mem :: offset_of ! (starpu_vector_interface , nx) - 32usize] ; ["Offset of field: starpu_vector_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , elemsize) - 40usize] ; ["Offset of field: starpu_vector_interface::slice_base"] [:: std :: mem :: offset_of ! (starpu_vector_interface , slice_base) - 48usize] ; ["Offset of field: starpu_vector_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_vector_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize.\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_variable_interface"] [:: std :: mem :: size_of :: < starpu_variable_interface > () - 40usize] ; ["Alignment of starpu_variable_interface"] [:: std :: mem :: align_of :: < starpu_variable_interface > () - 8usize] ; ["Offset of field: starpu_variable_interface::id"] [:: std :: mem :: offset_of ! (starpu_variable_interface , id) - 0usize] ; ["Offset of field: starpu_variable_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_variable_interface , ptr) - 8usize] ; ["Offset of field: starpu_variable_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_variable_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_variable_interface::offset"] [:: std :: mem :: offset_of ! (starpu_variable_interface , offset) - 24usize] ; ["Offset of field: starpu_variable_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_variable_interface , elemsize) - 32usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VariableDataInterface for more details."] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } unsafe 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 void\ndata in read-write concurrently.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } unsafe 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)] 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 = "< position of non-zero entries on the row (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitioning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_csr_interface"] [:: std :: mem :: size_of :: < starpu_csr_interface > () - 72usize] ; ["Alignment of starpu_csr_interface"] [:: std :: mem :: align_of :: < starpu_csr_interface > () - 8usize] ; ["Offset of field: starpu_csr_interface::id"] [:: std :: mem :: offset_of ! (starpu_csr_interface , id) - 0usize] ; ["Offset of field: starpu_csr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nnz) - 4usize] ; ["Offset of field: starpu_csr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nrow) - 8usize] ; ["Offset of field: starpu_csr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nzval) - 16usize] ; ["Offset of field: starpu_csr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , colind) - 24usize] ; ["Offset of field: starpu_csr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_csr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_csr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_csr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_csr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_csr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_csr_interface , elemsize) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix.\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 = "< array of nnz elements (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< array of nrow+1 elements (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitioning 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bcsr_interface"] [:: std :: mem :: size_of :: < starpu_bcsr_interface > () - 80usize] ; ["Alignment of starpu_bcsr_interface"] [:: std :: mem :: align_of :: < starpu_bcsr_interface > () - 8usize] ; ["Offset of field: starpu_bcsr_interface::id"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , id) - 0usize] ; ["Offset of field: starpu_bcsr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nnz) - 4usize] ; ["Offset of field: starpu_bcsr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nrow) - 8usize] ; ["Offset of field: starpu_bcsr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nzval) - 16usize] ; ["Offset of field: starpu_bcsr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , colind) - 24usize] ; ["Offset of field: starpu_bcsr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_bcsr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_bcsr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_bcsr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_bcsr_interface::r"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , r) - 60usize] ; ["Offset of field: starpu_bcsr_interface::c"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , c) - 64usize] ; ["Offset of field: starpu_bcsr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , elemsize) - 72usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () - 56usize] ; ["Alignment of starpu_multiformat_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_elemsize) - 0usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_elemsize) - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_opencl_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_opencl_cl) - 16usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_to_cpu_cl) - 24usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_elemsize) - 32usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_cuda_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_cuda_cl) - 40usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_to_cpu_cl) - 48usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 hip_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_interface"] [:: std :: mem :: size_of :: < starpu_multiformat_interface > () - 56usize] ; ["Alignment of starpu_multiformat_interface"] [:: std :: mem :: align_of :: < starpu_multiformat_interface > () - 8usize] ; ["Offset of field: starpu_multiformat_interface::id"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , id) - 0usize] ; ["Offset of field: starpu_multiformat_interface::cpu_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cpu_ptr) - 8usize] ; ["Offset of field: starpu_multiformat_interface::cuda_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cuda_ptr) - 16usize] ; ["Offset of field: starpu_multiformat_interface::hip_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , hip_ptr) - 24usize] ; ["Offset of field: starpu_multiformat_interface::opencl_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , opencl_ptr) - 32usize] ; ["Offset of field: starpu_multiformat_interface::nx"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , nx) - 40usize] ; ["Offset of field: starpu_multiformat_interface::ops"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , ops) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref TheMultiformatInterface for more details."] 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().\nSee \\ref DefiningANewDataFilter for more details."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n- id 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
\n- nx, ny 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).
\n- ld for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange.
\n- elemsize is usually just copied over.
\n- ptr, the pointer to the data, has to be\ncomputed according to \\p i and the father's ptr, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has ptr different\nfrom NULL: in the OpenCL case notably, the\ndev_handle and offset fields are used\ninstead.
\n- dev_handle should be just copied over from the\nparent.
\n- offset has to be computed according to \\p i and\nthe father's offset, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n
"] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_filter"] [:: std :: mem :: size_of :: < starpu_data_filter > () - 48usize] ; ["Alignment of starpu_data_filter"] [:: std :: mem :: align_of :: < starpu_data_filter > () - 8usize] ; ["Offset of field: starpu_data_filter::filter_func"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_func) - 0usize] ; ["Offset of field: starpu_data_filter::nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , nchildren) - 8usize] ; ["Offset of field: starpu_data_filter::get_nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_nchildren) - 16usize] ; ["Offset of field: starpu_data_filter::get_child_ops"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_child_ops) - 24usize] ; ["Offset of field: starpu_data_filter::filter_arg"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg) - 32usize] ; ["Offset of field: starpu_data_filter::filter_arg_ptr"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg_ptr) - 40usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitioned beforehand.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list.\nSee \\ref PartitioningData for more details."] 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 ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The pointer of the filter list \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_parray (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut * mut starpu_data_filter) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The list of filter \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_array (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_readonly_submit(), but allow to\nspecify the coherency to be used for the main data \\p initial_handle.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\nin read-write mode through starpu_data_partition_submit(), and will downgrade\nthat partitioning into read-only mode for the \\p children, fetching data back to the \\p\ninitial_handle, and adding the necessary dependencies.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_downgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_clean() but the root data will be\ngathered on the given node.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean_node (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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().\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] 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 ; } unsafe 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.\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices.\n\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a matrix along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_vector.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_vector_y().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a matrix. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_variable.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_variable().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr, thus getting a vector\nof size (n-2*shadow)/nparts+2*shadow. The starpu_data_filter::filter_arg_ptr field\nof \\p f must be the shadow size casted into \\c void*.\n\nIMPORTANT: 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in 2 chunks of\nequal size, ignoring nparts. Thus, \\p id must be 0 or 1.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a vector. The starting\nposition is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_vector_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fvector_pick_variable.c\n\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_vector_filter_pick_variable().\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_matrix_z()\nand starpu_block_filter_pick_matrix_y().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a block. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_variable.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_variable().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, thus getting\n(x/\\p nparts ,y,z,t) tensors. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z,t) tensors. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, thus getting\n(x,y/\\p nparts ,z,t) tensors. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z,t) tensors. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, thus getting\n(x,y,z/\\p nparts,t) tensors. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow,t) tensors. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, thus getting\n(x,y,z,t/\\p nparts) tensors. If \\p nparts does not divide t, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,z,(t-2*shadow)/\\p nparts +2*shadow) tensors. If \\p nparts does not\ndivide t, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe T dimension. The starting position on T-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_t (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_block_t(),\nstarpu_tensor_filter_pick_block_z() and starpu_tensor_filter_pick_block_y().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a tensor. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_variable.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_variable().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg, with a shadow border\nstarpu_data_filter::filter_arg_ptr. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a 4-dim array into \\p nparts tensors along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_to_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor (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) ; } unsafe extern "C" { # [doc = "Partition a 3-dim array into \\p nparts blocks along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_block_child_ops(). A usage example is\navailable in examples/filters/fndim_to_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_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) ; } unsafe extern "C" { # [doc = "Partition a 2-dim array into \\p nparts matrices along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_to_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix (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) ; } unsafe extern "C" { # [doc = "Partition a 1-dim array into \\p nparts vectors.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_to_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector (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) ; } unsafe extern "C" { # [doc = "Transfer a 0-dim array to a variable.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_to_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous (n-1)dim arrays from a ndim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nA usage example is available in examples/filters/fndim_pick_ndim.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_ndim (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous tensors from a 5-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_5d_pick_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_5d_pick_tensor (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a 4-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/fndim_4d_pick_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_4d_pick_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a 3-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_3d_pick_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_3d_pick_matrix (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a 2-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_2d_pick_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_2d_pick_vector (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a 1-dim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_1d_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_1d_pick_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a ndim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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 blocksize, which is most often 1.\nSee \\ref DefiningANewDataFilter for more details."] 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 , blocksize : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_align (align : usize) ; } unsafe 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_noflag() function.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "@deprecated\nFree memory which has previously been allocated with\nstarpu_malloc(). This function is deprecated, one should use\nstarpu_free_noflag().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe extern "C" { # [doc = "Free memory by specifying its size. Should be used for memory\nallocated with starpu_malloc().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free_noflag (A : * mut :: std :: os :: raw :: c_void , dim : usize) -> :: 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 > ; unsafe 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().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on the node.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used (node : :: std :: os :: raw :: c_uint) -> usize ; } unsafe extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref DataManagementAllocation)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nDataManagementAllocation)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on all memory nodes.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used_all_nodes () -> usize ; } unsafe 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 -ENOMEM 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_sec seconds. Similar to calling Unix' \\c\nsleep function, except that it takes a float to allow sub-second\nsleeping, and when StarPU is compiled in SimGrid mode it does not\nreally sleep but just makes SimGrid record that the thread has\ntaken some time to sleep.\nSee \\ref Helpers for more details."] pub fn starpu_sleep (nb_sec : f32) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_micro_sec micro-seconds.\nIn simgrid mode, this only sleeps within virtual time.\nSee \\ref Helpers for more details."] pub fn starpu_usleep (nb_micro_sec : f32) ; } unsafe extern "C" { # [doc = "Account for \\p joules J being used.\nThis is support in simgrid mode, to record how much energy was used, and will\nshow up in further call to starpu_energy_used().\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_use (joules : f32) ; } unsafe extern "C" { # [doc = "Return the amount of energy having been used in J.\nThis account the amounts passed to starpu_energy_use(), but also the static\nenergy use set by the \\ref STARPU_IDLE_POWER environment variable.\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_used () -> f64 ; } # [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 ; unsafe 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) ; } unsafe 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 -EPERM, if\n\\p task was already submitted it returns -EINVAL."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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-ENOENT."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] 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]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\nNULL 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifier. It is possible to associate a task\nwith a unique tag 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 ; unsafe 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\nWARNING! Use with caution. 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\n0x200000003 instead of 0x2 and 0x3 when\ncalling starpu_tag_declare_deps(0x1, 2, 0x2, 0x3). 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } unsafe 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 structure starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled).\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Clear the already notified 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } unsafe 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().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } unsafe extern "C" { # [doc = "Return the task associated to the tag \\p id.\nSee \\ref TasksAndTagsDependencies for more details."] 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 submitted, 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 ; # [doc = "todo"] 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 = "HIP implementation of a codelet."] pub type starpu_hip_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 = "Maxeler FPGA implementation of a codelet."] pub type starpu_max_fpga_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 = "@ingroup API_Bubble Hierarchical Dags\nBubble decision function"] pub type starpu_bubble_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = "@ingroup API_Bubble Hierarchical Dags\nBubble DAG generation function"] pub type starpu_bubble_gen_dag_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_trs_epoch { _unused : [u8 ; 0] , } pub type starpu_trs_epoch_t = * mut _starpu_trs_epoch ; # [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.\n\nNote that the codelet structure needs to exist until the task is\nterminated. If dynamic codelet allocation is desired, release should be done\nno sooner than the starpu_task::callback_func callback time.\n\nIf the application wants to make the structure constant, it needs to be\nfilled exactly as StarPU expects:\n\n- starpu_codelet::cpu_funcs, starpu_codelet::cuda_funcs, etc. must be used instead\nof the deprecated starpu_codelet::cpu_func, starpu_codelet::cuda_func, etc.\n\n- the starpu_codelet::where field must be set.\n\nand additionally, starpu_codelet::checked must be set to 1 to tell StarPU\nthat the conditions above are properly met. Also, the \\ref\nSTARPU_CODELET_PROFILING environment variable must be set to 0.\nAn example is provided in tests/main/const_codelet.c"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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_HIP, ::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-NULL 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-NULL 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 HIP\nimplementations of the codelet. The functions must be\nhost-functions written in the HIP runtime API. Their\nprototype must be:\n\\code{.c}\nvoid hip_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::hip_funcs is ignored if ::STARPU_HIP does\nnot appear in the field starpu_codelet::where, it must be\nnon-NULL otherwise."] pub hip_funcs : [starpu_hip_func_t ; 4usize] , # [doc = "Optional array of flags for HIP execution. They specify\nsome semantic details about HIP kernel execution, such as\nasynchronous execution."] pub hip_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-NULL 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 the Maxeler FPGA\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid fpga_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 starpu_codelet::max_fpga_funcs is ignored if\n::STARPU_MAX_FPGA does not appear in the field\nstarpu_codelet::where, it must be non-NULL otherwise."] pub max_fpga_funcs : [starpu_max_fpga_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\nMPI MS devices for StarPU to simply look\nup the MPI MS function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional function to decide if the task is to be\ntransformed into a bubble"] pub bubble_func : starpu_bubble_func_t , # [doc = "Optional function to transform the task into a new graph"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\nvoid *buffers[] 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 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,\nand should not exceed \\ref STARPU_NMAXBUFS. If\ninsufficient, 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\ndata 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 data 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 NULL 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 (in J). This optional field is\nignored when set to NULL 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 ; 48usize] , # [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. Value 0 acts like if this field wasn't specified.\nColor representation is hex triplet (for example: 0xff0000 is red,\n0x0000ff is blue, 0xffa500 is orange, ...)."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL."] 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 , pub perf_counter_sample : * mut starpu_perf_counter_sample , pub perf_counter_values : * mut starpu_perf_counter_sample_cl_values , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet"] [:: std :: mem :: size_of :: < starpu_codelet > () - 832usize] ; ["Alignment of starpu_codelet"] [:: std :: mem :: align_of :: < starpu_codelet > () - 8usize] ; ["Offset of field: starpu_codelet::where_"] [:: std :: mem :: offset_of ! (starpu_codelet , where_) - 0usize] ; ["Offset of field: starpu_codelet::can_execute"] [:: std :: mem :: offset_of ! (starpu_codelet , can_execute) - 8usize] ; ["Offset of field: starpu_codelet::type_"] [:: std :: mem :: offset_of ! (starpu_codelet , type_) - 16usize] ; ["Offset of field: starpu_codelet::max_parallelism"] [:: std :: mem :: offset_of ! (starpu_codelet , max_parallelism) - 20usize] ; ["Offset of field: starpu_codelet::cpu_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_func) - 24usize] ; ["Offset of field: starpu_codelet::cuda_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_func) - 32usize] ; ["Offset of field: starpu_codelet::opencl_func"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_func) - 40usize] ; ["Offset of field: starpu_codelet::cpu_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs) - 48usize] ; ["Offset of field: starpu_codelet::cuda_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_funcs) - 80usize] ; ["Offset of field: starpu_codelet::cuda_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_flags) - 112usize] ; ["Offset of field: starpu_codelet::hip_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_funcs) - 120usize] ; ["Offset of field: starpu_codelet::hip_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_flags) - 152usize] ; ["Offset of field: starpu_codelet::opencl_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_funcs) - 160usize] ; ["Offset of field: starpu_codelet::opencl_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_flags) - 192usize] ; ["Offset of field: starpu_codelet::max_fpga_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , max_fpga_funcs) - 200usize] ; ["Offset of field: starpu_codelet::cpu_funcs_name"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs_name) - 232usize] ; ["Offset of field: starpu_codelet::bubble_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_func) - 264usize] ; ["Offset of field: starpu_codelet::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_gen_dag_func) - 272usize] ; ["Offset of field: starpu_codelet::nbuffers"] [:: std :: mem :: offset_of ! (starpu_codelet , nbuffers) - 280usize] ; ["Offset of field: starpu_codelet::modes"] [:: std :: mem :: offset_of ! (starpu_codelet , modes) - 284usize] ; ["Offset of field: starpu_codelet::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_modes) - 320usize] ; ["Offset of field: starpu_codelet::specific_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , specific_nodes) - 328usize] ; ["Offset of field: starpu_codelet::nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , nodes) - 332usize] ; ["Offset of field: starpu_codelet::dyn_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_nodes) - 368usize] ; ["Offset of field: starpu_codelet::model"] [:: std :: mem :: offset_of ! (starpu_codelet , model) - 376usize] ; ["Offset of field: starpu_codelet::energy_model"] [:: std :: mem :: offset_of ! (starpu_codelet , energy_model) - 384usize] ; ["Offset of field: starpu_codelet::per_worker_stats"] [:: std :: mem :: offset_of ! (starpu_codelet , per_worker_stats) - 392usize] ; ["Offset of field: starpu_codelet::name"] [:: std :: mem :: offset_of ! (starpu_codelet , name) - 776usize] ; ["Offset of field: starpu_codelet::color"] [:: std :: mem :: offset_of ! (starpu_codelet , color) - 784usize] ; ["Offset of field: starpu_codelet::callback_func"] [:: std :: mem :: offset_of ! (starpu_codelet , callback_func) - 792usize] ; ["Offset of field: starpu_codelet::flags"] [:: std :: mem :: offset_of ! (starpu_codelet , flags) - 800usize] ; ["Offset of field: starpu_codelet::perf_counter_sample"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_sample) - 808usize] ; ["Offset of field: starpu_codelet::perf_counter_values"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_values) - 816usize] ; ["Offset of field: starpu_codelet::checked"] [:: std :: mem :: offset_of ! (starpu_codelet , checked) - 824usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Codelet with empty function defined for all drivers"] pub static mut starpu_codelet_nop : starpu_codelet ; } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_descr"] [:: std :: mem :: size_of :: < starpu_data_descr > () - 16usize] ; ["Alignment of starpu_data_descr"] [:: std :: mem :: align_of :: < starpu_data_descr > () - 8usize] ; ["Offset of field: starpu_data_descr::handle"] [:: std :: mem :: offset_of ! (starpu_data_descr , handle) - 0usize] ; ["Offset of field: starpu_data_descr::mode"] [:: std :: mem :: offset_of ! (starpu_data_descr , mode) - 8usize] ; } ; 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)] 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 = "Optional file name where the task was submitted. This can be useful\nfor debugging purposes."] pub file : * const :: std :: os :: raw :: c_char , # [doc = "Optional line number where the task was submitted. This can be useful\nfor debugging purposes."] pub line : :: std :: os :: raw :: c_int , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to NULL,\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 data 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\ndata 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 insufficient, 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 needed 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 insufficient,\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 NULL. 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 pointer which points to the return value of submitted task.\nThe default value is NULL. starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be used to respectively\npack and unpack the return value into and form it. starpu_task::cl_ret\ncan be used for MPI support. The only requirement is that\nthe size of the return value must be set in starpu_task::cl_ret_size ."] pub cl_ret : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. The buffer of starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be allocated with\nthe starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret.\nstarpu_task::cl_ret_size can be used for MPI support."] pub cl_ret_size : usize , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *) which\nspecifies a possible callback. If this pointer is non-NULL,\nthe callback function is executed on the host after the execution of\nthe task. Contrary to starpu_task::callback_func, it is called\nbefore releasing tasks which depend on this task, so those cannot be\nalready executing. The callback is passed\nthe value contained in the starpu_task::epilogue_callback_arg field.\nNo callback is executed if the field is set to NULL.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EPILOGUE_CALLBACK followed by the function pointer."] pub epilogue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is NULL. This is\nthe pointer passed to the epilogue callback function. This field is\nignored if the field starpu_task::epilogue_callback_func is set to\nNULL."] pub epilogue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, the callback function is executed on the\nhost after the execution of the task. Contrary to\nstarpu_task::epilogue_callback, it is called after releasing\ntasks which depend on this task, so those\nmight 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 NULL.\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 NULL. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\nNULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void*)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 = "Transaction to which the task belongs, if any"] pub transaction : * mut starpu_transaction , # [doc = "Transaction epoch to which the task belongs, if any"] pub trs_epoch : starpu_trs_epoch_t , # [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 this task has failed and will thus have to be retried\n\nSet by StarPU."] pub failed : :: 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\nCall starpu_task_status_get_as_string() to get the status as a string.\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 NULL."] 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 starpu_perfmodel_plot, 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 in microseconds. 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 = "When using hierarchical dags, the job identifier of the\nbubble task which created the current task"] pub bubble_parent : :: std :: os :: raw :: c_ulong , # [doc = "When using hierarchical dags, a pointer to the bubble\ndecision function"] pub bubble_func : starpu_bubble_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble decision function"] pub bubble_func_arg : * mut :: std :: os :: raw :: c_void , # [doc = "When using hierarchical dags, a pointer to the bubble\nDAG generation function"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble DAG generation function"] pub bubble_gen_dag_func_arg : * mut :: std :: os :: raw :: c_void , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task"] [:: std :: mem :: size_of :: < starpu_task > () - 552usize] ; ["Alignment of starpu_task"] [:: std :: mem :: align_of :: < starpu_task > () - 8usize] ; ["Offset of field: starpu_task::name"] [:: std :: mem :: offset_of ! (starpu_task , name) - 0usize] ; ["Offset of field: starpu_task::file"] [:: std :: mem :: offset_of ! (starpu_task , file) - 8usize] ; ["Offset of field: starpu_task::line"] [:: std :: mem :: offset_of ! (starpu_task , line) - 16usize] ; ["Offset of field: starpu_task::cl"] [:: std :: mem :: offset_of ! (starpu_task , cl) - 24usize] ; ["Offset of field: starpu_task::where_"] [:: std :: mem :: offset_of ! (starpu_task , where_) - 32usize] ; ["Offset of field: starpu_task::nbuffers"] [:: std :: mem :: offset_of ! (starpu_task , nbuffers) - 36usize] ; ["Offset of field: starpu_task::dyn_handles"] [:: std :: mem :: offset_of ! (starpu_task , dyn_handles) - 40usize] ; ["Offset of field: starpu_task::dyn_interfaces"] [:: std :: mem :: offset_of ! (starpu_task , dyn_interfaces) - 48usize] ; ["Offset of field: starpu_task::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_task , dyn_modes) - 56usize] ; ["Offset of field: starpu_task::handles"] [:: std :: mem :: offset_of ! (starpu_task , handles) - 64usize] ; ["Offset of field: starpu_task::interfaces"] [:: std :: mem :: offset_of ! (starpu_task , interfaces) - 128usize] ; ["Offset of field: starpu_task::modes"] [:: std :: mem :: offset_of ! (starpu_task , modes) - 192usize] ; ["Offset of field: starpu_task::handles_sequential_consistency"] [:: std :: mem :: offset_of ! (starpu_task , handles_sequential_consistency) - 224usize] ; ["Offset of field: starpu_task::cl_arg"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg) - 232usize] ; ["Offset of field: starpu_task::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg_size) - 240usize] ; ["Offset of field: starpu_task::cl_ret"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret) - 248usize] ; ["Offset of field: starpu_task::cl_ret_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret_size) - 256usize] ; ["Offset of field: starpu_task::epilogue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_func) - 264usize] ; ["Offset of field: starpu_task::epilogue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_arg) - 272usize] ; ["Offset of field: starpu_task::callback_func"] [:: std :: mem :: offset_of ! (starpu_task , callback_func) - 280usize] ; ["Offset of field: starpu_task::callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , callback_arg) - 288usize] ; ["Offset of field: starpu_task::prologue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_func) - 296usize] ; ["Offset of field: starpu_task::prologue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_arg) - 304usize] ; ["Offset of field: starpu_task::prologue_callback_pop_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_func) - 312usize] ; ["Offset of field: starpu_task::prologue_callback_pop_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_arg) - 320usize] ; ["Offset of field: starpu_task::transaction"] [:: std :: mem :: offset_of ! (starpu_task , transaction) - 328usize] ; ["Offset of field: starpu_task::trs_epoch"] [:: std :: mem :: offset_of ! (starpu_task , trs_epoch) - 336usize] ; ["Offset of field: starpu_task::tag_id"] [:: std :: mem :: offset_of ! (starpu_task , tag_id) - 344usize] ; ["Offset of field: starpu_task::mf_skip"] [:: std :: mem :: offset_of ! (starpu_task , mf_skip) - 354usize] ; ["Offset of field: starpu_task::failed"] [:: std :: mem :: offset_of ! (starpu_task , failed) - 355usize] ; ["Offset of field: starpu_task::scheduled"] [:: std :: mem :: offset_of ! (starpu_task , scheduled) - 356usize] ; ["Offset of field: starpu_task::prefetched"] [:: std :: mem :: offset_of ! (starpu_task , prefetched) - 357usize] ; ["Offset of field: starpu_task::workerid"] [:: std :: mem :: offset_of ! (starpu_task , workerid) - 360usize] ; ["Offset of field: starpu_task::workerorder"] [:: std :: mem :: offset_of ! (starpu_task , workerorder) - 364usize] ; ["Offset of field: starpu_task::workerids"] [:: std :: mem :: offset_of ! (starpu_task , workerids) - 368usize] ; ["Offset of field: starpu_task::workerids_len"] [:: std :: mem :: offset_of ! (starpu_task , workerids_len) - 376usize] ; ["Offset of field: starpu_task::priority"] [:: std :: mem :: offset_of ! (starpu_task , priority) - 380usize] ; ["Offset of field: starpu_task::status"] [:: std :: mem :: offset_of ! (starpu_task , status) - 384usize] ; ["Offset of field: starpu_task::magic"] [:: std :: mem :: offset_of ! (starpu_task , magic) - 388usize] ; ["Offset of field: starpu_task::type_"] [:: std :: mem :: offset_of ! (starpu_task , type_) - 392usize] ; ["Offset of field: starpu_task::color"] [:: std :: mem :: offset_of ! (starpu_task , color) - 396usize] ; ["Offset of field: starpu_task::sched_ctx"] [:: std :: mem :: offset_of ! (starpu_task , sched_ctx) - 400usize] ; ["Offset of field: starpu_task::hypervisor_tag"] [:: std :: mem :: offset_of ! (starpu_task , hypervisor_tag) - 404usize] ; ["Offset of field: starpu_task::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_task , possibly_parallel) - 408usize] ; ["Offset of field: starpu_task::bundle"] [:: std :: mem :: offset_of ! (starpu_task , bundle) - 416usize] ; ["Offset of field: starpu_task::profiling_info"] [:: std :: mem :: offset_of ! (starpu_task , profiling_info) - 424usize] ; ["Offset of field: starpu_task::flops"] [:: std :: mem :: offset_of ! (starpu_task , flops) - 432usize] ; ["Offset of field: starpu_task::predicted"] [:: std :: mem :: offset_of ! (starpu_task , predicted) - 440usize] ; ["Offset of field: starpu_task::predicted_transfer"] [:: std :: mem :: offset_of ! (starpu_task , predicted_transfer) - 448usize] ; ["Offset of field: starpu_task::predicted_start"] [:: std :: mem :: offset_of ! (starpu_task , predicted_start) - 456usize] ; ["Offset of field: starpu_task::prev"] [:: std :: mem :: offset_of ! (starpu_task , prev) - 464usize] ; ["Offset of field: starpu_task::next"] [:: std :: mem :: offset_of ! (starpu_task , next) - 472usize] ; ["Offset of field: starpu_task::starpu_private"] [:: std :: mem :: offset_of ! (starpu_task , starpu_private) - 480usize] ; ["Offset of field: starpu_task::omp_task"] [:: std :: mem :: offset_of ! (starpu_task , omp_task) - 488usize] ; ["Offset of field: starpu_task::bubble_parent"] [:: std :: mem :: offset_of ! (starpu_task , bubble_parent) - 496usize] ; ["Offset of field: starpu_task::bubble_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func) - 504usize] ; ["Offset of field: starpu_task::bubble_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func_arg) - 512usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func) - 520usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func_arg) - 528usize] ; ["Offset of field: starpu_task::nb_termination_call_required"] [:: std :: mem :: offset_of ! (starpu_task , nb_termination_call_required) - 536usize] ; ["Offset of field: starpu_task::sched_data"] [:: std :: mem :: offset_of ! (starpu_task , sched_data) - 544usize] ; } ; 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 unsafe fn cl_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn cl_ret_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_cl_ret_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 unsafe fn cl_ret_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_ret_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn 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_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 unsafe fn callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn epilogue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_epilogue_callback_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 unsafe fn epilogue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_epilogue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 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 (4usize , 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 (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 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 (5usize , 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 (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_pop_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_pop_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 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 (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_tag_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_tag_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 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 (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn sequential_consistency_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_sequential_consistency_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 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 (8usize , 1u8 , val as u64) } } # [inline] pub unsafe fn synchronous_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 8usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_synchronous_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 8usize , 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 (9usize , 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 (9usize , 1u8 , val as u64) } } # [inline] pub unsafe fn execute_on_a_specific_worker_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 9usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_execute_on_a_specific_worker_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 9usize , 1u8 , val as u64 ,) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 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 (10usize , 1u8 , val as u64) } } # [inline] pub unsafe fn detach_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 10usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_detach_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 10usize , 1u8 , val as u64 ,) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 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 (11usize , 1u8 , val as u64) } } # [inline] pub unsafe fn destroy_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 11usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_destroy_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 11usize , 1u8 , val as u64 ,) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (12usize , 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 (12usize , 1u8 , val as u64) } } # [inline] pub unsafe fn regenerate_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 12usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_regenerate_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 12usize , 1u8 , val as u64 ,) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (13usize , 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 (13usize , 1u8 , val as u64) } } # [inline] pub unsafe fn no_submitorder_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 13usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_no_submitorder_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 13usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , cl_ret_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , epilogue_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 cl_ret_free : u32 = unsafe { :: std :: mem :: transmute (cl_ret_free) } ; cl_ret_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let epilogue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (epilogue_callback_arg_free) } ; epilogue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 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 (5usize , 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 (6usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (9usize , 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 (10usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (12usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (13usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } unsafe 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.\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_init (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_clean (task : * mut starpu_task) ; } unsafe 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().\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_create () -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Allocate a task structure that does nothing but accesses data \\p handle\nwith mode \\p mode. This allows to synchronize with the task graph, according\nto the sequential consistency, against tasks submitted before or after\nsubmitting this task. One can then use starpu_task_declare_deps_array() or\nstarpu_task_end_dep_add() / starpu_task_end_dep_release() to add dependencies\nagainst this task before submitting it.\nSee \\ref SynchronizationTasks for more details."] pub fn starpu_task_create_sync (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> * mut starpu_task ; } unsafe 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.\nSee \\ref Per-taskFeedback and \\ref PerformanceModelExample for more details."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Tell StarPU to free the resources associated with \\p task when the task is\nover. This is equivalent to having set task->destroy = 1 before submission,\nthe difference is that this can be called after submission and properly deals\nwith concurrency with the task execution.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_set_destroy (task : * mut starpu_task) ; } unsafe 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-ENODEV 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Submit \\p task to StarPU with dependency bypass.\n\nThis can only be called on behalf of another task which has already taken the\nproper dependencies, e.g. this task is just an attempt of doing the actual\ncomputation of that task.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_submit_nodeps (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingTasksToAContext for more details."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if \\p task is terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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, -EINVAL indicates that the\nspecified task was either synchronous or detached.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, -EINVAL indicates that\none of the tasks was either synchronous or detached.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowtoReuseMemory for more details."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] 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 ; } unsafe extern "C" { # [doc = "Wait until there is no more ready task.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_pop () ; } unsafe extern "C" { # [doc = "See \\ref GraphScheduling for more details."] pub fn starpu_do_schedule () ; } unsafe 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++.\nSee \\ref DefiningACodelet for more details."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl.\nSee \\ref Per-codeletFeedback for more details."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Return the task currently executed by the worker, or NULL 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.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_task_get_current () -> * mut starpu_task ; } unsafe 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.\n\nSee \\ref SpecifyingATargetNode for more details."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the name of the performance model of \\p task.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref TraceTaskDetails for more details."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Create and submit an empty task with the given callback.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Function to be used as a prologue callback to enable fault tolerance for the\ntask. This prologue will create a try-task, i.e a duplicate of the task,\nwhich will to the actual computation.\n\nThe prologue argument can be set to a check_ft function that will be\ncalled on termination of the duplicate, which can check the result of the\ntask, and either confirm success, or resubmit another attempt.\nIf it is not set, the default implementation is to just resubmit a new\ntry-task.\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_prologue (check_ft : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Create a try-task for a \\p meta_task, given a \\p template_task task\ntemplate. The meta task can be passed as template on the first call, but\nsince it is mangled by starpu_task_ft_create_retry(), further calls\n(typically made by the check_ft callback) need to be passed the previous\ntry-task as template task.\n\n\\p check_ft is similar to the prologue argument of\nstarpu_task_ft_prologue(), and is typically set to the very function calling\nstarpu_task_ft_create_retry().\n\nThe try-task is returned, and can be modified (e.g. to change scheduling\nparameters) before being submitted with starpu_task_submit_nodeps().\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_create_retry (meta_task : * const starpu_task , template_task : * const starpu_task , check_ft : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Record that this task failed, and should thus be retried.\nThis is usually called from the task codelet function itself, after checking\nthe result and noticing that the computation went wrong, and thus the task\nshould be retried. The performance of this task execution will not be\nrecorded for performance models.\n\nThis can only be called for a task whose data access modes are either\n::STARPU_R and ::STARPU_W."] pub fn starpu_task_ft_failed (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Notify that the try-task was successful and thus the meta-task was\nsuccessful.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_success (meta_task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for \\ref STARPU_WATCHDOG_TIMEOUT seconds.\nSee \\ref WatchdogSupport for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the given status as a string"] pub fn starpu_task_status_get_as_string (status : starpu_task_status) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Specify a minimum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MIN_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_min_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Specify a maximum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MAX_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_max_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Function to open a new transaction object and start the first transaction epoch.\n\n@return A pointer to an initializes struct starpu_transaction\nor \\c NULL if submitting the transaction begin task failed with \\c ENODEV.\nSee \\ref TransactionsCreation for more details."] pub fn starpu_transaction_open (do_start_func : :: std :: option :: Option < unsafe extern "C" fn (buffer : * mut :: std :: os :: raw :: c_void , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , do_start_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_transaction ; } unsafe extern "C" { # [doc = "Function to mark the end of the current transaction epoch and start a new epoch.\nSee \\ref TransactionsEpochNext for more details."] pub fn starpu_transaction_next_epoch (p_trs : * mut starpu_transaction , do_start_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Function to mark the end of the last transaction epoch and free the transaction object.\nSee \\ref TransactionsClosing for more details."] pub fn starpu_transaction_close (p_trs : * mut starpu_transaction) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; # [doc = "< CPU core"] pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; # [doc = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_RAM : starpu_node_kind = 4 ; # [doc = "< Disk memory"] pub const STARPU_DISK_RAM : starpu_node_kind = 5 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_RAM : starpu_node_kind = 7 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_RAM : starpu_node_kind = 8 ; # [doc = "< Maximum value of memory types"] pub const STARPU_MAX_RAM : starpu_node_kind = 8 ; # [doc = "< Number of memory types"] pub const STARPU_NRAM : starpu_node_kind = 9 ; # [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 = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_WORKER : starpu_worker_archtype = 4 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_WORKER : starpu_worker_archtype = 6 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_WORKER : starpu_worker_archtype = 7 ; # [doc = "< Number of arch types"] pub const STARPU_NARCH : starpu_worker_archtype = 8 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 255 ; # [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)] 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 ; 48usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_ctx_iterator"] [:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () - 80usize] ; ["Alignment of starpu_sched_ctx_iterator"] [:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::cursor"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , cursor) - 0usize] ; ["Offset of field: starpu_sched_ctx_iterator::value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , value) - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::possible_value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possible_value) - 16usize] ; ["Offset of field: starpu_sched_ctx_iterator::visited"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , visited) - 24usize] ; ["Offset of field: starpu_sched_ctx_iterator::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possibly_parallel) - 72usize] ; } ; 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)] 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 ; 48usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 48usize] , pub is_master : [:: std :: os :: raw :: c_char ; 48usize] , # [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 collection"] 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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_worker_collection"] [:: std :: mem :: size_of :: < starpu_worker_collection > () - 264usize] ; ["Alignment of starpu_worker_collection"] [:: std :: mem :: align_of :: < starpu_worker_collection > () - 8usize] ; ["Offset of field: starpu_worker_collection::workerids"] [:: std :: mem :: offset_of ! (starpu_worker_collection , workerids) - 0usize] ; ["Offset of field: starpu_worker_collection::collection_private"] [:: std :: mem :: offset_of ! (starpu_worker_collection , collection_private) - 8usize] ; ["Offset of field: starpu_worker_collection::nworkers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nworkers) - 16usize] ; ["Offset of field: starpu_worker_collection::unblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , unblocked_workers) - 24usize] ; ["Offset of field: starpu_worker_collection::nunblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nunblocked_workers) - 32usize] ; ["Offset of field: starpu_worker_collection::masters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , masters) - 40usize] ; ["Offset of field: starpu_worker_collection::nmasters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nmasters) - 48usize] ; ["Offset of field: starpu_worker_collection::present"] [:: std :: mem :: offset_of ! (starpu_worker_collection , present) - 52usize] ; ["Offset of field: starpu_worker_collection::is_unblocked"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_unblocked) - 100usize] ; ["Offset of field: starpu_worker_collection::is_master"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_master) - 148usize] ; ["Offset of field: starpu_worker_collection::type_"] [:: std :: mem :: offset_of ! (starpu_worker_collection , type_) - 196usize] ; ["Offset of field: starpu_worker_collection::has_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , has_next) - 200usize] ; ["Offset of field: starpu_worker_collection::get_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , get_next) - 208usize] ; ["Offset of field: starpu_worker_collection::add"] [:: std :: mem :: offset_of ! (starpu_worker_collection , add) - 216usize] ; ["Offset of field: starpu_worker_collection::remove"] [:: std :: mem :: offset_of ! (starpu_worker_collection , remove) - 224usize] ; ["Offset of field: starpu_worker_collection::init"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init) - 232usize] ; ["Offset of field: starpu_worker_collection::deinit"] [:: std :: mem :: offset_of ! (starpu_worker_collection , deinit) - 240usize] ; ["Offset of field: starpu_worker_collection::init_iterator"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator) - 248usize] ; ["Offset of field: starpu_worker_collection::init_iterator_for_parallel_tasks"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator_for_parallel_tasks) - 256usize] ; } ; 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 () } } } unsafe extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } unsafe extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } unsafe extern "C" { # [doc = "Wait for all workers to be initialised. Calling this function is\nnormally not necessary. It is called for example in\ntools/starpu_machine_display to make sure all workers\ninformation are correctly set before printing their information.\nSee \\ref PauseResume for more details."] pub fn starpu_worker_wait_for_initialisation () ; } unsafe extern "C" { # [doc = "Return true if type matches one of StarPU's defined worker architectures.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_archtype_is_valid (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Convert a mask of architectures to a worker archtype.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_arch_mask_to_worker_archtype (mask : :: std :: os :: raw :: c_uint) -> starpu_worker_archtype ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of HIP devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXHIPDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_hip_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of TCPIP Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_tcpip_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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).\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_sched_find_all_worker_combinations () ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\nNULL) value is returned in case of success, -EINVAL\nindicates that \\p type is not valid otherwise.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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-ERANGE 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return true if worker type can execute this task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_type_can_execute_task (worker_type : starpu_worker_archtype , task : * const starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all workers.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_all (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe extern "C" { # [doc = "Display on \\p output the number of workers of the given \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_count (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe 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 hwloc in case it is available.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devnum (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_subworkerid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return when the current task is expected to be finished.\n\nNote: the returned date should be used with caution since the task might very\nwell end just after this function returns.\n\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_worker_get_current_task_exp_end (workerid : :: std :: os :: raw :: c_uint , date : * mut timespec) ; } unsafe extern "C" { # [doc = "Return whether worker \\p workerid is currently blocked in a parallel task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return worker \\p type from a string.\nReturns STARPU_UNKNOWN_WORKER if the string doesn't match a worker type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_from_string (type_ : * const :: std :: os :: raw :: c_char) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string suitable for environment variable names (CPU, CUDA, etc.).\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_env_var (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe 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().\nSee \\ref InteroperabilityHWLOC for more details."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } unsafe extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to the worker \\p workerid.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } unsafe extern "C" { # [doc = "See \\ref TopologyMemory for more details."] pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the memory node associated to the current worker.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes of a given \\p kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count_by_kind (kind : starpu_node_kind) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Get the list of memory nodes of kind \\p kind.\nFill the array \\p memory_nodes_ids with the memory nodes numbers.\nThe argument \\p maxsize indicates the size of the array\n\\p memory_nodes_ids. The return value gives the number of node numbers\nthat were put in the array. -ERANGE is returned if \\p maxsize\nis lower than the number of memory nodes with the appropriate kind: in that\ncase, the array is filled with the \\p maxsize first elements. To avoid such\noverflows, the value of maxsize can be chosen by the means of function\nstarpu_memory_nodes_get_count_by_kind(), or by passing a value greater or\nequal to \\ref STARPU_MAXNODES.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_ids_by_type (kind : starpu_node_kind , memory_nodes_ids : * mut :: std :: os :: raw :: c_uint , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } unsafe extern "C" { # [doc = "Return the type of worker which operates on memory node kind \\p node_kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_worker_archtype (node_kind : starpu_node_kind) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the type of memory node that arch type \\p type operates on.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node_kind (type_ : starpu_worker_archtype) -> starpu_node_kind ; } unsafe 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 ; } unsafe 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 UINT_MAX-1 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_on () ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_off () ; } unsafe extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Acquire the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock_self () ; } unsafe extern "C" { # [doc = "Release the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock_self () ; } unsafe extern "C" { # [doc = "Return the number of different combined workers.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the current combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref Fork-modeParallelTasks and \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Register a new combined worker and get its identifier.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Get the description of a combined worker.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } unsafe 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).\nSee \\ref SchedulingHelpers for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_device"] [:: std :: mem :: size_of :: < starpu_perfmodel_device > () - 12usize] ; ["Alignment of starpu_perfmodel_device"] [:: std :: mem :: align_of :: < starpu_perfmodel_device > () - 4usize] ; ["Offset of field: starpu_perfmodel_device::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , type_) - 0usize] ; ["Offset of field: starpu_perfmodel_device::devid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , devid) - 4usize] ; ["Offset of field: starpu_perfmodel_device::ncores"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , ncores) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_arch > () - 16usize] ; ["Alignment of starpu_perfmodel_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_arch::ndevices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , ndevices) - 0usize] ; ["Offset of field: starpu_perfmodel_arch::devices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , devices) - 8usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_entry"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () - 88usize] ; ["Alignment of starpu_perfmodel_history_entry"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::mean"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , mean) - 0usize] ; ["Offset of field: starpu_perfmodel_history_entry::deviation"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , deviation) - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum) - 16usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum2) - 24usize] ; ["Offset of field: starpu_perfmodel_history_entry::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nsample) - 32usize] ; ["Offset of field: starpu_perfmodel_history_entry::nerror"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nerror) - 36usize] ; ["Offset of field: starpu_perfmodel_history_entry::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel_history_entry::size"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , size) - 48usize] ; ["Offset of field: starpu_perfmodel_history_entry::flops"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , flops) - 56usize] ; ["Offset of field: starpu_perfmodel_history_entry::duration"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , duration) - 64usize] ; ["Offset of field: starpu_perfmodel_history_entry::tag"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , tag) - 72usize] ; ["Offset of field: starpu_perfmodel_history_entry::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , parameters) - 80usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_list"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () - 16usize] ; ["Alignment of starpu_perfmodel_history_list"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_list::next"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , next) - 0usize] ; ["Offset of field: starpu_perfmodel_history_list::entry"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , entry) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_regression_model"] [:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () - 120usize] ; ["Alignment of starpu_perfmodel_regression_model"] [:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlny) - 0usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx) - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx2) - 16usize] ; ["Offset of field: starpu_perfmodel_regression_model::minx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , minx) - 24usize] ; ["Offset of field: starpu_perfmodel_regression_model::maxx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , maxx) - 32usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnxlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnxlny) - 40usize] ; ["Offset of field: starpu_perfmodel_regression_model::alpha"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , alpha) - 48usize] ; ["Offset of field: starpu_perfmodel_regression_model::beta"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , beta) - 56usize] ; ["Offset of field: starpu_perfmodel_regression_model::valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , valid) - 64usize] ; ["Offset of field: starpu_perfmodel_regression_model::a"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , a) - 72usize] ; ["Offset of field: starpu_perfmodel_regression_model::b"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , b) - 80usize] ; ["Offset of field: starpu_perfmodel_regression_model::c"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , c) - 88usize] ; ["Offset of field: starpu_perfmodel_regression_model::nl_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nl_valid) - 96usize] ; ["Offset of field: starpu_perfmodel_regression_model::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nsample) - 100usize] ; ["Offset of field: starpu_perfmodel_regression_model::coeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , coeff) - 104usize] ; ["Offset of field: starpu_perfmodel_regression_model::ncoeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , ncoeff) - 112usize] ; ["Offset of field: starpu_perfmodel_regression_model::multi_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , multi_valid) - 116usize] ; } ; 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)] 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_per_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () - 408usize] ; ["Alignment of starpu_perfmodel_per_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , cost_function) - 0usize] ; ["Offset of field: starpu_perfmodel_per_arch::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , size_base) - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::history"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , history) - 16usize] ; ["Offset of field: starpu_perfmodel_per_arch::list"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , list) - 24usize] ; ["Offset of field: starpu_perfmodel_per_arch::regression"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , regression) - 32usize] ; ["Offset of field: starpu_perfmodel_per_arch::debug_path"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , debug_path) - 152usize] ; } ; 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-worker cost model function"] pub const STARPU_PER_WORKER : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 2 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 3 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic linear regression-based cost model (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 7 ; # [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)] pub struct starpu_perfmodel { # [doc = "type of performance model\n\n- \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
\n- \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
\n- \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
\n- \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
\n
"] 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_PER_ARCH. 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_PER_WORKER. Take a task, a worker id and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that worker."] pub worker_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not NULL, 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 NULL, 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 = "name of the file storing the performance model. It is non\nNULL if the model has been loaded or stored in a file."] pub path : * mut :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel"] [:: std :: mem :: size_of :: < starpu_perfmodel > () - 128usize] ; ["Alignment of starpu_perfmodel"] [:: std :: mem :: align_of :: < starpu_perfmodel > () - 8usize] ; ["Offset of field: starpu_perfmodel::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel , type_) - 0usize] ; ["Offset of field: starpu_perfmodel::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , cost_function) - 8usize] ; ["Offset of field: starpu_perfmodel::arch_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , arch_cost_function) - 16usize] ; ["Offset of field: starpu_perfmodel::worker_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , worker_cost_function) - 24usize] ; ["Offset of field: starpu_perfmodel::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel , size_base) - 32usize] ; ["Offset of field: starpu_perfmodel::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel::symbol"] [:: std :: mem :: offset_of ! (starpu_perfmodel , symbol) - 48usize] ; ["Offset of field: starpu_perfmodel::path"] [:: std :: mem :: offset_of ! (starpu_perfmodel , path) - 56usize] ; ["Offset of field: starpu_perfmodel::is_loaded"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_loaded) - 64usize] ; ["Offset of field: starpu_perfmodel::benchmarking"] [:: std :: mem :: offset_of ! (starpu_perfmodel , benchmarking) - 68usize] ; ["Offset of field: starpu_perfmodel::is_init"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_init) - 72usize] ; ["Offset of field: starpu_perfmodel::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters) - 80usize] ; ["Offset of field: starpu_perfmodel::parameters_names"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters_names) - 88usize] ; ["Offset of field: starpu_perfmodel::nparameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , nparameters) - 96usize] ; ["Offset of field: starpu_perfmodel::combinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , combinations) - 104usize] ; ["Offset of field: starpu_perfmodel::ncombinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , ncombinations) - 112usize] ; ["Offset of field: starpu_perfmodel::state"] [:: std :: mem :: offset_of ! (starpu_perfmodel , state) - 120usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = "Deinitialize the \\p model performance model structure. You need to call this\nbefore deallocating the structure. You will probably want to call\nstarpu_perfmodel_unload_model() before calling this function, to save the perfmodel."] pub fn starpu_perfmodel_deinit (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_start - start counting hardware events in an event set\n\n- \\p workerid is the worker on which calibration is to be performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration will be run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_start (workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_stop - stop counting hardware events in an event set\n\n- \\p model is the energy performance model to be filled with the result\n- \\p task is a task specimen, so the performance model folds the result according to the parameter sizes of the task.\n- \\p nimpl is the implementation number run during calibration\n- \\p ntasks is the number of tasks run during calibration\n- \\p workerid is the worker on which calibration was performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration was run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_stop (model : * mut starpu_perfmodel , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint , ntasks : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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$STARPU_HOME/.starpu. 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Save the performance model in its file."] pub fn starpu_save_history_based_model (model : * mut starpu_perfmodel) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } unsafe 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 tools/starpu_perfmodel_display.c."] pub fn starpu_perfmodel_free_sampling () ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the estimated time in µs 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 ; } unsafe 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 () ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with one explicit\nmeasurement (in µs or J), 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.\n\nNote that this records only one measurement, and StarPU would ignore\nthe first measurement (since it is usually disturbed by library loading\netc.). Make sure to call this function several times to record all your\nmeasurements.\n\nYou can also call starpu_perfmodel_update_history_n() to directly provide an\naverage performed on several tasks.\n\nSee \\ref PerformanceModelCalibration for more details."] 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) ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with an explicit average measurement (in µs or J).\n\nThis is similar to starpu_perfmodel_update_history(), but records a batch of\n\\p number measurements provided as the average of the measurements \\p average_measured."] pub fn starpu_perfmodel_update_history_n (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 , average_measured : f64 , number : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the latency of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task_list"] [:: std :: mem :: size_of :: < starpu_task_list > () - 16usize] ; ["Alignment of starpu_task_list"] [:: std :: mem :: align_of :: < starpu_task_list > () - 8usize] ; ["Offset of field: starpu_task_list::head"] [:: std :: mem :: offset_of ! (starpu_task_list , head) - 0usize] ; ["Offset of field: starpu_task_list::tail"] [:: std :: mem :: offset_of ! (starpu_task_list , tail) - 8usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize a list structure.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } unsafe extern "C" { # [doc = "Push \\p task at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Push \\p task at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Get the front of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the back of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test if \\p list is empty.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Remove \\p task from \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Remove the element at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Remove the element at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the first task of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the end of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Move list from one head \\p lsrc to another \\p ldst.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } unsafe 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\n- ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n
- ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n
- ::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
- ::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
- 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
\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.\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Identical to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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\ntask->dyn_handles array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating task->dyn_handles 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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().\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [doc = "Structure to be used for starpu_codelet_pack_arg_init() & co, and\nstarpu_codelet_unpack_arg_init() & co. The contents is public,\nhowever users should not directly access it, but only use as a\nparameter to the appropriate functions."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub arg_buffer_used : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet_pack_arg_data"] [:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () - 40usize] ; ["Alignment of starpu_codelet_pack_arg_data"] [:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer) - 0usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_size"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_size) - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_used"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_used) - 16usize] ; ["Offset of field: starpu_codelet_pack_arg_data::current_offset"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , current_offset) - 24usize] ; ["Offset of field: starpu_codelet_pack_arg_data::nargs"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , nargs) - 32usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } unsafe extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times.\nSee \\ref InsertTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } unsafe extern "C" { # [doc = "Initialize \\p state with \\p cl_arg and \\p cl_arg_size. This has to\nbe called before calling starpu_codelet_unpack_arg().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_init (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut :: std :: os :: raw :: c_void , cl_arg_size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of size \\p size from \\p state into \\p ptr with a copy.\n\\p state has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr\nwith a copy. \\p ptr is allocated before copying in it the value of\nthe argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_dup_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr.\n\\p ptr will be a pointer to the memory of the argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pick_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Finish unpacking data, after calling starpu_codelet_unpack_arg_init()\nonce and starpu_codelet_unpack_arg() or starpu_codelet_dup_arg() or\nstarpu_codelet_pick_arg() several times.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_fini (state : * mut starpu_codelet_pack_arg_data) ; } unsafe extern "C" { # [doc = "Call this function during unpacking to skip saving the argument in ptr.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_discard_arg (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] 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\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here given the task
\n- starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here gives back the task to the core. It must not\naccess this task any more
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- 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.
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n\nNote: to get an estimation of the task duration, \\p perf_workerid\nneeds to be used rather than \\p workerid, for the case of parallel\ntasks."] 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 NULL, 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 = "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 = " Whether this scheduling policy does data prefetching, and thus the\ncore should not try to do it opportunistically."] pub prefetches : :: std :: os :: raw :: c_int , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_policy"] [:: std :: mem :: size_of :: < starpu_sched_policy > () - 128usize] ; ["Alignment of starpu_sched_policy"] [:: std :: mem :: align_of :: < starpu_sched_policy > () - 8usize] ; ["Offset of field: starpu_sched_policy::init_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , init_sched) - 0usize] ; ["Offset of field: starpu_sched_policy::deinit_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , deinit_sched) - 8usize] ; ["Offset of field: starpu_sched_policy::push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task) - 16usize] ; ["Offset of field: starpu_sched_policy::simulate_push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , simulate_push_task) - 24usize] ; ["Offset of field: starpu_sched_policy::push_task_notify"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task_notify) - 32usize] ; ["Offset of field: starpu_sched_policy::pop_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pop_task) - 40usize] ; ["Offset of field: starpu_sched_policy::submit_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , submit_hook) - 48usize] ; ["Offset of field: starpu_sched_policy::pre_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pre_exec_hook) - 56usize] ; ["Offset of field: starpu_sched_policy::post_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , post_exec_hook) - 64usize] ; ["Offset of field: starpu_sched_policy::do_schedule"] [:: std :: mem :: offset_of ! (starpu_sched_policy , do_schedule) - 72usize] ; ["Offset of field: starpu_sched_policy::add_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , add_workers) - 80usize] ; ["Offset of field: starpu_sched_policy::remove_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , remove_workers) - 88usize] ; ["Offset of field: starpu_sched_policy::prefetches"] [:: std :: mem :: offset_of ! (starpu_sched_policy , prefetches) - 96usize] ; ["Offset of field: starpu_sched_policy::policy_name"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_name) - 104usize] ; ["Offset of field: starpu_sched_policy::policy_description"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_description) - 112usize] ; ["Offset of field: starpu_sched_policy::worker_type"] [:: std :: mem :: offset_of ! (starpu_sched_policy , worker_type) - 120usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Return an NULL-terminated array of all the predefined\nscheduling policies.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a scheduling policy to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policy (name : * const :: std :: os :: raw :: c_char) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a list of scheduling policies to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the default context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the given context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy () -> * mut starpu_sched_policy ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the job identifier associated with the task.\nSee \\ref TraceSchedTaskDetails for more details."] pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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 impl_mask == NULL to check for at\nleast one implementation without determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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\nimpl_mask == NULL to check for at least one implementation\nwithout determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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. \\p back is ignored: the task priority is\nused to order tasks in this queue.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions.\nSee \\ref PerformanceModelExample for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions).\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds on a given architecture \\p arch using given implementation \\p nimpl.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_length() but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_length (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the durations using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the durations.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } unsafe extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return expected energy use in J.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_energy but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_energy (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task energy use in J, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the energy uses using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the energy uses.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only).\nSee \\ref SchedulingHelpers for more details."] 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) > ; unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "The scheduling policy should call this when it makes a scheduling decision\nfor a task. This will possibly stop execution at this point, and then the\nprogrammer can inspect local variables etc. to determine why this scheduling\ndecision was done.\n\nSee \\ref STARPU_TASK_BREAK_ON_SCHED\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_task_break (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n- ::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
\n- ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n
\n- ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n
\n- ::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
\n
\nSee \\ref CreatingAContext for more details."] 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto.\nSee \\ref SubmittingTasksToAContext and \\ref TmpCTXS for more details."] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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.\nSee \\ref EmptyingAContext for more details."] pub fn starpu_sched_ctx_stop_task_submission () ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the function associated with the scheduler context \\p\nsched_ctx_id which was given through the field\nstarpu_conf::sched_policy_callback"] pub fn starpu_sched_ctx_get_sched_policy_callback (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; unsafe extern "C" { # [doc = "Initialize HIPBLAS on every HIPdevice. The\nHIPBLAS library must be initialized prior to any HIPBLAS call. Calling\nstarpu_hipblas_init() will initialize HIPBLAS on every HIP device\ncontrolled by StarPU. This call blocks until HIPBLAS has been properly\ninitialized on every device."] pub fn starpu_hipblas_init () ; } pub type hipblasHandle_t = * mut :: std :: os :: raw :: c_void ; unsafe extern "C" { # [doc = "Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It\nis properly initialized and configured for multistream by\nstarpu_hipblas_init()."] pub fn starpu_hipblas_get_local_handle () -> hipblasHandle_t ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the HIPBLAS library on\nevery HIP device."] pub fn starpu_hipblas_shutdown () ; } unsafe 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. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_init () ; } unsafe 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().\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_set_stream () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device.\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_shutdown () ; } unsafe extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_init () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_shutdown () ; } unsafe extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Stop recording tasks\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_stop () ; } unsafe extern "C" { # [doc = "Emit the DAG that was recorded on \\p output.\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } unsafe 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. \\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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_lp (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_mps (output : * mut FILE) ; } unsafe 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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a pointer value seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_ptr (input : * mut :: std :: os :: raw :: c_void , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc current\nstate. The return value should be considered as the new current\nstate for future CRC computation. This is used for computing data\nsize footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] 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 , # [doc = " PAPI Events"] pub papi_values : [:: std :: os :: raw :: c_longlong ; 15usize] , pub papi_event_set : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_task_info"] [:: std :: mem :: size_of :: < starpu_profiling_task_info > () - 368usize] ; ["Alignment of starpu_profiling_task_info"] [:: std :: mem :: align_of :: < starpu_profiling_task_info > () - 8usize] ; ["Offset of field: starpu_profiling_task_info::submit_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , submit_time) - 0usize] ; ["Offset of field: starpu_profiling_task_info::push_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_start_time) - 16usize] ; ["Offset of field: starpu_profiling_task_info::push_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_end_time) - 32usize] ; ["Offset of field: starpu_profiling_task_info::pop_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_start_time) - 48usize] ; ["Offset of field: starpu_profiling_task_info::pop_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_end_time) - 64usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_start_time) - 80usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_end_time) - 96usize] ; ["Offset of field: starpu_profiling_task_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , start_time) - 112usize] ; ["Offset of field: starpu_profiling_task_info::end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , end_time) - 128usize] ; ["Offset of field: starpu_profiling_task_info::release_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_start_time) - 144usize] ; ["Offset of field: starpu_profiling_task_info::release_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_end_time) - 160usize] ; ["Offset of field: starpu_profiling_task_info::callback_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_start_time) - 176usize] ; ["Offset of field: starpu_profiling_task_info::callback_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_end_time) - 192usize] ; ["Offset of field: starpu_profiling_task_info::workerid"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , workerid) - 208usize] ; ["Offset of field: starpu_profiling_task_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , used_cycles) - 216usize] ; ["Offset of field: starpu_profiling_task_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , stall_cycles) - 224usize] ; ["Offset of field: starpu_profiling_task_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , energy_consumed) - 232usize] ; ["Offset of field: starpu_profiling_task_info::papi_values"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_values) - 240usize] ; ["Offset of field: starpu_profiling_task_info::papi_event_set"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_event_set) - 360usize] ; } ; 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: {:?}, papi_values: {:?}, papi_event_set: {:?} }}" , self . workerid , self . energy_consumed , self . papi_values , self . papi_event_set) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info().\n\nThe executing_time, callback_time, waiting_time, sleeping_time, and\nscheduling_time are exclusive to each other, i.e. they can be added up, their\nsum is smaller than total_time. The difference between total_time and the sum\nis the uncategorized runtime overhead."] # [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 by the worker to execute callbacks, while not executing a\n task, during the profiling measurement interval."] pub callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish,\n while not executing a task or a callback, during the profiling\n measurement interval."] pub waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available, and\n not executing a task or a callback or waiting for a data transfer to\n finish, during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks, while not executing a\n task or a callback or waiting for a data transfer to finish, and there\n are tasks to be scheduled, during the profiling measurement interval."] pub scheduling_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval.\n Normally always equal to executing_time."] pub all_executing_time : timespec , # [doc = " Time spent by the worker to execute callbacks during the profiling measurement interval.\n Normally always greater than callback_time."] pub all_callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval.\n Normally always greater than waiting_time."] pub all_waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available during the profiling measurement interval.\n Normally always greater than sleeping_time."] pub all_sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks during the profiling measurement interval.\n Normally always greater than scheduling_time."] pub all_scheduling_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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_worker_info"] [:: std :: mem :: size_of :: < starpu_profiling_worker_info > () - 232usize] ; ["Alignment of starpu_profiling_worker_info"] [:: std :: mem :: align_of :: < starpu_profiling_worker_info > () - 8usize] ; ["Offset of field: starpu_profiling_worker_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_worker_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_worker_info::executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executing_time) - 32usize] ; ["Offset of field: starpu_profiling_worker_info::callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , callback_time) - 48usize] ; ["Offset of field: starpu_profiling_worker_info::waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , waiting_time) - 64usize] ; ["Offset of field: starpu_profiling_worker_info::sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , sleeping_time) - 80usize] ; ["Offset of field: starpu_profiling_worker_info::scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , scheduling_time) - 96usize] ; ["Offset of field: starpu_profiling_worker_info::all_executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_executing_time) - 112usize] ; ["Offset of field: starpu_profiling_worker_info::all_callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_callback_time) - 128usize] ; ["Offset of field: starpu_profiling_worker_info::all_waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_waiting_time) - 144usize] ; ["Offset of field: starpu_profiling_worker_info::all_sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_sleeping_time) - 160usize] ; ["Offset of field: starpu_profiling_worker_info::all_scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_scheduling_time) - 176usize] ; ["Offset of field: starpu_profiling_worker_info::executed_tasks"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executed_tasks) - 192usize] ; ["Offset of field: starpu_profiling_worker_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , used_cycles) - 200usize] ; ["Offset of field: starpu_profiling_worker_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , stall_cycles) - 208usize] ; ["Offset of field: starpu_profiling_worker_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , energy_consumed) - 216usize] ; ["Offset of field: starpu_profiling_worker_info::flops"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , flops) - 224usize] ; } ; 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) } } # [doc = "todo"] # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_bus_info"] [:: std :: mem :: size_of :: < starpu_profiling_bus_info > () - 48usize] ; ["Alignment of starpu_profiling_bus_info"] [:: std :: mem :: align_of :: < starpu_profiling_bus_info > () - 8usize] ; ["Offset of field: starpu_profiling_bus_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_bus_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_bus_info::transferred_bytes"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transferred_bytes) - 32usize] ; ["Offset of field: starpu_profiling_bus_info::transfer_count"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transfer_count) - 40usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_init () ; } unsafe extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init().\nSee \\ref TraceMpi for more details."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } unsafe 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 NULL, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned.\nSee \\ref Per-workerFeedback for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of buses in the machine.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the source point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the destination point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref FeedBackFigures for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } unsafe extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_bus_helper_display_summary () ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_worker_helper_display_summary () ; } unsafe 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).\nSee \\ref MemoryFeedback for more details."] pub fn starpu_data_display_memory_stats () ; } pub const starpu_prof_tool_event_none : starpu_prof_tool_event = 0 ; pub const starpu_prof_tool_event_init : starpu_prof_tool_event = 1 ; pub const starpu_prof_tool_event_terminate : starpu_prof_tool_event = 2 ; pub const starpu_prof_tool_event_init_begin : starpu_prof_tool_event = 3 ; pub const starpu_prof_tool_event_init_end : starpu_prof_tool_event = 4 ; pub const starpu_prof_tool_event_driver_init : starpu_prof_tool_event = 5 ; pub const starpu_prof_tool_event_driver_deinit : starpu_prof_tool_event = 6 ; pub const starpu_prof_tool_event_driver_init_start : starpu_prof_tool_event = 7 ; pub const starpu_prof_tool_event_driver_init_end : starpu_prof_tool_event = 8 ; pub const starpu_prof_tool_event_start_cpu_exec : starpu_prof_tool_event = 9 ; pub const starpu_prof_tool_event_end_cpu_exec : starpu_prof_tool_event = 10 ; pub const starpu_prof_tool_event_start_gpu_exec : starpu_prof_tool_event = 11 ; pub const starpu_prof_tool_event_end_gpu_exec : starpu_prof_tool_event = 12 ; pub const starpu_prof_tool_event_start_transfer : starpu_prof_tool_event = 13 ; pub const starpu_prof_tool_event_end_transfer : starpu_prof_tool_event = 14 ; pub const starpu_prof_tool_event_user_start : starpu_prof_tool_event = 15 ; pub const starpu_prof_tool_event_user_end : starpu_prof_tool_event = 16 ; # [doc = "Event type"] pub type starpu_prof_tool_event = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_driver_cpu : starpu_prof_tool_driver_type = 0 ; pub const starpu_prof_tool_driver_gpu : starpu_prof_tool_driver_type = 1 ; pub const starpu_prof_tool_driver_hip : starpu_prof_tool_driver_type = 2 ; pub const starpu_prof_tool_driver_ocl : starpu_prof_tool_driver_type = 3 ; # [doc = "todo"] pub type starpu_prof_tool_driver_type = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_command_reg : starpu_prof_tool_command = 0 ; pub const starpu_prof_tool_command_toggle : starpu_prof_tool_command = 1 ; pub const starpu_prof_tool_command_toggle_per_thread : starpu_prof_tool_command = 2 ; # [doc = "todo"] pub type starpu_prof_tool_command = :: std :: os :: raw :: c_uint ; # [doc = "General information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_prof_tool_info { pub conf : * mut starpu_conf , pub event_type : starpu_prof_tool_event , pub starpu_version : [:: std :: os :: raw :: c_uint ; 3usize] , pub thread_id : :: std :: os :: raw :: c_int , pub worker_id : :: std :: os :: raw :: c_int , pub device_number : :: std :: os :: raw :: c_int , pub driver_type : starpu_prof_tool_driver_type , pub memnode : :: std :: os :: raw :: c_uint , pub bytes_to_transfer : :: std :: os :: raw :: c_uint , pub bytes_transfered : :: std :: os :: raw :: c_uint , pub fun_ptr : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_info > () - 64usize] ; ["Alignment of starpu_prof_tool_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_info > () - 8usize] ; ["Offset of field: starpu_prof_tool_info::conf"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , conf) - 0usize] ; ["Offset of field: starpu_prof_tool_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , event_type) - 8usize] ; ["Offset of field: starpu_prof_tool_info::starpu_version"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , starpu_version) - 12usize] ; ["Offset of field: starpu_prof_tool_info::thread_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , thread_id) - 24usize] ; ["Offset of field: starpu_prof_tool_info::worker_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , worker_id) - 28usize] ; ["Offset of field: starpu_prof_tool_info::device_number"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , device_number) - 32usize] ; ["Offset of field: starpu_prof_tool_info::driver_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , driver_type) - 36usize] ; ["Offset of field: starpu_prof_tool_info::memnode"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , memnode) - 40usize] ; ["Offset of field: starpu_prof_tool_info::bytes_to_transfer"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_to_transfer) - 44usize] ; ["Offset of field: starpu_prof_tool_info::bytes_transfered"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_transfered) - 48usize] ; ["Offset of field: starpu_prof_tool_info::fun_ptr"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , fun_ptr) - 56usize] ; } ; impl Default for starpu_prof_tool_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 () } } } # [doc = "Event info"] # [repr (C)] # [derive (Copy , Clone)] pub union starpu_prof_tool_event_info { pub event_type : starpu_prof_tool_event , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_event_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Alignment of starpu_prof_tool_event_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Offset of field: starpu_prof_tool_event_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_event_info , event_type) - 0usize] ; } ; impl Default for starpu_prof_tool_event_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_prof_tool_event_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_prof_tool_event_info {{ union }}") } } # [doc = "API info"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_prof_tool_api_info { } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_api_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_api_info > () - 0usize] ; ["Alignment of starpu_prof_tool_api_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_api_info > () - 1usize] ; } ; pub type starpu_prof_tool_cb_func = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_prof_tool_info , arg2 : * mut starpu_prof_tool_event_info , arg3 : * mut starpu_prof_tool_api_info) > ; # [doc = "Register / unregister events"] pub type starpu_prof_tool_entry_register_func = :: std :: option :: Option < unsafe extern "C" fn (event_type : starpu_prof_tool_event , cb : starpu_prof_tool_cb_func , info : starpu_prof_tool_command) > ; # [doc = "A function with this signature must be implemented by external tools that want to use the callbacks"] pub type starpu_prof_tool_entry_func = :: std :: option :: Option < unsafe extern "C" fn (reg : starpu_prof_tool_entry_register_func , unreg : starpu_prof_tool_entry_register_func) > ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 2048usize] , 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_codelet_event"] [:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () - 2328usize] ; ["Alignment of starpu_fxt_codelet_event"] [:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () - 8usize] ; ["Offset of field: starpu_fxt_codelet_event::symbol"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , symbol) - 0usize] ; ["Offset of field: starpu_fxt_codelet_event::workerid"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , workerid) - 2048usize] ; ["Offset of field: starpu_fxt_codelet_event::perfmodel_archname"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , perfmodel_archname) - 2052usize] ; ["Offset of field: starpu_fxt_codelet_event::hash"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , hash) - 2308usize] ; ["Offset of field: starpu_fxt_codelet_event::size"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , size) - 2312usize] ; ["Offset of field: starpu_fxt_codelet_event::time"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , time) - 2320usize] ; } ; 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 () } } } # [doc = "Store information related to clock synchronizations: mainly the offset to apply to each time."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_fxt_mpi_offset { # [doc = "< node time for the barrier at the beginning of the program"] pub local_time_start : u64 , # [doc = "< offset to apply to node time, computed at the beginning of the program"] pub offset_start : i64 , # [doc = "< node time for the barrier at the end of the program (optional)"] pub local_time_end : u64 , # [doc = "< offset to apply to node time, computed at the end of the program (optional)"] pub offset_end : i64 , # [doc = "< number of barriers to synchronize clocks during the execution of the program\n(can be 0, 1 or 2)"] pub nb_barriers : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_mpi_offset"] [:: std :: mem :: size_of :: < starpu_fxt_mpi_offset > () - 40usize] ; ["Alignment of starpu_fxt_mpi_offset"] [:: std :: mem :: align_of :: < starpu_fxt_mpi_offset > () - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_start) - 0usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_start) - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_end) - 16usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_end) - 24usize] ; ["Offset of field: starpu_fxt_mpi_offset::nb_barriers"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , nb_barriers) - 32usize] ; } ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 sched_tasks_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 papi_path : * mut :: std :: os :: raw :: c_char , pub comms_path : * mut :: std :: os :: raw :: c_char , pub number_events_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 , pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 48usize] , pub nworkers : :: std :: os :: raw :: c_int , pub worker_archtypes : [starpu_perfmodel_arch ; 48usize] , # [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 synchronize clocks and apply an offset."] pub file_offset : starpu_fxt_mpi_offset , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), this variable stores the MPI rank of the trace file."] pub file_rank : :: 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, number\nof dumped codelets."] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_options"] [:: std :: mem :: size_of :: < starpu_fxt_options > () - 13800usize] ; ["Alignment of starpu_fxt_options"] [:: std :: mem :: align_of :: < starpu_fxt_options > () - 8usize] ; ["Offset of field: starpu_fxt_options::per_task_colour"] [:: std :: mem :: offset_of ! (starpu_fxt_options , per_task_colour) - 0usize] ; ["Offset of field: starpu_fxt_options::no_events"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_events) - 4usize] ; ["Offset of field: starpu_fxt_options::no_counter"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_counter) - 8usize] ; ["Offset of field: starpu_fxt_options::no_bus"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_bus) - 12usize] ; ["Offset of field: starpu_fxt_options::no_flops"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_flops) - 16usize] ; ["Offset of field: starpu_fxt_options::ninputfiles"] [:: std :: mem :: offset_of ! (starpu_fxt_options , ninputfiles) - 20usize] ; ["Offset of field: starpu_fxt_options::no_smooth"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_smooth) - 24usize] ; ["Offset of field: starpu_fxt_options::no_acquire"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_acquire) - 28usize] ; ["Offset of field: starpu_fxt_options::memory_states"] [:: std :: mem :: offset_of ! (starpu_fxt_options , memory_states) - 32usize] ; ["Offset of field: starpu_fxt_options::internal"] [:: std :: mem :: offset_of ! (starpu_fxt_options , internal) - 36usize] ; ["Offset of field: starpu_fxt_options::label_deps"] [:: std :: mem :: offset_of ! (starpu_fxt_options , label_deps) - 40usize] ; ["Offset of field: starpu_fxt_options::filenames"] [:: std :: mem :: offset_of ! (starpu_fxt_options , filenames) - 48usize] ; ["Offset of field: starpu_fxt_options::out_paje_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , out_paje_path) - 560usize] ; ["Offset of field: starpu_fxt_options::distrib_time_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , distrib_time_path) - 568usize] ; ["Offset of field: starpu_fxt_options::activity_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , activity_path) - 576usize] ; ["Offset of field: starpu_fxt_options::sched_tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , sched_tasks_path) - 584usize] ; ["Offset of field: starpu_fxt_options::dag_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dag_path) - 592usize] ; ["Offset of field: starpu_fxt_options::tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , tasks_path) - 600usize] ; ["Offset of field: starpu_fxt_options::data_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , data_path) - 608usize] ; ["Offset of field: starpu_fxt_options::papi_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , papi_path) - 616usize] ; ["Offset of field: starpu_fxt_options::comms_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , comms_path) - 624usize] ; ["Offset of field: starpu_fxt_options::number_events_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , number_events_path) - 632usize] ; ["Offset of field: starpu_fxt_options::anim_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , anim_path) - 640usize] ; ["Offset of field: starpu_fxt_options::states_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , states_path) - 648usize] ; ["Offset of field: starpu_fxt_options::dir"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dir) - 656usize] ; ["Offset of field: starpu_fxt_options::worker_names"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_names) - 664usize] ; ["Offset of field: starpu_fxt_options::nworkers"] [:: std :: mem :: offset_of ! (starpu_fxt_options , nworkers) - 12952usize] ; ["Offset of field: starpu_fxt_options::worker_archtypes"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_archtypes) - 12960usize] ; ["Offset of field: starpu_fxt_options::file_prefix"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_prefix) - 13728usize] ; ["Offset of field: starpu_fxt_options::file_offset"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_offset) - 13736usize] ; ["Offset of field: starpu_fxt_options::file_rank"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_rank) - 13776usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets) - 13784usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets_count"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets_count) - 13792usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } unsafe 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.\nThis function has to be called before starpu_init().\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_start_profiling () ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_stop_profiling () ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace_in_dir (filename_in : * mut :: std :: os :: raw :: c_char , dir : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } unsafe extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Pre-initialize drivers\nSo as to register information on device types, memory types, etc.\nOnly use internally by StarPU."] pub fn starpu_drivers_preinit () ; } # [doc = "structure for designating a given driver. See \\ref UsingTheDriverAPI for more details."] # [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 hip_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver__bindgen_ty_1"] [:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Alignment of starpu_driver__bindgen_ty_1"] [:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cpu_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cpu_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cuda_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cuda_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::hip_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , hip_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::opencl_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , opencl_id) - 0usize] ; } ; 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 }}") } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver"] [:: std :: mem :: size_of :: < starpu_driver > () - 16usize] ; ["Alignment of starpu_driver"] [:: std :: mem :: align_of :: < starpu_driver > () - 8usize] ; ["Offset of field: starpu_driver::type_"] [:: std :: mem :: offset_of ! (starpu_driver , type_) - 0usize] ; ["Offset of field: starpu_driver::id"] [:: std :: mem :: offset_of ! (starpu_driver , id) - 8usize] ; } ; 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) } } unsafe 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-EINVAL 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().\n\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Notify all running drivers that they should terminate.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_drivers_request_termination () ; } unsafe extern "C" { # [doc = "Initialize the given driver. Return 0 on success, -EINVAL\nif starpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Run the driver once, then return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tree"] [:: std :: mem :: size_of :: < starpu_tree > () - 32usize] ; ["Alignment of starpu_tree"] [:: std :: mem :: align_of :: < starpu_tree > () - 8usize] ; ["Offset of field: starpu_tree::nodes"] [:: std :: mem :: offset_of ! (starpu_tree , nodes) - 0usize] ; ["Offset of field: starpu_tree::father"] [:: std :: mem :: offset_of ! (starpu_tree , father) - 8usize] ; ["Offset of field: starpu_tree::arity"] [:: std :: mem :: offset_of ! (starpu_tree , arity) - 16usize] ; ["Offset of field: starpu_tree::id"] [:: std :: mem :: offset_of ! (starpu_tree , id) - 20usize] ; ["Offset of field: starpu_tree::level"] [:: std :: mem :: offset_of ! (starpu_tree , level) - 24usize] ; ["Offset of field: starpu_tree::is_pu"] [:: std :: mem :: offset_of ! (starpu_tree , is_pu) - 28usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } unsafe 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 ; } unsafe 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)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_lock_t > () - 8usize] ; ["Alignment of starpu_omp_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_lock_t , internal) - 0usize] ; } ; 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)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_nest_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Alignment of starpu_omp_nest_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_nest_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_nest_lock_t , internal) - 0usize] ; } ; 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 chosen 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)] 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 pragma omp parallel 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_parallel_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () - 872usize] ; ["Alignment of starpu_omp_parallel_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_parallel_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_parallel_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , if_clause) - 860usize] ; ["Offset of field: starpu_omp_parallel_region_attr::num_threads"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , num_threads) - 864usize] ; } ; 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)] 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 pragma omp task is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding pragma omp task is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding pragma omp task is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding pragma omp task 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_task_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () - 936usize] ; ["Alignment of starpu_omp_task_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_task_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_task_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_task_region_attr::priority"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , priority) - 860usize] ; ["Offset of field: starpu_omp_task_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , if_clause) - 864usize] ; ["Offset of field: starpu_omp_task_region_attr::final_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , final_clause) - 868usize] ; ["Offset of field: starpu_omp_task_region_attr::untied_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , untied_clause) - 872usize] ; ["Offset of field: starpu_omp_task_region_attr::mergeable_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , mergeable_clause) - 876usize] ; ["Offset of field: starpu_omp_task_region_attr::is_loop"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , is_loop) - 880usize] ; ["Offset of field: starpu_omp_task_region_attr::nogroup_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nogroup_clause) - 884usize] ; ["Offset of field: starpu_omp_task_region_attr::collapse"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , collapse) - 888usize] ; ["Offset of field: starpu_omp_task_region_attr::num_tasks"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , num_tasks) - 892usize] ; ["Offset of field: starpu_omp_task_region_attr::nb_iterations"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nb_iterations) - 896usize] ; ["Offset of field: starpu_omp_task_region_attr::grainsize"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , grainsize) - 904usize] ; ["Offset of field: starpu_omp_task_region_attr::begin_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , begin_i) - 912usize] ; ["Offset of field: starpu_omp_task_region_attr::end_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , end_i) - 920usize] ; ["Offset of field: starpu_omp_task_region_attr::chunk"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , chunk) - 928usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_shutdown () ; } unsafe 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 \\#pragma omp parallel.\nSee \\ref OMPParallel for more details."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } unsafe 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 \\#pragma omp master.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp master without code\noutlining.\n\\return !0 if called by the region's master thread.\n\\return 0 if not called by the region's master thread.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp barrier.\nSee \\ref OMPBarrier for more details."] pub fn starpu_omp_barrier () ; } unsafe 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 name == NULL, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement \\#pragma omp\ncritical.\n\nSee \\ref OMPCritical for more details."] 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) ; } unsafe 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 name == NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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\nname==NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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(nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp single.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single without code\noutlining.\n\\return !0 if the calling thread has won the election.\n\\return 0 if the calling thread has lost the election.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp single 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\n\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and NULL for\nthe task that won the election. This function can be used to implement\n\\#pragma omp single with a copyprivate clause without code outlining.\n\nReturn the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\nReturn NULL 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\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_end () ; } unsafe 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 \\#pragma omp for 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(ordered==!0) or not (ordered==0). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(nowait==0) or not (nowait==!0).\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 \\#pragma omp for.\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for.\n\n\\sa starpu_omp_for\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp ordered.\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_begin () ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_end () ; } unsafe 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 (nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp sections and \\#pragma omp section.\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp sections and \\#pragma omp section.\n\n\\sa starpu_omp_sections\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp task.\n\nSee \\ref OMPTaskExplicit for more details."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } unsafe 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 \\#pragma omp taskwait.\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskwait () ; } unsafe 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 \\#pragma omp taskgroup.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] 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) ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_begin () ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_end () ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return !0 if called from a parallel region scope.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return !0 if dynamic thread number adjustment is enabled.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_dynamic\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return !0 if nested parallel sections are enabled.\n\\return 0 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the state of the cancel ICVS var.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } unsafe 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 information such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } unsafe 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 1 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return !0 if called from a final task.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } unsafe extern "C" { # [doc = "Return the number of places available to the execution environment in the place list.\n\n\\return the number of places available to the execution environment in the place list.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of processors available to the execution environment in the specified place.\n\n\\return the number of processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the numerical identifiers of the processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the place number of the place to which the encountering thread is bound.\n\n\\return the place number of the place to which the encountering thread is bound.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of places in the place partition of the innermost implicit task.\n\n\\return the number of places in the place partition of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current device is the initial device or not.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a device number that represents the host device.\n\n\\return a device number that represents the host device.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return !0 if called from the host device.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } unsafe extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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 !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 () ; } unsafe 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 () ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtime () -> f64 ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtick () -> f64 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Only use internally by StarPU."] pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } unsafe extern "C" { # [doc = "Register a handle for ptr->handle data lookup.\n\n\\sa starpu_omp_handle_unregister\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_register (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Unregister a handle from ptr->handle data lookup.\n\n\\sa starpu_omp_handle_register\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_unregister (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer.\n\n\\return the handle or \\c NULL if not found.\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_bitmap { pub bits : [:: std :: os :: raw :: c_ulong ; 1usize] , pub cardinal : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bitmap"] [:: std :: mem :: size_of :: < starpu_bitmap > () - 16usize] ; ["Alignment of starpu_bitmap"] [:: std :: mem :: align_of :: < starpu_bitmap > () - 8usize] ; ["Offset of field: starpu_bitmap::bits"] [:: std :: mem :: offset_of ! (starpu_bitmap , bits) - 0usize] ; ["Offset of field: starpu_bitmap::cardinal"] [:: std :: mem :: offset_of ! (starpu_bitmap , cardinal) - 8usize] ; } ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_OPENMP : starpu_parallel_worker_types = 0 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_INTEL_OPENMP_MKL : starpu_parallel_worker_types = 1 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_GNU_OPENMP_MKL : starpu_parallel_worker_types = 2 ; # [doc = "These represent the default available functions to enforce parallel_worker\nuse by the sub-runtime"] pub type starpu_parallel_worker_types = :: std :: os :: raw :: c_uint ; # [doc = "Parallel_Worker configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_parallel_worker_config { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Create parallel_workers on the machine with the given parameters.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_init (parallel_worker_level : hwloc_obj_type_t , ...) -> * mut starpu_parallel_worker_config ; } unsafe extern "C" { # [doc = "Delete the given parallel_workers configuration"] pub fn starpu_parallel_worker_shutdown (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print the given parallel_workers configuration.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_print (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " Prologue functions"] pub fn starpu_parallel_worker_openmp_prologue (arg1 : * mut :: std :: os :: raw :: c_void) ; } # [doc = "< deprecated"] pub const STARPU_CLUSTER_OPENMP : starpu_cluster_types = 0 ; # [doc = "< deprecated"] pub const STARPU_CLUSTER_INTEL_OPENMP_MKL : starpu_cluster_types = 1 ; # [doc = "@deprecated Use ::starpu_parallel_worker_types"] pub type starpu_cluster_types = :: std :: os :: raw :: c_uint ; # [doc = " @deprecated Use starpu_parallel_worker_config"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_cluster_machine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_init()"] pub fn starpu_cluster_machine (cluster_level : hwloc_obj_type_t , ...) -> * mut starpu_cluster_machine ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_shutdown()"] pub fn starpu_uncluster_machine (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_print()"] pub fn starpu_cluster_print (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } # [doc = "< undefined scope"] pub const starpu_perf_counter_scope_undefined : starpu_perf_counter_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_counter_scope_global : starpu_perf_counter_scope = 2 ; # [doc = "< per-worker scope"] pub const starpu_perf_counter_scope_per_worker : starpu_perf_counter_scope = 4 ; # [doc = "< per-codelet scope"] pub const starpu_perf_counter_scope_per_codelet : starpu_perf_counter_scope = 6 ; # [doc = "Enum of all possible performance counter scopes."] pub type starpu_perf_counter_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_counter_type_undefined : starpu_perf_counter_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_counter_type_int32 : starpu_perf_counter_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_counter_type_int64 : starpu_perf_counter_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_counter_type_float : starpu_perf_counter_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_counter_type_double : starpu_perf_counter_type = 4 ; # [doc = "Enum of all possible performance counter value type."] pub type starpu_perf_counter_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_listener { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_sample { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_set { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Start collecting performance counter values."] pub fn starpu_perf_counter_collection_start () ; } unsafe extern "C" { # [doc = "Stop collecting performance counter values."] pub fn starpu_perf_counter_collection_stop () ; } unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_counter_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_counter_scope_id_to_name (scope : starpu_perf_counter_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_counter_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_counter_type_id_to_name (type_ : starpu_perf_counter_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance counters for the given scope."] pub fn starpu_perf_counter_nb (scope : starpu_perf_counter_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter name to its id."] pub fn starpu_perf_counter_name_to_id (scope : starpu_perf_counter_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter rank in its scope to its counter id."] pub fn starpu_perf_counter_nth_to_id (scope : starpu_perf_counter_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a counter id to its name constant string."] pub fn starpu_perf_counter_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the counter's type id."] pub fn starpu_perf_counter_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the counter's help string."] pub fn starpu_perf_counter_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of counters defined in the given scope."] pub fn starpu_perf_counter_list_avail (scope : starpu_perf_counter_scope) ; } unsafe extern "C" { # [doc = "Display the list of counters defined in all scopes."] pub fn starpu_perf_counter_list_all_avail () ; } unsafe extern "C" { # [doc = "Allocate a new performance counter set."] pub fn starpu_perf_counter_set_alloc (scope : starpu_perf_counter_scope) -> * mut starpu_perf_counter_set ; } unsafe extern "C" { # [doc = "Free a performance counter set."] pub fn starpu_perf_counter_set_free (set : * mut starpu_perf_counter_set) ; } unsafe extern "C" { # [doc = "Enable a given counter in the set."] pub fn starpu_perf_counter_set_enable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Disable a given counter in the set."] pub fn starpu_perf_counter_set_disable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Initialize a new performance counter listener."] pub fn starpu_perf_counter_listener_init (set : * mut starpu_perf_counter_set , callback : :: std :: option :: Option < unsafe extern "C" fn (listener : * mut starpu_perf_counter_listener , sample : * mut starpu_perf_counter_sample , context : * mut :: std :: os :: raw :: c_void) > , user_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_perf_counter_listener ; } unsafe extern "C" { # [doc = "End a performance counter listener."] pub fn starpu_perf_counter_listener_exit (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the global scope."] pub fn starpu_perf_counter_set_global_listener (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the per_worker scope on a given worker."] pub fn starpu_perf_counter_set_per_worker_listener (workerid : :: std :: os :: raw :: c_uint , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a common listener for all workers."] pub fn starpu_perf_counter_set_all_per_worker_listeners (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a per_codelet listener for a codelet."] pub fn starpu_perf_counter_set_per_codelet_listener (cl : * mut starpu_codelet , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Unset the global listener."] pub fn starpu_perf_counter_unset_global_listener () ; } unsafe extern "C" { # [doc = "Unset the per_worker listener."] pub fn starpu_perf_counter_unset_per_worker_listener (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Unset all per_worker listeners."] pub fn starpu_perf_counter_unset_all_per_worker_listeners () ; } unsafe extern "C" { # [doc = "Unset a per_codelet listener."] pub fn starpu_perf_counter_unset_per_codelet_listener (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Read an int32 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int32_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Read an int64 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int64_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Read a float counter value from a sample."] pub fn starpu_perf_counter_sample_get_float_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Read a double counter value from a sample."] pub fn starpu_perf_counter_sample_get_double_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f64 ; } # [doc = "< undefined scope"] pub const starpu_perf_knob_scope_undefined : starpu_perf_knob_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_knob_scope_global : starpu_perf_knob_scope = 1 ; # [doc = "< per-worker scope"] pub const starpu_perf_knob_scope_per_worker : starpu_perf_knob_scope = 3 ; # [doc = "< per-scheduler scope"] pub const starpu_perf_knob_scope_per_scheduler : starpu_perf_knob_scope = 5 ; # [doc = "Enum of all possible performance knob scopes."] pub type starpu_perf_knob_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_knob_type_undefined : starpu_perf_knob_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_knob_type_int32 : starpu_perf_knob_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_knob_type_int64 : starpu_perf_knob_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_knob_type_float : starpu_perf_knob_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_knob_type_double : starpu_perf_knob_type = 4 ; # [doc = "Enum of all possible performance knob value type."] pub type starpu_perf_knob_type = :: std :: os :: raw :: c_uint ; unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_knob_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_knob_scope_id_to_name (scope : starpu_perf_knob_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_knob_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_knob_type_id_to_name (type_ : starpu_perf_knob_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance steering knobs for the given scope."] pub fn starpu_perf_knob_nb (scope : starpu_perf_knob_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_name_to_id (scope : starpu_perf_knob_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_nth_to_id (scope : starpu_perf_knob_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob rank in its scope to its knob id."] pub fn starpu_perf_knob_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate a knob id to its name constant string."] pub fn starpu_perf_knob_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the knob's help string."] pub fn starpu_perf_knob_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in the given scope."] pub fn starpu_perf_knob_list_avail (scope : starpu_perf_knob_scope) ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in all scopes."] pub fn starpu_perf_knob_list_all_avail () ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int32_value (knob_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int64_value (knob_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_float_value (knob_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_double_value (knob_id : :: std :: os :: raw :: c_int) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int32_value (knob_id : :: std :: os :: raw :: c_int , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int64_value (knob_id : :: std :: os :: raw :: c_int , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float knob value for Global scope."] pub fn starpu_perf_knob_set_global_float_value (knob_id : :: std :: os :: raw :: c_int , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double knob value for Global scope."] pub fn starpu_perf_knob_set_global_double_value (knob_id : :: std :: os :: raw :: c_int , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f64) ; } # [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 unless\nstarpu_conf::precedence_over_environment_variables is set."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 =\nNULL)."] 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 = NULL)"] pub sched_policy : * mut starpu_sched_policy , # [doc = "Callback function that can later be used by the scheduler.\nThe scheduler can retrieve this function by calling\nstarpu_sched_ctx_get_sched_policy_callback()"] pub sched_policy_callback : :: 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 = \\c -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 = \\c -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of HIP devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NHIP.\n(default = \\c -1)"] pub nhip : :: 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 = \\c -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of Maxeler FPGA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NMAX_FPGA.\n(default = -1)"] pub nmax_fpga : :: 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 = \\c -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "Number of TCP/IP Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NTCPIP_MS.\n(default = \\c -1)"] pub ntcpip_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 = \\c 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 \\c hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the HIP workers will be attached to\nthe HIP devices specified in the\nstarpu_conf::workers_hip_gpuid array. Otherwise, StarPU\naffects the HIP devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_HIPID.\n(default = \\c 0)"] pub use_explicit_workers_hip_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_hip_gpuid flag is\nset, this array contains the logical identifiers of the\nHIP devices (as used by \\c hipGetDevice())."] pub workers_hip_gpuid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the Maxeler FPGA workers will be attached to\nthe Maxeler FPGA devices specified in the\nstarpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU\naffects the Maxeler FPGA devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_MAX_FPGAID.\n(default = 0)"] pub use_explicit_workers_max_fpga_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag\nis set, this array contains the logical identifiers of the\nMaxeler FPGA devices to be used."] pub workers_max_fpga_deviceid : [:: std :: os :: raw :: c_uint ; 48usize] , pub max_fpga_load : * mut :: std :: os :: raw :: c_void , # [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 = \\c 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 ; 48usize] , # [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 = \\c 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 = \\c 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to enforce data locality when\nchoosing a worker to execute a task.\nThis can also be specified with the environment variable\n\\ref STARPU_DATA_LOCALITY_ENFORCE.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\nenable-data-locality-enforce \"--enable-data-locality-enforce\".\n(default = \\c 0)"] pub data_locality_enforce : :: 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 = \\c 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [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 = \\c 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 = \\c 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 HIP accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-hip-copy\n\"--disable-asynchronous-hip-copy\".\n(default = \\c 0)"] pub disable_asynchronous_hip_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 = \\c 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 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 = \\c 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and TCP/IP Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-tcpip-master-slave-copy\n\"--disable-asynchronous-tcpip-master-slave-copy\".\n(default = \\c 0)."] pub disable_asynchronous_tcpip_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and Maxeler FPGA devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-fpga-copy\n\"--disable-asynchronous-fpga-copy\".\n(default = 0)."] pub disable_asynchronous_max_fpga_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable memory mapping\nsupport between memory nodes. This can also be specified\nwith the environment variable \\ref STARPU_ENABLE_MAP."] pub enable_map : :: 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 = NULL)"] 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 = NULL)"] 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 = \\c 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 , # [doc = "Set the minimum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MIN_PRIO"] pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , # [doc = "Set the maximum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MAX_PRIO"] pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch \\c SIGINT, \\c SIGSEGV and \\c 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 caught. 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 = "Specify whether StarPU should automatically start to collect\nperformance counters after initialization"] pub start_perf_counter_collection : :: std :: os :: raw :: c_uint , # [doc = "Minimum spinning backoff of drivers (default = \\c 1)"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. (default = \\c 32)"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , # [doc = "Specify if CUDA workers should do only fast allocations\nwhen running the datawizard progress of\nother memory nodes. This will pass the interval value\n_STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.\nDefault value is 0, allowing CUDA workers to do slow\nallocations.\nThis can also be specified with the environment variable\n\\ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES."] pub cuda_only_fast_alloc_other_memnodes : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_conf"] [:: std :: mem :: size_of :: < starpu_conf > () - 1376usize] ; ["Alignment of starpu_conf"] [:: std :: mem :: align_of :: < starpu_conf > () - 8usize] ; ["Offset of field: starpu_conf::magic"] [:: std :: mem :: offset_of ! (starpu_conf , magic) - 0usize] ; ["Offset of field: starpu_conf::will_use_mpi"] [:: std :: mem :: offset_of ! (starpu_conf , will_use_mpi) - 4usize] ; ["Offset of field: starpu_conf::sched_policy_name"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_name) - 8usize] ; ["Offset of field: starpu_conf::sched_policy"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy) - 16usize] ; ["Offset of field: starpu_conf::sched_policy_callback"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_callback) - 24usize] ; ["Offset of field: starpu_conf::precedence_over_environment_variables"] [:: std :: mem :: offset_of ! (starpu_conf , precedence_over_environment_variables) - 32usize] ; ["Offset of field: starpu_conf::ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , ncpus) - 36usize] ; ["Offset of field: starpu_conf::reserve_ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , reserve_ncpus) - 40usize] ; ["Offset of field: starpu_conf::ncuda"] [:: std :: mem :: offset_of ! (starpu_conf , ncuda) - 44usize] ; ["Offset of field: starpu_conf::nhip"] [:: std :: mem :: offset_of ! (starpu_conf , nhip) - 48usize] ; ["Offset of field: starpu_conf::nopencl"] [:: std :: mem :: offset_of ! (starpu_conf , nopencl) - 52usize] ; ["Offset of field: starpu_conf::nmax_fpga"] [:: std :: mem :: offset_of ! (starpu_conf , nmax_fpga) - 56usize] ; ["Offset of field: starpu_conf::nmpi_ms"] [:: std :: mem :: offset_of ! (starpu_conf , nmpi_ms) - 60usize] ; ["Offset of field: starpu_conf::ntcpip_ms"] [:: std :: mem :: offset_of ! (starpu_conf , ntcpip_ms) - 64usize] ; ["Offset of field: starpu_conf::use_explicit_workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_bindid) - 68usize] ; ["Offset of field: starpu_conf::workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_bindid) - 72usize] ; ["Offset of field: starpu_conf::use_explicit_workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_cuda_gpuid) - 264usize] ; ["Offset of field: starpu_conf::workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_cuda_gpuid) - 268usize] ; ["Offset of field: starpu_conf::use_explicit_workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_hip_gpuid) - 460usize] ; ["Offset of field: starpu_conf::workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_hip_gpuid) - 464usize] ; ["Offset of field: starpu_conf::use_explicit_workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_opencl_gpuid) - 656usize] ; ["Offset of field: starpu_conf::workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_opencl_gpuid) - 660usize] ; ["Offset of field: starpu_conf::use_explicit_workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_max_fpga_deviceid) - 852usize] ; ["Offset of field: starpu_conf::workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_max_fpga_deviceid) - 856usize] ; ["Offset of field: starpu_conf::max_fpga_load"] [:: std :: mem :: offset_of ! (starpu_conf , max_fpga_load) - 1048usize] ; ["Offset of field: starpu_conf::use_explicit_workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_mpi_ms_deviceid) - 1056usize] ; ["Offset of field: starpu_conf::workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_mpi_ms_deviceid) - 1060usize] ; ["Offset of field: starpu_conf::bus_calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , bus_calibrate) - 1252usize] ; ["Offset of field: starpu_conf::calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , calibrate) - 1256usize] ; ["Offset of field: starpu_conf::data_locality_enforce"] [:: std :: mem :: offset_of ! (starpu_conf , data_locality_enforce) - 1260usize] ; ["Offset of field: starpu_conf::single_combined_worker"] [:: std :: mem :: offset_of ! (starpu_conf , single_combined_worker) - 1264usize] ; ["Offset of field: starpu_conf::disable_asynchronous_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_copy) - 1268usize] ; ["Offset of field: starpu_conf::disable_asynchronous_cuda_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_cuda_copy) - 1272usize] ; ["Offset of field: starpu_conf::disable_asynchronous_hip_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_hip_copy) - 1276usize] ; ["Offset of field: starpu_conf::disable_asynchronous_opencl_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_opencl_copy) - 1280usize] ; ["Offset of field: starpu_conf::disable_asynchronous_mpi_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_mpi_ms_copy) - 1284usize] ; ["Offset of field: starpu_conf::disable_asynchronous_tcpip_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_tcpip_ms_copy) - 1288usize] ; ["Offset of field: starpu_conf::disable_asynchronous_max_fpga_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_max_fpga_copy) - 1292usize] ; ["Offset of field: starpu_conf::enable_map"] [:: std :: mem :: offset_of ! (starpu_conf , enable_map) - 1296usize] ; ["Offset of field: starpu_conf::cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_opengl_interoperability) - 1304usize] ; ["Offset of field: starpu_conf::n_cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , n_cuda_opengl_interoperability) - 1312usize] ; ["Offset of field: starpu_conf::not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , not_launched_drivers) - 1320usize] ; ["Offset of field: starpu_conf::n_not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , n_not_launched_drivers) - 1328usize] ; ["Offset of field: starpu_conf::trace_buffer_size"] [:: std :: mem :: offset_of ! (starpu_conf , trace_buffer_size) - 1336usize] ; ["Offset of field: starpu_conf::global_sched_ctx_min_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_min_priority) - 1344usize] ; ["Offset of field: starpu_conf::global_sched_ctx_max_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_max_priority) - 1348usize] ; ["Offset of field: starpu_conf::catch_signals"] [:: std :: mem :: offset_of ! (starpu_conf , catch_signals) - 1352usize] ; ["Offset of field: starpu_conf::start_perf_counter_collection"] [:: std :: mem :: offset_of ! (starpu_conf , start_perf_counter_collection) - 1356usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_min"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_min) - 1360usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_max"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_max) - 1364usize] ; ["Offset of field: starpu_conf::cuda_only_fast_alloc_other_memnodes"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_only_fast_alloc_other_memnodes) - 1368usize] ; } ; 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 () } } } unsafe 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-EINVAL indicates that the argument was NULL."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Set fields of \\p conf so that no worker is enabled, i.e. set\nstarpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.\n\nThis allows to portably enable only a given type of worker:\n
\n\nstarpu_conf_noworker(&conf);
\nconf.ncpus = -1;\n\n\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_conf_noworker (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe 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-NULL \\p conf. Default configuration is used if \\p conf\nis NULL. Upon successful completion, this function returns\n0. Otherwise, -ENODEV indicates that no worker was available\n(and thus StarPU was not initialized). See \\ref SubmittingATask for more details."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application, which is necessary when running in\nSimgrid mode or MPI Master Slave mode.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram. See \\ref SubmittingATask for more details."] 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 ; } unsafe extern "C" { # [doc = "Return 1 if StarPU is already initialized. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait for starpu_init() call to finish. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_wait_initialized () ; } unsafe 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. See \\ref SubmittingATask for more details."] pub fn starpu_shutdown () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_pause () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_resume () ; } unsafe extern "C" { # [doc = "Return !0 if task processing by workers is currently paused, 0 otherwise.\nSee \\ref StarPUEatsCPUs for more details."] pub fn starpu_is_paused () -> :: std :: os :: raw :: c_int ; } unsafe 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\n::STARPU_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.\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe 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 \\p cpuid does not produce a warning.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Bind the calling thread on the cores corresponding to the \\p workerid .\n\n\\p workerid can be a basic worker or a combined worker.\n\nThis can be used e.g. before initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_worker (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Bind the calling thread back to the core reserved for the main thread.\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_main () ; } unsafe extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_cpu (cpuid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the OS number of a given \\p cpuid\n\nStarPU uses logical numbering (as define by hwloc) all along, but in case\ninteraction is needed with another binding tool that uses numbering as\ndefined by the OS, we need to convert from hwloc logical numbering to hwloc\nphysical numbering."] pub fn starpu_cpu_os_index (cpuid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print a description of the topology on \\p f.\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_topology_print (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled.\nSee \\ref Basic for more details."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled.\nSee \\ref cudaWorkers for more details."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and HIP\naccelerators are disabled.\nSee \\ref hipWorkers for more details."] pub fn starpu_asynchronous_hip_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled.\nSee \\ref openclWorkers for more details."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and Maxeler FPGA\ndevices are disabled.\nSee \\ref maxfpgaWorkers for more details."] pub fn starpu_asynchronous_max_fpga_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled.\nSee \\ref mpimsWorkers for more details."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and TCP/IP Slave\ndevices are disabled.\nSee \\ref tcpipmsWorkers for more details."] pub fn starpu_asynchronous_tcpip_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers with a given kind of memory\nare disabled."] pub fn starpu_asynchronous_copy_disabled_for (kind : starpu_node_kind) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if memory mapping support between memory nodes is\nenabled.\nSee \\ref Basic for more details."] pub fn starpu_map_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call starpu_profiling_bus_helper_display_summary() and\nstarpu_profiling_worker_helper_display_summary().\nSee \\ref DataStatistics for more details."] pub fn starpu_display_stats () ; } unsafe extern "C" { # [doc = "Return as 3 integers the version of StarPU used when running the\napplication.\nSee \\ref ConfigurationAndInitialization for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_perf_counter_sample_cl_values { pub _address : u8 , } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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] fn extract_bit (byte : u8 , index : usize) -> bool { 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 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] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { 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 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] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [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 unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , 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) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; 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 } ; unsafe { Self :: raw_set_bit (this , 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 = 4 ; pub const STARPU_RELEASE_VERSION : u32 = 3 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_USE_TCPIP_MASTER_SLAVE : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_PARALLEL_WORKER : 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_CBLAS_H : 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_PAPI : 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_BOOL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : 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_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_MAXCPUS : u32 = 32 ; pub const STARPU_MAXNUMANODES : u32 = 4 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMAXFPGADEVS : u32 = 12 ; pub const STARPU_MAXHIPDEVS : u32 = 8 ; pub const STARPU_NMAXWORKERS : u32 = 48 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; 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_HAVE_MPI_COMM_CREATE_GROUP : u32 = 1 ; pub const STARPU_USE_FXT : 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_PTHREAD_MUTEX_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_COND_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO : 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 STARPU_PYTHON_HAVE_NUMPY : u32 = 1 ; pub const STARPU_PROF_TOOL : 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_MALLOC_SIMULATION_UNIQUE : u32 = 128 ; pub const STARPU_NOWHERE : u32 = 1 ; 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_HIP_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_SPECIFIC_NODE_LOCAL_OR_CPU : i32 = - 5 ; pub const STARPU_SPECIFIC_NODE_NONE : i32 = - 6 ; 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_TRANSACTION : u32 = 5505024 ; pub const STARPU_TASK_FILE : u32 = 5636096 ; pub const STARPU_TASK_LINE : u32 = 5767168 ; pub const STARPU_EPILOGUE_CALLBACK : u32 = 5898240 ; pub const STARPU_EPILOGUE_CALLBACK_ARG : u32 = 6029312 ; pub const STARPU_BUBBLE_FUNC : u32 = 6160384 ; pub const STARPU_BUBBLE_FUNC_ARG : u32 = 6291456 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC : u32 = 6422528 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC_ARG : u32 = 6553600 ; pub const STARPU_BUBBLE_PARENT : u32 = 6684672 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 6815744 ; 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_PARALLEL_WORKER_MIN_NB : u32 = 131072 ; pub const STARPU_PARALLEL_WORKER_MAX_NB : u32 = 262144 ; pub const STARPU_PARALLEL_WORKER_NB : u32 = 393216 ; pub const STARPU_PARALLEL_WORKER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_PARALLEL_WORKER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_PARALLEL_WORKER_POLICY_NAME : u32 = 786432 ; pub const STARPU_PARALLEL_WORKER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_PARALLEL_WORKER_TYPE : u32 = 1310720 ; pub const STARPU_PARALLEL_WORKER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_PARALLEL_WORKER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_PARALLEL_WORKER_NEW : u32 = 1703936 ; pub const STARPU_PARALLEL_WORKER_NCORES : u32 = 1835008 ; pub const STARPU_CLUSTER_MIN_NB : u32 = 131072 ; pub const STARPU_CLUSTER_MAX_NB : u32 = 262144 ; pub const STARPU_CLUSTER_NB : u32 = 393216 ; pub const STARPU_CLUSTER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_CLUSTER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_CLUSTER_POLICY_NAME : u32 = 786432 ; pub const STARPU_CLUSTER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_CLUSTER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_CLUSTER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_CLUSTER_TYPE : u32 = 1310720 ; pub const STARPU_CLUSTER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_CLUSTER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_CLUSTER_NEW : u32 = 1703936 ; pub const STARPU_CLUSTER_NCORES : u32 = 1835008 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of drand48_data"] [:: std :: mem :: size_of :: < drand48_data > () - 24usize] ; ["Alignment of drand48_data"] [:: std :: mem :: align_of :: < drand48_data > () - 8usize] ; ["Offset of field: drand48_data::__x"] [:: std :: mem :: offset_of ! (drand48_data , __x) - 0usize] ; ["Offset of field: drand48_data::__old_x"] [:: std :: mem :: offset_of ! (drand48_data , __old_x) - 6usize] ; ["Offset of field: drand48_data::__c"] [:: std :: mem :: offset_of ! (drand48_data , __c) - 12usize] ; ["Offset of field: drand48_data::__init"] [:: std :: mem :: offset_of ! (drand48_data , __init) - 14usize] ; ["Offset of field: drand48_data::__a"] [:: std :: mem :: offset_of ! (drand48_data , __a) - 16usize] ; } ; 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_opencl_program"] [:: std :: mem :: size_of :: < starpu_opencl_program > () - 64usize] ; ["Alignment of starpu_opencl_program"] [:: std :: mem :: align_of :: < starpu_opencl_program > () - 8usize] ; ["Offset of field: starpu_opencl_program::programs"] [:: std :: mem :: offset_of ! (starpu_opencl_program , programs) - 0usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current worker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as (size_t size_of_the_argument, cl_mem *\npointer_to_the_argument). 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\n\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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 share/starpu/opencl 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. See \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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$STARPU_HOME/.starpu/opencl/\\.\\.vendor_id_\\_device_id_\\.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a file.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a string.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Unload an OpenCL compiled code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe 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). See \\ref OpenCL-specificOptimizations for more details."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe 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 NULL, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not NULL, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns -EAGAIN if the asynchronous launch was\nsuccessful. It returns 0 if the synchronous copy was successful, or\nfails otherwise.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_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 ; unsafe extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe 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)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_pthread_spinlock_t"] [:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Alignment of starpu_pthread_spinlock_t"] [:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Offset of field: starpu_pthread_spinlock_t::taken"] [:: std :: mem :: offset_of ! (starpu_pthread_spinlock_t , taken) - 0usize] ; } ; unsafe 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 ; } unsafe extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; unsafe extern "C" { pub fn starpu_sem_trywait (sem : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sem_wait (sem : * 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. See \\ref DataInterface for more details."] 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\nNULL pointer, since the value\nof the provided buffer is simply\nignored for now.\n\nSee \\ref ScratchData for more details."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< Reduction mode.\nStarPU will allocate on the fly a per-worker\nbuffer, so that various tasks that access the\nsame data in ::STARPU_REDUX mode can execute\nin parallel. When a task accesses the\ndata without ::STARPU_REDUX, StarPU will\nautomatically reduce the different contributions.\n\nCodelets contributing to these reductions\nwith ::STARPU_REDUX must be registered with\n::STARPU_RW | ::STARPU_COMMUTE access modes.\n\nSee \\ref DataReduction for more details."] 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).\n\nSee \\ref DataCommute for more details."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_task_insert() 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.\n\nTODO add extended description in documentation."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Inter-node reduction only.\nThis is similar to ::STARPU_REDUX, except that\nStarPU will allocate a per-node buffer only,\ni.e. parallelism will be achieved between\nnodes, but not within each node. This is\nuseful when the per-worker buffers allocated\nwith ::STARPU_REDUX consume too much memory.\n\nSee \\ref MPIMpiRedux for more details."] pub const STARPU_MPI_REDUX : starpu_data_access_mode = 128 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning, only use internally by StarPU"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< Request unmapping the destination replicate, only use internally by StarPU"] pub const STARPU_UNMAP : starpu_data_access_mode = 512 ; # [doc = "< Ignore this data for the footprint computation. See \\ref ScratchData"] pub const STARPU_NOFOOTPRINT : starpu_data_access_mode = 1024 ; # [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 = 2048 ; # [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 ; unsafe extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] 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]) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] 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 ; } unsafe 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.\nSee \\ref TaskSubmission for more details."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref TemporaryData for more details."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks. See \\ref DataReduction for more details."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } unsafe 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) ; } unsafe 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\nexplicitly 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 -EDEADLK). Upon successful\ncompletion, this function returns 0. See \\ref DataAccess for more details."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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.\n\n\\p callback_acquired is called when the data is acquired in terms of semantic,\nbut the data is not fetched yet. It is given a pointer to the node, which it\ncan modify if it wishes so.\n\nThis is a very internal interface, subject to changes, do not use this."] 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_acquired : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , node : * mut :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) > , callback : :: std :: option :: Option < unsafe extern "C" fn (arg : * 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 , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb(). See \\ref DataAccess for more details."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Partly release the piece of data acquired by the application either by\nstarpu_data_acquire() or by starpu_data_acquire_cb(), switching the\nacquisition down to \\p down_to_mode. For now, only releasing from ::STARPU_RW\nor ::STARPU_W acquisition down to ::STARPU_R is supported, or down to the same\nacquisition. ::STARPU_NONE can also be passed as \\p down_to_mode, in which\ncase this is equivalent to calling starpu_data_release(). See \\ref DataAccess for more details."] pub fn starpu_data_release_to (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release_to(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_to_on_node (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode , 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 ; unsafe extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } unsafe extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter, see \\ref\nConcurrentDataAccess for the details."] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Destroy the \\p arbiter. This must only be called after all data\nassigned to it have been unregistered. See \\ref\nConcurrentDataAccess for the details."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A task really needs it now!"] pub const STARPU_FETCH : starpu_is_prefetch = 0 ; # [doc = " A task will need it soon"] pub const STARPU_TASK_PREFETCH : starpu_is_prefetch = 1 ; # [doc = " It is a good idea to have it asap"] pub const STARPU_PREFETCH : starpu_is_prefetch = 2 ; # [doc = " Get this here when you have time to"] pub const STARPU_IDLEFETCH : starpu_is_prefetch = 3 ; # [doc = " Get this here when you have time to"] pub const STARPU_NFETCH : starpu_is_prefetch = 4 ; # [doc = "Prefetch levels\n\nData requests are ordered by priorities, but also by prefetching level,\nbetween data that a task wants now, and data that we will probably want\n\"soon\"."] pub type starpu_is_prefetch = :: std :: os :: raw :: c_uint ; unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node (or a transfer request for getting so is ongoing). See \\ref SchedulingHelpers for more details."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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. See \\ref DataPrefetch for more details."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Advise StarPU to evict \\p handle from the memory node \\p node\nStarPU will thus write its value back to its home node, before evicting it.\nThis may however fail if e.g. some task is still working on it.\n\nIf the eviction was successful, 0 is returned ; -1 is returned otherwise.\n\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_evict_from_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 transferred into those memory nodes. For\ninstance a 1<<0 write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0). See \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } unsafe 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().\nSee \\ref SequentialConsistency and \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the default sequential consistency flag. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } unsafe 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(). See \\ref SequentialConsistency for more details."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1. See \\ref OOCDataRegistration for more details."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0). See \\ref OOCDataRegistration for more details."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node.\n\n\\p is_allocated tells whether memory was allocated there for the data.\n\\p is_valid tells whether the actual value is available there.\n\\p is_loading tells whether the actual value is getting loaded there.\n\\p is_requested tells whether the actual value is requested to be loaded\nthere by some fetch/prefetch/idlefetch request.\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_query_status2 (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_loading : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Same as starpu_data_query_status2(), but without the is_loading parameter. See \\ref DataPrefetch for more details."] 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) ; } unsafe 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 (which has to take one handle with ::STARPU_W), and\nreduction between per-worker buffers will be done with the codelet \\p\nredux_cl (which has to take a first accumulation handle with\n::STARPU_RW|::STARPU_COMMUTE, and a second contribution handle with ::STARPU_R).\nSee \\ref DataReduction and \\ref TemporaryData for more details."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Same as starpu_data_set_reduction_methods() but allows to pass\narguments to the reduction and init tasks"] pub fn starpu_data_set_reduction_methods_with_args (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , redux_cl_arg : * mut :: std :: os :: raw :: c_void , init_cl : * mut starpu_codelet , init_cl_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_data_test_if_mapped_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Set the field \\c sched_data for the \\p handle to \\p sched_data . It can\nthen be retrieved with starpu_data_get_sched_data(). \\p sched_data can be any\nscheduler-defined value.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_sched_data (handle : starpu_data_handle_t , sched_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c sched_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_sched_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Check whether data \\p handle can be evicted now from node \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_can_evict (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , is_prefetch : starpu_is_prefetch) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Retrieve the value of an environment variable.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the current date in micro-seconds. See \\ref Preparing for more details."] pub fn starpu_timing_now () -> f64 ; } unsafe 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Like starpu_data_cpy(), copy the content of \\p src_handle into \\p dst_handle,\nbut additionally take a \\p priority parameter to sort it among the whole task\ngraph.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_cpy_priority (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 , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Create a copy of \\p src_handle, and return a new handle in \\p dst_handle,\nwhich is to be used only for read accesses. This allows StarPU to optimize it\nby not actually copying the data whenever possible (e.g. it may possibly\nsimply return src_handle itself).\nThe parameter \\p asynchronous indicates whether the function should block\nor not. In the case of an asynchronous call, it is possible to synchronize\nwith the 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_dup_ro (dst_handle : * mut starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call hwloc-ps to display binding of each process and thread running on\nthe machine.
\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU.\nSee \\ref MiscellaneousAndDebug for more details."] pub fn starpu_display_bindings () ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a bitmap representing logical indexes of NUMA nodes where the buffer\ntargeted by \\p ptr is allocated. An error is notified by a negative result.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_memory_location_bitmap (ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_long ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate data on disk. See \\ref DiskFunctions for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 data 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 data, 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 data \\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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_disk_ops"] [:: std :: mem :: size_of :: < starpu_disk_ops > () - 152usize] ; ["Alignment of starpu_disk_ops"] [:: std :: mem :: align_of :: < starpu_disk_ops > () - 8usize] ; ["Offset of field: starpu_disk_ops::plug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , plug) - 0usize] ; ["Offset of field: starpu_disk_ops::unplug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , unplug) - 8usize] ; ["Offset of field: starpu_disk_ops::bandwidth"] [:: std :: mem :: offset_of ! (starpu_disk_ops , bandwidth) - 16usize] ; ["Offset of field: starpu_disk_ops::alloc"] [:: std :: mem :: offset_of ! (starpu_disk_ops , alloc) - 24usize] ; ["Offset of field: starpu_disk_ops::free"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free) - 32usize] ; ["Offset of field: starpu_disk_ops::open"] [:: std :: mem :: offset_of ! (starpu_disk_ops , open) - 40usize] ; ["Offset of field: starpu_disk_ops::close"] [:: std :: mem :: offset_of ! (starpu_disk_ops , close) - 48usize] ; ["Offset of field: starpu_disk_ops::read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , read) - 56usize] ; ["Offset of field: starpu_disk_ops::write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , write) - 64usize] ; ["Offset of field: starpu_disk_ops::full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_read) - 72usize] ; ["Offset of field: starpu_disk_ops::full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_write) - 80usize] ; ["Offset of field: starpu_disk_ops::async_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_write) - 88usize] ; ["Offset of field: starpu_disk_ops::async_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_read) - 96usize] ; ["Offset of field: starpu_disk_ops::async_full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_read) - 104usize] ; ["Offset of field: starpu_disk_ops::async_full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_write) - 112usize] ; ["Offset of field: starpu_disk_ops::copy"] [:: std :: mem :: offset_of ! (starpu_disk_ops , copy) - 120usize] ; ["Offset of field: starpu_disk_ops::wait_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , wait_request) - 128usize] ; ["Offset of field: starpu_disk_ops::test_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , test_request) - 136usize] ; ["Offset of field: starpu_disk_ops::free_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free_request) - 144usize] ; } ; unsafe extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\nWarning: It creates one file per allocation !\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the HDF5 library.\n\nIt doesn't support multiple opening from different processes. \n\nYou may only allow one process to write in the HDF5 file.\n\nIf HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. "] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\nWarning: It creates one file per allocation !"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\nWarning: It creates one file per allocation !\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Close an existing data opened with starpu_disk_open(). See \\ref OutOfCore_Introduction for more details."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe 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. See \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndata. 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
\nSUCCESS: return the disk node.
\nFAIL: return an error code.
\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size.\n\nSee \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe 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, HIP or OpenCL support.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 HIP node. Return 0 on success."] pub ram_to_hip : :: 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 FPGA node. Return 0 on success."] pub ram_to_max_fpga : :: 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 HIP node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub hip_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 HIP node to the \\p dst_interface interface on the \\p\ndst_node HIP node. Return 0 on success."] pub hip_to_hip : :: 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 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 FPGA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub max_fpga_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 > , 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 > , pub ram_to_hip_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_hip_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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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 FPGA node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_max_fpga_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 FPGA 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 -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub max_fpga_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 -EAGAIN if any of the starpu_interface_copy()\ncalls has returned -EAGAIN (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::peek_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 > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_copy_methods"] [:: std :: mem :: size_of :: < starpu_data_copy_methods > () - 200usize] ; ["Alignment of starpu_data_copy_methods"] [:: std :: mem :: align_of :: < starpu_data_copy_methods > () - 8usize] ; ["Offset of field: starpu_data_copy_methods::can_copy"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , can_copy) - 0usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_ram) - 8usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda) - 16usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip) - 24usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl) - 32usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga) - 40usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram) - 48usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda) - 56usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram) - 64usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip) - 72usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram) - 80usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl) - 88usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram) - 96usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda_async) - 104usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram_async) - 112usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda_async) - 120usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip_async) - 128usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram_async) - 136usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip_async) - 144usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl_async) - 152usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram_async) - 160usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl_async) - 168usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga_async) - 176usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram_async) - 184usize] ; ["Offset of field: starpu_data_copy_methods::any_to_any"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , any_to_any) - 192usize] ; } ; # [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 = "< Identifier for the tensor data interface"] pub const STARPU_TENSOR_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "< Identifier for the ndim array data interface"] pub const STARPU_NDIM_INTERFACE_ID : starpu_data_interface_id = 10 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 11 ; # [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)] 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 (if >= 0), 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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 = "Cache the buffers from the given node to a caching interface.\n\nThis method is optional, mostly useful when also making\nstarpu_data_interface_ops::unregister_data_handle check that pointers are NULL.\n\n\\p src_interface is an interface that already has buffers\nallocated, but which we don't need any more. \\p cached_interface\nis a new interface into which the buffer pointers should be\ntransferred, for later reuse when allocating data of the same kind.\n\nUsually we can just memcpy over the set of pointers and descriptions\n(this is what StarPU does when this method is not implemented), but\nif unregister_data_handle checks that pointers are NULL, we need to\nadditionally clear the pointers in \\p src_interface. Also,\nit is not useful to copy the whole interface, only the\npointers need to be copied (essentially the pointers that\nstarpu_data_interface_ops::reuse_data_on_node will then transfer into\na new handle interface), as well as the properties\nthat starpu_data_interface_ops::compare (or\nstarpu_data_interface_ops::alloc_compare if defined) needs for\ncomparing interfaces for caching compatibility.\n\nWhen this method is not defined, StarPU will just copy the \\p\ncached_interface into \\p src_interface.\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub cache_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (cached_interface : * mut :: std :: os :: raw :: c_void , src_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Reuse on the given node the buffers of the provided interface\n\nThis method is optional, mostly useful when also defining\nalloc_footprint to share tiles of the same allocation size but\ndifferent shapes, or when the interface contains pointers which\nare initialized at registration (e.g. nn array in the ndim interface)\n\n\\p cached_interface is an already-allocated buffer that we want to\nreuse, and \\p new_data_interface is an interface in which we want to\ninstall that already-allocated buffer. Usually we can just memcpy over\nthe set of pointers and descriptions. But e.g. with 2D tiles the ld\nvalue may not be correct, and memcpy would wrongly overwrite it in\nnew_data_interface, i.e. reusing a vertical tile allocation for a horizontal tile, or vice-versa.\n\nreuse_data_on_node should thus copy over pointers, and define fields\nthat are usually set by allocate_data_on_node (e.g. ld).\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub reuse_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (dst_data_interface : * mut :: std :: os :: raw :: c_void , cached_interface : * const :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Map data from a source to a destination.\nDefine function starpu_interface_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub map_data : :: 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 = "Unmap data from a source to a destination.\nDefine function starpu_interface_unmap() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub unmap_data : :: 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 = "Update map data from a source to a destination.\nDefine function starpu_interface_update_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub update_map : :: 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 = "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 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 the maximum size that the data may need to increase to. For\ninstance, in the case of compressed matrix tiles this is the size\nwhen the block is fully dense.\nThis is currently only used for feedback tools."] pub get_max_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.\nIf specified, alloc_compare should be set to provide the strict\ncomparison, and reuse_data_on_node should be set to provide correct buffer reuse."] 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 starpu_malloc_flags(ptr, size, 0) (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is NULL, 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 = "Read the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count."] pub peek_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 = "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 = "Pack the interface into a contiguous buffer and set the\nsize of the newly created buffer in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub pack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the interface from the given buffer and set the size\nof the unpacked data in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub unpack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Free the allocated memory by a previous call to unpack_meta()"] pub free_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_data_interface_ops > () - 264usize] ; ["Alignment of starpu_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_data_interface_ops::register_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , register_data_handle) - 0usize] ; ["Offset of field: starpu_data_interface_ops::unregister_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unregister_data_handle) - 8usize] ; ["Offset of field: starpu_data_interface_ops::allocate_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , allocate_data_on_node) - 16usize] ; ["Offset of field: starpu_data_interface_ops::free_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_data_on_node) - 24usize] ; ["Offset of field: starpu_data_interface_ops::cache_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , cache_data_on_node) - 32usize] ; ["Offset of field: starpu_data_interface_ops::reuse_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , reuse_data_on_node) - 40usize] ; ["Offset of field: starpu_data_interface_ops::map_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , map_data) - 48usize] ; ["Offset of field: starpu_data_interface_ops::unmap_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unmap_data) - 56usize] ; ["Offset of field: starpu_data_interface_ops::update_map"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , update_map) - 64usize] ; ["Offset of field: starpu_data_interface_ops::init"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , init) - 72usize] ; ["Offset of field: starpu_data_interface_ops::copy_methods"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , copy_methods) - 80usize] ; ["Offset of field: starpu_data_interface_ops::handle_to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , handle_to_pointer) - 88usize] ; ["Offset of field: starpu_data_interface_ops::to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , to_pointer) - 96usize] ; ["Offset of field: starpu_data_interface_ops::get_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_size) - 104usize] ; ["Offset of field: starpu_data_interface_ops::get_alloc_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_alloc_size) - 112usize] ; ["Offset of field: starpu_data_interface_ops::get_max_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_max_size) - 120usize] ; ["Offset of field: starpu_data_interface_ops::footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , footprint) - 128usize] ; ["Offset of field: starpu_data_interface_ops::alloc_footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_footprint) - 136usize] ; ["Offset of field: starpu_data_interface_ops::compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , compare) - 144usize] ; ["Offset of field: starpu_data_interface_ops::alloc_compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_compare) - 152usize] ; ["Offset of field: starpu_data_interface_ops::display"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , display) - 160usize] ; ["Offset of field: starpu_data_interface_ops::describe"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , describe) - 168usize] ; ["Offset of field: starpu_data_interface_ops::interfaceid"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interfaceid) - 176usize] ; ["Offset of field: starpu_data_interface_ops::interface_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interface_size) - 184usize] ; ["Offset of field: starpu_data_interface_ops::is_multiformat"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , is_multiformat) - 192usize] ; ["Offset of field: starpu_data_interface_ops::dontcache"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , dontcache) - 193usize] ; ["Offset of field: starpu_data_interface_ops::get_mf_ops"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_mf_ops) - 200usize] ; ["Offset of field: starpu_data_interface_ops::pack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_data) - 208usize] ; ["Offset of field: starpu_data_interface_ops::peek_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , peek_data) - 216usize] ; ["Offset of field: starpu_data_interface_ops::unpack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_data) - 224usize] ; ["Offset of field: starpu_data_interface_ops::pack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_meta) - 232usize] ; ["Offset of field: starpu_data_interface_ops::unpack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_meta) - 240usize] ; ["Offset of field: starpu_data_interface_ops::free_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_meta) - 248usize] ; ["Offset of field: starpu_data_interface_ops::name"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , name) - 256usize] ; } ; 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 () } } } unsafe 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()).\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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) ; } unsafe extern "C" { # [doc = "Register the given data interface operations. If the field\nstarpu_data_interface_ops::field is set to\n::STARPU_UNKNOWN_INTERFACE_ID, then a new identifier will be set by\ncalling starpu_data_interface_get_next_id().\nThe function is automatically called when registering a piece of\ndata with starpu_data_register(). It is only necessary to call it\nbeforehand for some specific cases (such as the usmaster slave mode)."] pub fn starpu_data_register_ops (ops : * mut starpu_data_interface_ops) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or NULL\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node.\nSee \\ref DataPointers for more details."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle or NULL if\n\\p handle’s interface does not have any data allocated locally.\nSee \\ref DataPointers for more details."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node.\nSee \\ref DefiningANewDataInterface_pack for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle.\nSee \\ref DefiningANewDataInterface_helpers for more details."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } unsafe 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 on node \\p node 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 NULL, 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_pack_node (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 ; } unsafe extern "C" { # [doc = "Like starpu_data_pack_node(), but for the local memory node.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Read in handle's \\p node replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek_node (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 ; } unsafe extern "C" { # [doc = "Read in handle's local replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count allocated\non node \\p node as described by the interface of the data. The interface\nregistered at \\p handle must define an unpacking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack_node (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 ; } unsafe 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).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the size of the data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the maximum size that the \\p handle data may need to increase to.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_max_size (handle : starpu_data_handle_t) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "See \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print basic information on \\p handle on \\p node.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_print (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , stream : * mut FILE) ; } unsafe 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 ; } unsafe 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 -EAGAIN if the\ntransfer is still ongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 4D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe extern "C" { # [doc = "Copy \\p nn[1] * \\p nn[2]...* \\p nn[ndim-1] blocks of \\p nn[0] * \\p elemsize 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 nn[i] blocks (i = 1, 2, ... ndim-1) whose start addresses are\nldn_src[i] * \\p elemsize (resp. ld1_dst[i] * \\p elemsize) bytes apart\nin the source (resp. destination) interface.\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 Ndim data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_copynd (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , elemsize : usize , ndim : usize , nn : * mut u32 , ldn_src : * mut u32 , ldn_dst : * mut u32 , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "When an asynchronous 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().\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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) ; } unsafe extern "C" { # [doc = "See starpu_interface_start_driver_copy_async().\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } unsafe extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node.\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node_flags().\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::map_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_map (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize , ret : * mut :: std :: os :: raw :: c_int) -> usize ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::unmap_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_unmap (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::update_map.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_update_map (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) -> :: std :: os :: raw :: c_int ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_matrix_interface"] [:: std :: mem :: size_of :: < starpu_matrix_interface > () - 64usize] ; ["Alignment of starpu_matrix_interface"] [:: std :: mem :: align_of :: < starpu_matrix_interface > () - 8usize] ; ["Offset of field: starpu_matrix_interface::id"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , id) - 0usize] ; ["Offset of field: starpu_matrix_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ptr) - 8usize] ; ["Offset of field: starpu_matrix_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_matrix_interface::offset"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , offset) - 24usize] ; ["Offset of field: starpu_matrix_interface::nx"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , nx) - 32usize] ; ["Offset of field: starpu_matrix_interface::ny"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ny) - 36usize] ; ["Offset of field: starpu_matrix_interface::ld"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ld) - 40usize] ; ["Offset of field: starpu_matrix_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , elemsize) - 48usize] ; ["Offset of field: starpu_matrix_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_coo_interface"] [:: std :: mem :: size_of :: < starpu_coo_interface > () - 56usize] ; ["Alignment of starpu_coo_interface"] [:: std :: mem :: align_of :: < starpu_coo_interface > () - 8usize] ; ["Offset of field: starpu_coo_interface::id"] [:: std :: mem :: offset_of ! (starpu_coo_interface , id) - 0usize] ; ["Offset of field: starpu_coo_interface::columns"] [:: std :: mem :: offset_of ! (starpu_coo_interface , columns) - 8usize] ; ["Offset of field: starpu_coo_interface::rows"] [:: std :: mem :: offset_of ! (starpu_coo_interface , rows) - 16usize] ; ["Offset of field: starpu_coo_interface::values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , values) - 24usize] ; ["Offset of field: starpu_coo_interface::nx"] [:: std :: mem :: offset_of ! (starpu_coo_interface , nx) - 32usize] ; ["Offset of field: starpu_coo_interface::ny"] [:: std :: mem :: offset_of ! (starpu_coo_interface , ny) - 36usize] ; ["Offset of field: starpu_coo_interface::n_values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , n_values) - 40usize] ; ["Offset of field: starpu_coo_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_coo_interface , elemsize) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref COODataInterface for more details."] 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) ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_block_interface"] [:: std :: mem :: size_of :: < starpu_block_interface > () - 64usize] ; ["Alignment of starpu_block_interface"] [:: std :: mem :: align_of :: < starpu_block_interface > () - 8usize] ; ["Offset of field: starpu_block_interface::id"] [:: std :: mem :: offset_of ! (starpu_block_interface , id) - 0usize] ; ["Offset of field: starpu_block_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_block_interface , ptr) - 8usize] ; ["Offset of field: starpu_block_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_block_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_block_interface::offset"] [:: std :: mem :: offset_of ! (starpu_block_interface , offset) - 24usize] ; ["Offset of field: starpu_block_interface::nx"] [:: std :: mem :: offset_of ! (starpu_block_interface , nx) - 32usize] ; ["Offset of field: starpu_block_interface::ny"] [:: std :: mem :: offset_of ! (starpu_block_interface , ny) - 36usize] ; ["Offset of field: starpu_block_interface::nz"] [:: std :: mem :: offset_of ! (starpu_block_interface , nz) - 40usize] ; ["Offset of field: starpu_block_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldy) - 44usize] ; ["Offset of field: starpu_block_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldz) - 48usize] ; ["Offset of field: starpu_block_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_block_interface , elemsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Tensor Data Interface\n@{"] pub static mut starpu_interface_tensor_ops : starpu_data_interface_ops ; } # [doc = "Tensor interface for 4D dense tensors"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_tensor_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the tensor"] pub ptr : usize , # [doc = "< device handle of the tensor."] pub dev_handle : usize , # [doc = "< offset in the tensor."] pub offset : usize , # [doc = "< number of elements on the x-axis of the tensor."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the tensor."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the tensor."] pub nz : u32 , # [doc = "< number of elements on the t-axis of the tensor."] pub nt : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< number of elements between two cubes"] pub ldt : u32 , # [doc = "< size of the elements of the tensor."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tensor_interface"] [:: std :: mem :: size_of :: < starpu_tensor_interface > () - 72usize] ; ["Alignment of starpu_tensor_interface"] [:: std :: mem :: align_of :: < starpu_tensor_interface > () - 8usize] ; ["Offset of field: starpu_tensor_interface::id"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , id) - 0usize] ; ["Offset of field: starpu_tensor_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ptr) - 8usize] ; ["Offset of field: starpu_tensor_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_tensor_interface::offset"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , offset) - 24usize] ; ["Offset of field: starpu_tensor_interface::nx"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nx) - 32usize] ; ["Offset of field: starpu_tensor_interface::ny"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ny) - 36usize] ; ["Offset of field: starpu_tensor_interface::nz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nz) - 40usize] ; ["Offset of field: starpu_tensor_interface::nt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nt) - 44usize] ; ["Offset of field: starpu_tensor_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldy) - 48usize] ; ["Offset of field: starpu_tensor_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldz) - 52usize] ; ["Offset of field: starpu_tensor_interface::ldt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldt) - 56usize] ; ["Offset of field: starpu_tensor_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , elemsize) - 64usize] ; } ; impl Default for starpu_tensor_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz x \\p nt 4D tensor of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy,\n\\p ldz, and \\p ldt specify the number of elements between rows, between z planes and between t cubes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *tensor;\nstarpu_data_handle_t tensor_handle;\ntensor = (float*)malloc(nx*ny*nz*nt*sizeof(float));\nstarpu_tensor_data_register(&tensor_handle, STARPU_MAIN_RAM, (uintptr_t)tensor, nx, nx*ny, nx*ny*nz, nx, ny, nz, nt, sizeof(float));\n\\endcode\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , ldt : u32 , nx : u32 , ny : u32 , nz : u32 , nt : u32 , elemsize : usize) ; } unsafe 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, and \\p ldt elements between t cubes."] pub fn starpu_tensor_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32 , ldt : u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on the x-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nx (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the y-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_ny (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the z-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the t-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each row of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each z plane of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each t cubes of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_tensor_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the tensor designated by\n\\p handle."] pub fn starpu_tensor_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Ndim Array Data Interface\n@{"] pub static mut starpu_interface_ndim_ops : starpu_data_interface_ops ; } # [doc = "ndim interface for ndim array"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_ndim_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the ndim"] pub ptr : usize , # [doc = "< device handle of the ndim."] pub dev_handle : usize , # [doc = "< offset in the ndim."] pub offset : usize , # [doc = "< size actually currently allocated."] pub allocsize : usize , # [doc = "< array of element number on each dimension"] pub nn : * mut u32 , # [doc = "< array of element number between two units on each dimension"] pub ldn : * mut u32 , # [doc = "< size of the dimension."] pub ndim : usize , # [doc = "< size of the elements of the ndim."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_ndim_interface"] [:: std :: mem :: size_of :: < starpu_ndim_interface > () - 72usize] ; ["Alignment of starpu_ndim_interface"] [:: std :: mem :: align_of :: < starpu_ndim_interface > () - 8usize] ; ["Offset of field: starpu_ndim_interface::id"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , id) - 0usize] ; ["Offset of field: starpu_ndim_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ptr) - 8usize] ; ["Offset of field: starpu_ndim_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_ndim_interface::offset"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , offset) - 24usize] ; ["Offset of field: starpu_ndim_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , allocsize) - 32usize] ; ["Offset of field: starpu_ndim_interface::nn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , nn) - 40usize] ; ["Offset of field: starpu_ndim_interface::ldn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ldn) - 48usize] ; ["Offset of field: starpu_ndim_interface::ndim"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ndim) - 56usize] ; ["Offset of field: starpu_ndim_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , elemsize) - 64usize] ; } ; impl Default for starpu_ndim_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nn[0] x \\p nn[1] x ... \\p ndim-dimension matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldn,\nspecifies the number of elements between two units on each dimension.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *ndim_arr;\nsize_t arrsize = 1;\nint i;\nfor (i = 0; i < ndim; i++)\narrsize = arrsize * nn[i];\nstarpu_data_handle_t ndim_handle;\nndim_arr = (float*)malloc(arrsize*sizeof(float));\nstarpu_ndim_data_register(&ndim_handle, STARPU_MAIN_RAM, (uintptr_t)ndim_arr, ldn, nn, ndim, sizeof(float));\n\\endcode\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldn : * mut u32 , nn : * mut u32 , ndim : usize , elemsize : usize) ; } unsafe 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 ldn elements between two units on each dimension."] pub fn starpu_ndim_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldn : * mut u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on each dimension of the ndim array\ndesignated by \\p handle."] pub fn starpu_ndim_get_nn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the i-axis of the ndim array\ndesignated by \\p handle. When i=0, it means x-axis,\nwhen i=1, it means y-axis, when i=2, it means z-axis, etc."] pub fn starpu_ndim_get_ni (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units on each dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units i-axis dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldi (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_ndim_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the dimension size."] pub fn starpu_ndim_get_ndim (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the ndim array designated by\n\\p handle."] pub fn starpu_ndim_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_vector_interface"] [:: std :: mem :: size_of :: < starpu_vector_interface > () - 64usize] ; ["Alignment of starpu_vector_interface"] [:: std :: mem :: align_of :: < starpu_vector_interface > () - 8usize] ; ["Offset of field: starpu_vector_interface::id"] [:: std :: mem :: offset_of ! (starpu_vector_interface , id) - 0usize] ; ["Offset of field: starpu_vector_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_vector_interface , ptr) - 8usize] ; ["Offset of field: starpu_vector_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_vector_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_vector_interface::offset"] [:: std :: mem :: offset_of ! (starpu_vector_interface , offset) - 24usize] ; ["Offset of field: starpu_vector_interface::nx"] [:: std :: mem :: offset_of ! (starpu_vector_interface , nx) - 32usize] ; ["Offset of field: starpu_vector_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , elemsize) - 40usize] ; ["Offset of field: starpu_vector_interface::slice_base"] [:: std :: mem :: offset_of ! (starpu_vector_interface , slice_base) - 48usize] ; ["Offset of field: starpu_vector_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_vector_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize.\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_variable_interface"] [:: std :: mem :: size_of :: < starpu_variable_interface > () - 40usize] ; ["Alignment of starpu_variable_interface"] [:: std :: mem :: align_of :: < starpu_variable_interface > () - 8usize] ; ["Offset of field: starpu_variable_interface::id"] [:: std :: mem :: offset_of ! (starpu_variable_interface , id) - 0usize] ; ["Offset of field: starpu_variable_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_variable_interface , ptr) - 8usize] ; ["Offset of field: starpu_variable_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_variable_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_variable_interface::offset"] [:: std :: mem :: offset_of ! (starpu_variable_interface , offset) - 24usize] ; ["Offset of field: starpu_variable_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_variable_interface , elemsize) - 32usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VariableDataInterface for more details."] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } unsafe 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 void\ndata in read-write concurrently.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } unsafe 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)] 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 = "< position of non-zero entries on the row (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitioning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_csr_interface"] [:: std :: mem :: size_of :: < starpu_csr_interface > () - 72usize] ; ["Alignment of starpu_csr_interface"] [:: std :: mem :: align_of :: < starpu_csr_interface > () - 8usize] ; ["Offset of field: starpu_csr_interface::id"] [:: std :: mem :: offset_of ! (starpu_csr_interface , id) - 0usize] ; ["Offset of field: starpu_csr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nnz) - 4usize] ; ["Offset of field: starpu_csr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nrow) - 8usize] ; ["Offset of field: starpu_csr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nzval) - 16usize] ; ["Offset of field: starpu_csr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , colind) - 24usize] ; ["Offset of field: starpu_csr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_csr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_csr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_csr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_csr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_csr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_csr_interface , elemsize) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix.\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 = "< array of nnz elements (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< array of nrow+1 elements (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitioning 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bcsr_interface"] [:: std :: mem :: size_of :: < starpu_bcsr_interface > () - 80usize] ; ["Alignment of starpu_bcsr_interface"] [:: std :: mem :: align_of :: < starpu_bcsr_interface > () - 8usize] ; ["Offset of field: starpu_bcsr_interface::id"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , id) - 0usize] ; ["Offset of field: starpu_bcsr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nnz) - 4usize] ; ["Offset of field: starpu_bcsr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nrow) - 8usize] ; ["Offset of field: starpu_bcsr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nzval) - 16usize] ; ["Offset of field: starpu_bcsr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , colind) - 24usize] ; ["Offset of field: starpu_bcsr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_bcsr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_bcsr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_bcsr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_bcsr_interface::r"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , r) - 60usize] ; ["Offset of field: starpu_bcsr_interface::c"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , c) - 64usize] ; ["Offset of field: starpu_bcsr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , elemsize) - 72usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () - 56usize] ; ["Alignment of starpu_multiformat_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_elemsize) - 0usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_elemsize) - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_opencl_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_opencl_cl) - 16usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_to_cpu_cl) - 24usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_elemsize) - 32usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_cuda_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_cuda_cl) - 40usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_to_cpu_cl) - 48usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 hip_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_interface"] [:: std :: mem :: size_of :: < starpu_multiformat_interface > () - 56usize] ; ["Alignment of starpu_multiformat_interface"] [:: std :: mem :: align_of :: < starpu_multiformat_interface > () - 8usize] ; ["Offset of field: starpu_multiformat_interface::id"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , id) - 0usize] ; ["Offset of field: starpu_multiformat_interface::cpu_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cpu_ptr) - 8usize] ; ["Offset of field: starpu_multiformat_interface::cuda_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cuda_ptr) - 16usize] ; ["Offset of field: starpu_multiformat_interface::hip_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , hip_ptr) - 24usize] ; ["Offset of field: starpu_multiformat_interface::opencl_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , opencl_ptr) - 32usize] ; ["Offset of field: starpu_multiformat_interface::nx"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , nx) - 40usize] ; ["Offset of field: starpu_multiformat_interface::ops"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , ops) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref TheMultiformatInterface for more details."] 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().\nSee \\ref DefiningANewDataFilter for more details."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n- id 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
\n- nx, ny 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).
\n- ld for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange.
\n- elemsize is usually just copied over.
\n- ptr, the pointer to the data, has to be\ncomputed according to \\p i and the father's ptr, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has ptr different\nfrom NULL: in the OpenCL case notably, the\ndev_handle and offset fields are used\ninstead.
\n- dev_handle should be just copied over from the\nparent.
\n- offset has to be computed according to \\p i and\nthe father's offset, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n
"] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_filter"] [:: std :: mem :: size_of :: < starpu_data_filter > () - 48usize] ; ["Alignment of starpu_data_filter"] [:: std :: mem :: align_of :: < starpu_data_filter > () - 8usize] ; ["Offset of field: starpu_data_filter::filter_func"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_func) - 0usize] ; ["Offset of field: starpu_data_filter::nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , nchildren) - 8usize] ; ["Offset of field: starpu_data_filter::get_nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_nchildren) - 16usize] ; ["Offset of field: starpu_data_filter::get_child_ops"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_child_ops) - 24usize] ; ["Offset of field: starpu_data_filter::filter_arg"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg) - 32usize] ; ["Offset of field: starpu_data_filter::filter_arg_ptr"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg_ptr) - 40usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitioned beforehand.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list.\nSee \\ref PartitioningData for more details."] 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 ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The pointer of the filter list \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_parray (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut * mut starpu_data_filter) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The list of filter \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_array (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_readonly_submit(), but allow to\nspecify the coherency to be used for the main data \\p initial_handle.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\nin read-write mode through starpu_data_partition_submit(), and will downgrade\nthat partitioning into read-only mode for the \\p children, fetching data back to the \\p\ninitial_handle, and adding the necessary dependencies.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_downgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_clean() but the root data will be\ngathered on the given node.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean_node (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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().\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] 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 ; } unsafe 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.\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices.\n\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a matrix along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_vector.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_vector_y().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a matrix. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_variable.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_variable().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr, thus getting a vector\nof size (n-2*shadow)/nparts+2*shadow. The starpu_data_filter::filter_arg_ptr field\nof \\p f must be the shadow size casted into \\c void*.\n\nIMPORTANT: 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in 2 chunks of\nequal size, ignoring nparts. Thus, \\p id must be 0 or 1.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a vector. The starting\nposition is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_vector_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fvector_pick_variable.c\n\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_vector_filter_pick_variable().\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_matrix_z()\nand starpu_block_filter_pick_matrix_y().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a block. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_variable.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_variable().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, thus getting\n(x/\\p nparts ,y,z,t) tensors. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z,t) tensors. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, thus getting\n(x,y/\\p nparts ,z,t) tensors. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z,t) tensors. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, thus getting\n(x,y,z/\\p nparts,t) tensors. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow,t) tensors. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, thus getting\n(x,y,z,t/\\p nparts) tensors. If \\p nparts does not divide t, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,z,(t-2*shadow)/\\p nparts +2*shadow) tensors. If \\p nparts does not\ndivide t, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe T dimension. The starting position on T-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_t (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_block_t(),\nstarpu_tensor_filter_pick_block_z() and starpu_tensor_filter_pick_block_y().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a tensor. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_variable.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_variable().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg, with a shadow border\nstarpu_data_filter::filter_arg_ptr. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a 4-dim array into \\p nparts tensors along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_to_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor (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) ; } unsafe extern "C" { # [doc = "Partition a 3-dim array into \\p nparts blocks along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_block_child_ops(). A usage example is\navailable in examples/filters/fndim_to_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_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) ; } unsafe extern "C" { # [doc = "Partition a 2-dim array into \\p nparts matrices along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_to_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix (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) ; } unsafe extern "C" { # [doc = "Partition a 1-dim array into \\p nparts vectors.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_to_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector (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) ; } unsafe extern "C" { # [doc = "Transfer a 0-dim array to a variable.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_to_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous (n-1)dim arrays from a ndim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nA usage example is available in examples/filters/fndim_pick_ndim.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_ndim (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous tensors from a 5-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_5d_pick_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_5d_pick_tensor (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a 4-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/fndim_4d_pick_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_4d_pick_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a 3-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_3d_pick_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_3d_pick_matrix (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a 2-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_2d_pick_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_2d_pick_vector (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a 1-dim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_1d_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_1d_pick_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a ndim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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 blocksize, which is most often 1.\nSee \\ref DefiningANewDataFilter for more details."] 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 , blocksize : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_align (align : usize) ; } unsafe 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_noflag() function.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "@deprecated\nFree memory which has previously been allocated with\nstarpu_malloc(). This function is deprecated, one should use\nstarpu_free_noflag().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe extern "C" { # [doc = "Free memory by specifying its size. Should be used for memory\nallocated with starpu_malloc().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free_noflag (A : * mut :: std :: os :: raw :: c_void , dim : usize) -> :: 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 > ; unsafe 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().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on the node.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used (node : :: std :: os :: raw :: c_uint) -> usize ; } unsafe extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref DataManagementAllocation)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nDataManagementAllocation)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on all memory nodes.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used_all_nodes () -> usize ; } unsafe 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 -ENOMEM 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_sec seconds. Similar to calling Unix' \\c\nsleep function, except that it takes a float to allow sub-second\nsleeping, and when StarPU is compiled in SimGrid mode it does not\nreally sleep but just makes SimGrid record that the thread has\ntaken some time to sleep.\nSee \\ref Helpers for more details."] pub fn starpu_sleep (nb_sec : f32) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_micro_sec micro-seconds.\nIn simgrid mode, this only sleeps within virtual time.\nSee \\ref Helpers for more details."] pub fn starpu_usleep (nb_micro_sec : f32) ; } unsafe extern "C" { # [doc = "Account for \\p joules J being used.\nThis is support in simgrid mode, to record how much energy was used, and will\nshow up in further call to starpu_energy_used().\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_use (joules : f32) ; } unsafe extern "C" { # [doc = "Return the amount of energy having been used in J.\nThis account the amounts passed to starpu_energy_use(), but also the static\nenergy use set by the \\ref STARPU_IDLE_POWER environment variable.\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_used () -> f64 ; } # [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 ; unsafe 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) ; } unsafe 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 -EPERM, if\n\\p task was already submitted it returns -EINVAL."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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-ENOENT."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] 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]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\nNULL 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifier. It is possible to associate a task\nwith a unique tag 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 ; unsafe 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\nWARNING! Use with caution. 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\n0x200000003 instead of 0x2 and 0x3 when\ncalling starpu_tag_declare_deps(0x1, 2, 0x2, 0x3). 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } unsafe 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 structure starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled).\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Clear the already notified 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } unsafe 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().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } unsafe extern "C" { # [doc = "Return the task associated to the tag \\p id.\nSee \\ref TasksAndTagsDependencies for more details."] 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 submitted, 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 ; # [doc = "todo"] 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 = "HIP implementation of a codelet."] pub type starpu_hip_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 = "Maxeler FPGA implementation of a codelet."] pub type starpu_max_fpga_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 = "@ingroup API_Bubble Hierarchical Dags\nBubble decision function"] pub type starpu_bubble_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = "@ingroup API_Bubble Hierarchical Dags\nBubble DAG generation function"] pub type starpu_bubble_gen_dag_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_trs_epoch { _unused : [u8 ; 0] , } pub type starpu_trs_epoch_t = * mut _starpu_trs_epoch ; # [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.\n\nNote that the codelet structure needs to exist until the task is\nterminated. If dynamic codelet allocation is desired, release should be done\nno sooner than the starpu_task::callback_func callback time.\n\nIf the application wants to make the structure constant, it needs to be\nfilled exactly as StarPU expects:\n\n- starpu_codelet::cpu_funcs, starpu_codelet::cuda_funcs, etc. must be used instead\nof the deprecated starpu_codelet::cpu_func, starpu_codelet::cuda_func, etc.\n\n- the starpu_codelet::where field must be set.\n\nand additionally, starpu_codelet::checked must be set to 1 to tell StarPU\nthat the conditions above are properly met. Also, the \\ref\nSTARPU_CODELET_PROFILING environment variable must be set to 0.\nAn example is provided in tests/main/const_codelet.c"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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_HIP, ::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-NULL 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-NULL 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 HIP\nimplementations of the codelet. The functions must be\nhost-functions written in the HIP runtime API. Their\nprototype must be:\n\\code{.c}\nvoid hip_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::hip_funcs is ignored if ::STARPU_HIP does\nnot appear in the field starpu_codelet::where, it must be\nnon-NULL otherwise."] pub hip_funcs : [starpu_hip_func_t ; 4usize] , # [doc = "Optional array of flags for HIP execution. They specify\nsome semantic details about HIP kernel execution, such as\nasynchronous execution."] pub hip_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-NULL 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 the Maxeler FPGA\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid fpga_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 starpu_codelet::max_fpga_funcs is ignored if\n::STARPU_MAX_FPGA does not appear in the field\nstarpu_codelet::where, it must be non-NULL otherwise."] pub max_fpga_funcs : [starpu_max_fpga_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\nMPI MS devices for StarPU to simply look\nup the MPI MS function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional function to decide if the task is to be\ntransformed into a bubble"] pub bubble_func : starpu_bubble_func_t , # [doc = "Optional function to transform the task into a new graph"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\nvoid *buffers[] 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 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,\nand should not exceed \\ref STARPU_NMAXBUFS. If\ninsufficient, 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\ndata 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 data 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 NULL 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 (in J). This optional field is\nignored when set to NULL 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 ; 48usize] , # [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. Value 0 acts like if this field wasn't specified.\nColor representation is hex triplet (for example: 0xff0000 is red,\n0x0000ff is blue, 0xffa500 is orange, ...)."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL."] 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 , pub perf_counter_sample : * mut starpu_perf_counter_sample , pub perf_counter_values : * mut starpu_perf_counter_sample_cl_values , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet"] [:: std :: mem :: size_of :: < starpu_codelet > () - 832usize] ; ["Alignment of starpu_codelet"] [:: std :: mem :: align_of :: < starpu_codelet > () - 8usize] ; ["Offset of field: starpu_codelet::where_"] [:: std :: mem :: offset_of ! (starpu_codelet , where_) - 0usize] ; ["Offset of field: starpu_codelet::can_execute"] [:: std :: mem :: offset_of ! (starpu_codelet , can_execute) - 8usize] ; ["Offset of field: starpu_codelet::type_"] [:: std :: mem :: offset_of ! (starpu_codelet , type_) - 16usize] ; ["Offset of field: starpu_codelet::max_parallelism"] [:: std :: mem :: offset_of ! (starpu_codelet , max_parallelism) - 20usize] ; ["Offset of field: starpu_codelet::cpu_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_func) - 24usize] ; ["Offset of field: starpu_codelet::cuda_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_func) - 32usize] ; ["Offset of field: starpu_codelet::opencl_func"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_func) - 40usize] ; ["Offset of field: starpu_codelet::cpu_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs) - 48usize] ; ["Offset of field: starpu_codelet::cuda_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_funcs) - 80usize] ; ["Offset of field: starpu_codelet::cuda_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_flags) - 112usize] ; ["Offset of field: starpu_codelet::hip_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_funcs) - 120usize] ; ["Offset of field: starpu_codelet::hip_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_flags) - 152usize] ; ["Offset of field: starpu_codelet::opencl_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_funcs) - 160usize] ; ["Offset of field: starpu_codelet::opencl_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_flags) - 192usize] ; ["Offset of field: starpu_codelet::max_fpga_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , max_fpga_funcs) - 200usize] ; ["Offset of field: starpu_codelet::cpu_funcs_name"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs_name) - 232usize] ; ["Offset of field: starpu_codelet::bubble_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_func) - 264usize] ; ["Offset of field: starpu_codelet::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_gen_dag_func) - 272usize] ; ["Offset of field: starpu_codelet::nbuffers"] [:: std :: mem :: offset_of ! (starpu_codelet , nbuffers) - 280usize] ; ["Offset of field: starpu_codelet::modes"] [:: std :: mem :: offset_of ! (starpu_codelet , modes) - 284usize] ; ["Offset of field: starpu_codelet::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_modes) - 320usize] ; ["Offset of field: starpu_codelet::specific_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , specific_nodes) - 328usize] ; ["Offset of field: starpu_codelet::nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , nodes) - 332usize] ; ["Offset of field: starpu_codelet::dyn_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_nodes) - 368usize] ; ["Offset of field: starpu_codelet::model"] [:: std :: mem :: offset_of ! (starpu_codelet , model) - 376usize] ; ["Offset of field: starpu_codelet::energy_model"] [:: std :: mem :: offset_of ! (starpu_codelet , energy_model) - 384usize] ; ["Offset of field: starpu_codelet::per_worker_stats"] [:: std :: mem :: offset_of ! (starpu_codelet , per_worker_stats) - 392usize] ; ["Offset of field: starpu_codelet::name"] [:: std :: mem :: offset_of ! (starpu_codelet , name) - 776usize] ; ["Offset of field: starpu_codelet::color"] [:: std :: mem :: offset_of ! (starpu_codelet , color) - 784usize] ; ["Offset of field: starpu_codelet::callback_func"] [:: std :: mem :: offset_of ! (starpu_codelet , callback_func) - 792usize] ; ["Offset of field: starpu_codelet::flags"] [:: std :: mem :: offset_of ! (starpu_codelet , flags) - 800usize] ; ["Offset of field: starpu_codelet::perf_counter_sample"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_sample) - 808usize] ; ["Offset of field: starpu_codelet::perf_counter_values"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_values) - 816usize] ; ["Offset of field: starpu_codelet::checked"] [:: std :: mem :: offset_of ! (starpu_codelet , checked) - 824usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Codelet with empty function defined for all drivers"] pub static mut starpu_codelet_nop : starpu_codelet ; } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_descr"] [:: std :: mem :: size_of :: < starpu_data_descr > () - 16usize] ; ["Alignment of starpu_data_descr"] [:: std :: mem :: align_of :: < starpu_data_descr > () - 8usize] ; ["Offset of field: starpu_data_descr::handle"] [:: std :: mem :: offset_of ! (starpu_data_descr , handle) - 0usize] ; ["Offset of field: starpu_data_descr::mode"] [:: std :: mem :: offset_of ! (starpu_data_descr , mode) - 8usize] ; } ; 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)] 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 = "Optional file name where the task was submitted. This can be useful\nfor debugging purposes."] pub file : * const :: std :: os :: raw :: c_char , # [doc = "Optional line number where the task was submitted. This can be useful\nfor debugging purposes."] pub line : :: std :: os :: raw :: c_int , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to NULL,\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 data 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\ndata 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 insufficient, 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 needed 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 insufficient,\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 NULL. 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 pointer which points to the return value of submitted task.\nThe default value is NULL. starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be used to respectively\npack and unpack the return value into and form it. starpu_task::cl_ret\ncan be used for MPI support. The only requirement is that\nthe size of the return value must be set in starpu_task::cl_ret_size ."] pub cl_ret : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. The buffer of starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be allocated with\nthe starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret.\nstarpu_task::cl_ret_size can be used for MPI support."] pub cl_ret_size : usize , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *) which\nspecifies a possible callback. If this pointer is non-NULL,\nthe callback function is executed on the host after the execution of\nthe task. Contrary to starpu_task::callback_func, it is called\nbefore releasing tasks which depend on this task, so those cannot be\nalready executing. The callback is passed\nthe value contained in the starpu_task::epilogue_callback_arg field.\nNo callback is executed if the field is set to NULL.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EPILOGUE_CALLBACK followed by the function pointer."] pub epilogue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is NULL. This is\nthe pointer passed to the epilogue callback function. This field is\nignored if the field starpu_task::epilogue_callback_func is set to\nNULL."] pub epilogue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, the callback function is executed on the\nhost after the execution of the task. Contrary to\nstarpu_task::epilogue_callback, it is called after releasing\ntasks which depend on this task, so those\nmight 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 NULL.\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 NULL. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\nNULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void*)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 = "Transaction to which the task belongs, if any"] pub transaction : * mut starpu_transaction , # [doc = "Transaction epoch to which the task belongs, if any"] pub trs_epoch : starpu_trs_epoch_t , # [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 this task has failed and will thus have to be retried\n\nSet by StarPU."] pub failed : :: 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\nCall starpu_task_status_get_as_string() to get the status as a string.\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 NULL."] 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 starpu_perfmodel_plot, 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 in microseconds. 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 = "When using hierarchical dags, the job identifier of the\nbubble task which created the current task"] pub bubble_parent : :: std :: os :: raw :: c_ulong , # [doc = "When using hierarchical dags, a pointer to the bubble\ndecision function"] pub bubble_func : starpu_bubble_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble decision function"] pub bubble_func_arg : * mut :: std :: os :: raw :: c_void , # [doc = "When using hierarchical dags, a pointer to the bubble\nDAG generation function"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble DAG generation function"] pub bubble_gen_dag_func_arg : * mut :: std :: os :: raw :: c_void , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task"] [:: std :: mem :: size_of :: < starpu_task > () - 552usize] ; ["Alignment of starpu_task"] [:: std :: mem :: align_of :: < starpu_task > () - 8usize] ; ["Offset of field: starpu_task::name"] [:: std :: mem :: offset_of ! (starpu_task , name) - 0usize] ; ["Offset of field: starpu_task::file"] [:: std :: mem :: offset_of ! (starpu_task , file) - 8usize] ; ["Offset of field: starpu_task::line"] [:: std :: mem :: offset_of ! (starpu_task , line) - 16usize] ; ["Offset of field: starpu_task::cl"] [:: std :: mem :: offset_of ! (starpu_task , cl) - 24usize] ; ["Offset of field: starpu_task::where_"] [:: std :: mem :: offset_of ! (starpu_task , where_) - 32usize] ; ["Offset of field: starpu_task::nbuffers"] [:: std :: mem :: offset_of ! (starpu_task , nbuffers) - 36usize] ; ["Offset of field: starpu_task::dyn_handles"] [:: std :: mem :: offset_of ! (starpu_task , dyn_handles) - 40usize] ; ["Offset of field: starpu_task::dyn_interfaces"] [:: std :: mem :: offset_of ! (starpu_task , dyn_interfaces) - 48usize] ; ["Offset of field: starpu_task::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_task , dyn_modes) - 56usize] ; ["Offset of field: starpu_task::handles"] [:: std :: mem :: offset_of ! (starpu_task , handles) - 64usize] ; ["Offset of field: starpu_task::interfaces"] [:: std :: mem :: offset_of ! (starpu_task , interfaces) - 128usize] ; ["Offset of field: starpu_task::modes"] [:: std :: mem :: offset_of ! (starpu_task , modes) - 192usize] ; ["Offset of field: starpu_task::handles_sequential_consistency"] [:: std :: mem :: offset_of ! (starpu_task , handles_sequential_consistency) - 224usize] ; ["Offset of field: starpu_task::cl_arg"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg) - 232usize] ; ["Offset of field: starpu_task::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg_size) - 240usize] ; ["Offset of field: starpu_task::cl_ret"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret) - 248usize] ; ["Offset of field: starpu_task::cl_ret_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret_size) - 256usize] ; ["Offset of field: starpu_task::epilogue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_func) - 264usize] ; ["Offset of field: starpu_task::epilogue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_arg) - 272usize] ; ["Offset of field: starpu_task::callback_func"] [:: std :: mem :: offset_of ! (starpu_task , callback_func) - 280usize] ; ["Offset of field: starpu_task::callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , callback_arg) - 288usize] ; ["Offset of field: starpu_task::prologue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_func) - 296usize] ; ["Offset of field: starpu_task::prologue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_arg) - 304usize] ; ["Offset of field: starpu_task::prologue_callback_pop_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_func) - 312usize] ; ["Offset of field: starpu_task::prologue_callback_pop_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_arg) - 320usize] ; ["Offset of field: starpu_task::transaction"] [:: std :: mem :: offset_of ! (starpu_task , transaction) - 328usize] ; ["Offset of field: starpu_task::trs_epoch"] [:: std :: mem :: offset_of ! (starpu_task , trs_epoch) - 336usize] ; ["Offset of field: starpu_task::tag_id"] [:: std :: mem :: offset_of ! (starpu_task , tag_id) - 344usize] ; ["Offset of field: starpu_task::mf_skip"] [:: std :: mem :: offset_of ! (starpu_task , mf_skip) - 354usize] ; ["Offset of field: starpu_task::failed"] [:: std :: mem :: offset_of ! (starpu_task , failed) - 355usize] ; ["Offset of field: starpu_task::scheduled"] [:: std :: mem :: offset_of ! (starpu_task , scheduled) - 356usize] ; ["Offset of field: starpu_task::prefetched"] [:: std :: mem :: offset_of ! (starpu_task , prefetched) - 357usize] ; ["Offset of field: starpu_task::workerid"] [:: std :: mem :: offset_of ! (starpu_task , workerid) - 360usize] ; ["Offset of field: starpu_task::workerorder"] [:: std :: mem :: offset_of ! (starpu_task , workerorder) - 364usize] ; ["Offset of field: starpu_task::workerids"] [:: std :: mem :: offset_of ! (starpu_task , workerids) - 368usize] ; ["Offset of field: starpu_task::workerids_len"] [:: std :: mem :: offset_of ! (starpu_task , workerids_len) - 376usize] ; ["Offset of field: starpu_task::priority"] [:: std :: mem :: offset_of ! (starpu_task , priority) - 380usize] ; ["Offset of field: starpu_task::status"] [:: std :: mem :: offset_of ! (starpu_task , status) - 384usize] ; ["Offset of field: starpu_task::magic"] [:: std :: mem :: offset_of ! (starpu_task , magic) - 388usize] ; ["Offset of field: starpu_task::type_"] [:: std :: mem :: offset_of ! (starpu_task , type_) - 392usize] ; ["Offset of field: starpu_task::color"] [:: std :: mem :: offset_of ! (starpu_task , color) - 396usize] ; ["Offset of field: starpu_task::sched_ctx"] [:: std :: mem :: offset_of ! (starpu_task , sched_ctx) - 400usize] ; ["Offset of field: starpu_task::hypervisor_tag"] [:: std :: mem :: offset_of ! (starpu_task , hypervisor_tag) - 404usize] ; ["Offset of field: starpu_task::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_task , possibly_parallel) - 408usize] ; ["Offset of field: starpu_task::bundle"] [:: std :: mem :: offset_of ! (starpu_task , bundle) - 416usize] ; ["Offset of field: starpu_task::profiling_info"] [:: std :: mem :: offset_of ! (starpu_task , profiling_info) - 424usize] ; ["Offset of field: starpu_task::flops"] [:: std :: mem :: offset_of ! (starpu_task , flops) - 432usize] ; ["Offset of field: starpu_task::predicted"] [:: std :: mem :: offset_of ! (starpu_task , predicted) - 440usize] ; ["Offset of field: starpu_task::predicted_transfer"] [:: std :: mem :: offset_of ! (starpu_task , predicted_transfer) - 448usize] ; ["Offset of field: starpu_task::predicted_start"] [:: std :: mem :: offset_of ! (starpu_task , predicted_start) - 456usize] ; ["Offset of field: starpu_task::prev"] [:: std :: mem :: offset_of ! (starpu_task , prev) - 464usize] ; ["Offset of field: starpu_task::next"] [:: std :: mem :: offset_of ! (starpu_task , next) - 472usize] ; ["Offset of field: starpu_task::starpu_private"] [:: std :: mem :: offset_of ! (starpu_task , starpu_private) - 480usize] ; ["Offset of field: starpu_task::omp_task"] [:: std :: mem :: offset_of ! (starpu_task , omp_task) - 488usize] ; ["Offset of field: starpu_task::bubble_parent"] [:: std :: mem :: offset_of ! (starpu_task , bubble_parent) - 496usize] ; ["Offset of field: starpu_task::bubble_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func) - 504usize] ; ["Offset of field: starpu_task::bubble_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func_arg) - 512usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func) - 520usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func_arg) - 528usize] ; ["Offset of field: starpu_task::nb_termination_call_required"] [:: std :: mem :: offset_of ! (starpu_task , nb_termination_call_required) - 536usize] ; ["Offset of field: starpu_task::sched_data"] [:: std :: mem :: offset_of ! (starpu_task , sched_data) - 544usize] ; } ; 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 unsafe fn cl_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn cl_ret_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_cl_ret_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 unsafe fn cl_ret_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_ret_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn 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_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 unsafe fn callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn epilogue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_epilogue_callback_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 unsafe fn epilogue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_epilogue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 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 (4usize , 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 (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 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 (5usize , 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 (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_pop_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_pop_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 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 (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_tag_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_tag_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 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 (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn sequential_consistency_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_sequential_consistency_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 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 (8usize , 1u8 , val as u64) } } # [inline] pub unsafe fn synchronous_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 8usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_synchronous_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 8usize , 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 (9usize , 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 (9usize , 1u8 , val as u64) } } # [inline] pub unsafe fn execute_on_a_specific_worker_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 9usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_execute_on_a_specific_worker_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 9usize , 1u8 , val as u64 ,) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 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 (10usize , 1u8 , val as u64) } } # [inline] pub unsafe fn detach_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 10usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_detach_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 10usize , 1u8 , val as u64 ,) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 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 (11usize , 1u8 , val as u64) } } # [inline] pub unsafe fn destroy_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 11usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_destroy_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 11usize , 1u8 , val as u64 ,) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (12usize , 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 (12usize , 1u8 , val as u64) } } # [inline] pub unsafe fn regenerate_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 12usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_regenerate_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 12usize , 1u8 , val as u64 ,) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (13usize , 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 (13usize , 1u8 , val as u64) } } # [inline] pub unsafe fn no_submitorder_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 13usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_no_submitorder_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 13usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , cl_ret_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , epilogue_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 cl_ret_free : u32 = unsafe { :: std :: mem :: transmute (cl_ret_free) } ; cl_ret_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let epilogue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (epilogue_callback_arg_free) } ; epilogue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 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 (5usize , 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 (6usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (9usize , 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 (10usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (12usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (13usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } unsafe 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.\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_init (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_clean (task : * mut starpu_task) ; } unsafe 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().\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_create () -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Allocate a task structure that does nothing but accesses data \\p handle\nwith mode \\p mode. This allows to synchronize with the task graph, according\nto the sequential consistency, against tasks submitted before or after\nsubmitting this task. One can then use starpu_task_declare_deps_array() or\nstarpu_task_end_dep_add() / starpu_task_end_dep_release() to add dependencies\nagainst this task before submitting it.\nSee \\ref SynchronizationTasks for more details."] pub fn starpu_task_create_sync (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> * mut starpu_task ; } unsafe 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.\nSee \\ref Per-taskFeedback and \\ref PerformanceModelExample for more details."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Tell StarPU to free the resources associated with \\p task when the task is\nover. This is equivalent to having set task->destroy = 1 before submission,\nthe difference is that this can be called after submission and properly deals\nwith concurrency with the task execution.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_set_destroy (task : * mut starpu_task) ; } unsafe 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-ENODEV 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Submit \\p task to StarPU with dependency bypass.\n\nThis can only be called on behalf of another task which has already taken the\nproper dependencies, e.g. this task is just an attempt of doing the actual\ncomputation of that task.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_submit_nodeps (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingTasksToAContext for more details."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if \\p task is terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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, -EINVAL indicates that the\nspecified task was either synchronous or detached.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, -EINVAL indicates that\none of the tasks was either synchronous or detached.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowtoReuseMemory for more details."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] 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 ; } unsafe extern "C" { # [doc = "Wait until there is no more ready task.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_pop () ; } unsafe extern "C" { # [doc = "See \\ref GraphScheduling for more details."] pub fn starpu_do_schedule () ; } unsafe 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++.\nSee \\ref DefiningACodelet for more details."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl.\nSee \\ref Per-codeletFeedback for more details."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Return the task currently executed by the worker, or NULL 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.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_task_get_current () -> * mut starpu_task ; } unsafe 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.\n\nSee \\ref SpecifyingATargetNode for more details."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the name of the performance model of \\p task.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref TraceTaskDetails for more details."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Create and submit an empty task with the given callback.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Function to be used as a prologue callback to enable fault tolerance for the\ntask. This prologue will create a try-task, i.e a duplicate of the task,\nwhich will to the actual computation.\n\nThe prologue argument can be set to a check_ft function that will be\ncalled on termination of the duplicate, which can check the result of the\ntask, and either confirm success, or resubmit another attempt.\nIf it is not set, the default implementation is to just resubmit a new\ntry-task.\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_prologue (check_ft : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Create a try-task for a \\p meta_task, given a \\p template_task task\ntemplate. The meta task can be passed as template on the first call, but\nsince it is mangled by starpu_task_ft_create_retry(), further calls\n(typically made by the check_ft callback) need to be passed the previous\ntry-task as template task.\n\n\\p check_ft is similar to the prologue argument of\nstarpu_task_ft_prologue(), and is typically set to the very function calling\nstarpu_task_ft_create_retry().\n\nThe try-task is returned, and can be modified (e.g. to change scheduling\nparameters) before being submitted with starpu_task_submit_nodeps().\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_create_retry (meta_task : * const starpu_task , template_task : * const starpu_task , check_ft : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Record that this task failed, and should thus be retried.\nThis is usually called from the task codelet function itself, after checking\nthe result and noticing that the computation went wrong, and thus the task\nshould be retried. The performance of this task execution will not be\nrecorded for performance models.\n\nThis can only be called for a task whose data access modes are either\n::STARPU_R and ::STARPU_W."] pub fn starpu_task_ft_failed (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Notify that the try-task was successful and thus the meta-task was\nsuccessful.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_success (meta_task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for \\ref STARPU_WATCHDOG_TIMEOUT seconds.\nSee \\ref WatchdogSupport for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the given status as a string"] pub fn starpu_task_status_get_as_string (status : starpu_task_status) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Specify a minimum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MIN_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_min_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Specify a maximum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MAX_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_max_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Function to open a new transaction object and start the first transaction epoch.\n\n@return A pointer to an initializes struct starpu_transaction\nor \\c NULL if submitting the transaction begin task failed with \\c ENODEV.\nSee \\ref TransactionsCreation for more details."] pub fn starpu_transaction_open (do_start_func : :: std :: option :: Option < unsafe extern "C" fn (buffer : * mut :: std :: os :: raw :: c_void , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , do_start_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_transaction ; } unsafe extern "C" { # [doc = "Function to mark the end of the current transaction epoch and start a new epoch.\nSee \\ref TransactionsEpochNext for more details."] pub fn starpu_transaction_next_epoch (p_trs : * mut starpu_transaction , do_start_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Function to mark the end of the last transaction epoch and free the transaction object.\nSee \\ref TransactionsClosing for more details."] pub fn starpu_transaction_close (p_trs : * mut starpu_transaction) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; # [doc = "< CPU core"] pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; # [doc = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_RAM : starpu_node_kind = 4 ; # [doc = "< Disk memory"] pub const STARPU_DISK_RAM : starpu_node_kind = 5 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_RAM : starpu_node_kind = 7 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_RAM : starpu_node_kind = 8 ; # [doc = "< Maximum value of memory types"] pub const STARPU_MAX_RAM : starpu_node_kind = 8 ; # [doc = "< Number of memory types"] pub const STARPU_NRAM : starpu_node_kind = 9 ; # [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 = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_WORKER : starpu_worker_archtype = 4 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_WORKER : starpu_worker_archtype = 6 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_WORKER : starpu_worker_archtype = 7 ; # [doc = "< Number of arch types"] pub const STARPU_NARCH : starpu_worker_archtype = 8 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 255 ; # [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)] 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 ; 48usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_ctx_iterator"] [:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () - 80usize] ; ["Alignment of starpu_sched_ctx_iterator"] [:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::cursor"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , cursor) - 0usize] ; ["Offset of field: starpu_sched_ctx_iterator::value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , value) - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::possible_value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possible_value) - 16usize] ; ["Offset of field: starpu_sched_ctx_iterator::visited"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , visited) - 24usize] ; ["Offset of field: starpu_sched_ctx_iterator::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possibly_parallel) - 72usize] ; } ; 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)] 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 ; 48usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 48usize] , pub is_master : [:: std :: os :: raw :: c_char ; 48usize] , # [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 collection"] 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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_worker_collection"] [:: std :: mem :: size_of :: < starpu_worker_collection > () - 264usize] ; ["Alignment of starpu_worker_collection"] [:: std :: mem :: align_of :: < starpu_worker_collection > () - 8usize] ; ["Offset of field: starpu_worker_collection::workerids"] [:: std :: mem :: offset_of ! (starpu_worker_collection , workerids) - 0usize] ; ["Offset of field: starpu_worker_collection::collection_private"] [:: std :: mem :: offset_of ! (starpu_worker_collection , collection_private) - 8usize] ; ["Offset of field: starpu_worker_collection::nworkers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nworkers) - 16usize] ; ["Offset of field: starpu_worker_collection::unblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , unblocked_workers) - 24usize] ; ["Offset of field: starpu_worker_collection::nunblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nunblocked_workers) - 32usize] ; ["Offset of field: starpu_worker_collection::masters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , masters) - 40usize] ; ["Offset of field: starpu_worker_collection::nmasters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nmasters) - 48usize] ; ["Offset of field: starpu_worker_collection::present"] [:: std :: mem :: offset_of ! (starpu_worker_collection , present) - 52usize] ; ["Offset of field: starpu_worker_collection::is_unblocked"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_unblocked) - 100usize] ; ["Offset of field: starpu_worker_collection::is_master"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_master) - 148usize] ; ["Offset of field: starpu_worker_collection::type_"] [:: std :: mem :: offset_of ! (starpu_worker_collection , type_) - 196usize] ; ["Offset of field: starpu_worker_collection::has_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , has_next) - 200usize] ; ["Offset of field: starpu_worker_collection::get_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , get_next) - 208usize] ; ["Offset of field: starpu_worker_collection::add"] [:: std :: mem :: offset_of ! (starpu_worker_collection , add) - 216usize] ; ["Offset of field: starpu_worker_collection::remove"] [:: std :: mem :: offset_of ! (starpu_worker_collection , remove) - 224usize] ; ["Offset of field: starpu_worker_collection::init"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init) - 232usize] ; ["Offset of field: starpu_worker_collection::deinit"] [:: std :: mem :: offset_of ! (starpu_worker_collection , deinit) - 240usize] ; ["Offset of field: starpu_worker_collection::init_iterator"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator) - 248usize] ; ["Offset of field: starpu_worker_collection::init_iterator_for_parallel_tasks"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator_for_parallel_tasks) - 256usize] ; } ; 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 () } } } unsafe extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } unsafe extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } unsafe extern "C" { # [doc = "Wait for all workers to be initialised. Calling this function is\nnormally not necessary. It is called for example in\ntools/starpu_machine_display to make sure all workers\ninformation are correctly set before printing their information.\nSee \\ref PauseResume for more details."] pub fn starpu_worker_wait_for_initialisation () ; } unsafe extern "C" { # [doc = "Return true if type matches one of StarPU's defined worker architectures.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_archtype_is_valid (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Convert a mask of architectures to a worker archtype.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_arch_mask_to_worker_archtype (mask : :: std :: os :: raw :: c_uint) -> starpu_worker_archtype ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of HIP devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXHIPDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_hip_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of TCPIP Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_tcpip_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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).\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_sched_find_all_worker_combinations () ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\nNULL) value is returned in case of success, -EINVAL\nindicates that \\p type is not valid otherwise.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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-ERANGE 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return true if worker type can execute this task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_type_can_execute_task (worker_type : starpu_worker_archtype , task : * const starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all workers.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_all (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe extern "C" { # [doc = "Display on \\p output the number of workers of the given \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_count (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe 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 hwloc in case it is available.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devnum (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_subworkerid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return when the current task is expected to be finished.\n\nNote: the returned date should be used with caution since the task might very\nwell end just after this function returns.\n\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_worker_get_current_task_exp_end (workerid : :: std :: os :: raw :: c_uint , date : * mut timespec) ; } unsafe extern "C" { # [doc = "Return whether worker \\p workerid is currently blocked in a parallel task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return worker \\p type from a string.\nReturns STARPU_UNKNOWN_WORKER if the string doesn't match a worker type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_from_string (type_ : * const :: std :: os :: raw :: c_char) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string suitable for environment variable names (CPU, CUDA, etc.).\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_env_var (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe 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().\nSee \\ref InteroperabilityHWLOC for more details."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } unsafe extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to the worker \\p workerid.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } unsafe extern "C" { # [doc = "See \\ref TopologyMemory for more details."] pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the memory node associated to the current worker.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes of a given \\p kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count_by_kind (kind : starpu_node_kind) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Get the list of memory nodes of kind \\p kind.\nFill the array \\p memory_nodes_ids with the memory nodes numbers.\nThe argument \\p maxsize indicates the size of the array\n\\p memory_nodes_ids. The return value gives the number of node numbers\nthat were put in the array. -ERANGE is returned if \\p maxsize\nis lower than the number of memory nodes with the appropriate kind: in that\ncase, the array is filled with the \\p maxsize first elements. To avoid such\noverflows, the value of maxsize can be chosen by the means of function\nstarpu_memory_nodes_get_count_by_kind(), or by passing a value greater or\nequal to \\ref STARPU_MAXNODES.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_ids_by_type (kind : starpu_node_kind , memory_nodes_ids : * mut :: std :: os :: raw :: c_uint , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } unsafe extern "C" { # [doc = "Return the type of worker which operates on memory node kind \\p node_kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_worker_archtype (node_kind : starpu_node_kind) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the type of memory node that arch type \\p type operates on.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node_kind (type_ : starpu_worker_archtype) -> starpu_node_kind ; } unsafe 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 ; } unsafe 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 UINT_MAX-1 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_on () ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_off () ; } unsafe extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Acquire the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock_self () ; } unsafe extern "C" { # [doc = "Release the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock_self () ; } unsafe extern "C" { # [doc = "Return the number of different combined workers.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the current combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref Fork-modeParallelTasks and \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Register a new combined worker and get its identifier.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Get the description of a combined worker.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } unsafe 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).\nSee \\ref SchedulingHelpers for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_device"] [:: std :: mem :: size_of :: < starpu_perfmodel_device > () - 12usize] ; ["Alignment of starpu_perfmodel_device"] [:: std :: mem :: align_of :: < starpu_perfmodel_device > () - 4usize] ; ["Offset of field: starpu_perfmodel_device::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , type_) - 0usize] ; ["Offset of field: starpu_perfmodel_device::devid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , devid) - 4usize] ; ["Offset of field: starpu_perfmodel_device::ncores"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , ncores) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_arch > () - 16usize] ; ["Alignment of starpu_perfmodel_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_arch::ndevices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , ndevices) - 0usize] ; ["Offset of field: starpu_perfmodel_arch::devices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , devices) - 8usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_entry"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () - 88usize] ; ["Alignment of starpu_perfmodel_history_entry"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::mean"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , mean) - 0usize] ; ["Offset of field: starpu_perfmodel_history_entry::deviation"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , deviation) - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum) - 16usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum2) - 24usize] ; ["Offset of field: starpu_perfmodel_history_entry::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nsample) - 32usize] ; ["Offset of field: starpu_perfmodel_history_entry::nerror"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nerror) - 36usize] ; ["Offset of field: starpu_perfmodel_history_entry::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel_history_entry::size"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , size) - 48usize] ; ["Offset of field: starpu_perfmodel_history_entry::flops"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , flops) - 56usize] ; ["Offset of field: starpu_perfmodel_history_entry::duration"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , duration) - 64usize] ; ["Offset of field: starpu_perfmodel_history_entry::tag"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , tag) - 72usize] ; ["Offset of field: starpu_perfmodel_history_entry::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , parameters) - 80usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_list"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () - 16usize] ; ["Alignment of starpu_perfmodel_history_list"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_list::next"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , next) - 0usize] ; ["Offset of field: starpu_perfmodel_history_list::entry"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , entry) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_regression_model"] [:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () - 120usize] ; ["Alignment of starpu_perfmodel_regression_model"] [:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlny) - 0usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx) - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx2) - 16usize] ; ["Offset of field: starpu_perfmodel_regression_model::minx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , minx) - 24usize] ; ["Offset of field: starpu_perfmodel_regression_model::maxx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , maxx) - 32usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnxlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnxlny) - 40usize] ; ["Offset of field: starpu_perfmodel_regression_model::alpha"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , alpha) - 48usize] ; ["Offset of field: starpu_perfmodel_regression_model::beta"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , beta) - 56usize] ; ["Offset of field: starpu_perfmodel_regression_model::valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , valid) - 64usize] ; ["Offset of field: starpu_perfmodel_regression_model::a"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , a) - 72usize] ; ["Offset of field: starpu_perfmodel_regression_model::b"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , b) - 80usize] ; ["Offset of field: starpu_perfmodel_regression_model::c"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , c) - 88usize] ; ["Offset of field: starpu_perfmodel_regression_model::nl_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nl_valid) - 96usize] ; ["Offset of field: starpu_perfmodel_regression_model::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nsample) - 100usize] ; ["Offset of field: starpu_perfmodel_regression_model::coeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , coeff) - 104usize] ; ["Offset of field: starpu_perfmodel_regression_model::ncoeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , ncoeff) - 112usize] ; ["Offset of field: starpu_perfmodel_regression_model::multi_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , multi_valid) - 116usize] ; } ; 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)] 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_per_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () - 408usize] ; ["Alignment of starpu_perfmodel_per_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , cost_function) - 0usize] ; ["Offset of field: starpu_perfmodel_per_arch::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , size_base) - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::history"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , history) - 16usize] ; ["Offset of field: starpu_perfmodel_per_arch::list"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , list) - 24usize] ; ["Offset of field: starpu_perfmodel_per_arch::regression"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , regression) - 32usize] ; ["Offset of field: starpu_perfmodel_per_arch::debug_path"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , debug_path) - 152usize] ; } ; 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-worker cost model function"] pub const STARPU_PER_WORKER : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 2 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 3 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic linear regression-based cost model (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 7 ; # [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)] pub struct starpu_perfmodel { # [doc = "type of performance model\n\n- \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
\n- \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
\n- \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
\n- \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
\n
"] 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_PER_ARCH. 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_PER_WORKER. Take a task, a worker id and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that worker."] pub worker_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not NULL, 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 NULL, 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 = "name of the file storing the performance model. It is non\nNULL if the model has been loaded or stored in a file."] pub path : * mut :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel"] [:: std :: mem :: size_of :: < starpu_perfmodel > () - 128usize] ; ["Alignment of starpu_perfmodel"] [:: std :: mem :: align_of :: < starpu_perfmodel > () - 8usize] ; ["Offset of field: starpu_perfmodel::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel , type_) - 0usize] ; ["Offset of field: starpu_perfmodel::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , cost_function) - 8usize] ; ["Offset of field: starpu_perfmodel::arch_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , arch_cost_function) - 16usize] ; ["Offset of field: starpu_perfmodel::worker_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , worker_cost_function) - 24usize] ; ["Offset of field: starpu_perfmodel::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel , size_base) - 32usize] ; ["Offset of field: starpu_perfmodel::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel::symbol"] [:: std :: mem :: offset_of ! (starpu_perfmodel , symbol) - 48usize] ; ["Offset of field: starpu_perfmodel::path"] [:: std :: mem :: offset_of ! (starpu_perfmodel , path) - 56usize] ; ["Offset of field: starpu_perfmodel::is_loaded"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_loaded) - 64usize] ; ["Offset of field: starpu_perfmodel::benchmarking"] [:: std :: mem :: offset_of ! (starpu_perfmodel , benchmarking) - 68usize] ; ["Offset of field: starpu_perfmodel::is_init"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_init) - 72usize] ; ["Offset of field: starpu_perfmodel::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters) - 80usize] ; ["Offset of field: starpu_perfmodel::parameters_names"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters_names) - 88usize] ; ["Offset of field: starpu_perfmodel::nparameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , nparameters) - 96usize] ; ["Offset of field: starpu_perfmodel::combinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , combinations) - 104usize] ; ["Offset of field: starpu_perfmodel::ncombinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , ncombinations) - 112usize] ; ["Offset of field: starpu_perfmodel::state"] [:: std :: mem :: offset_of ! (starpu_perfmodel , state) - 120usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = "Deinitialize the \\p model performance model structure. You need to call this\nbefore deallocating the structure. You will probably want to call\nstarpu_perfmodel_unload_model() before calling this function, to save the perfmodel."] pub fn starpu_perfmodel_deinit (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_start - start counting hardware events in an event set\n\n- \\p workerid is the worker on which calibration is to be performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration will be run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_start (workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_stop - stop counting hardware events in an event set\n\n- \\p model is the energy performance model to be filled with the result\n- \\p task is a task specimen, so the performance model folds the result according to the parameter sizes of the task.\n- \\p nimpl is the implementation number run during calibration\n- \\p ntasks is the number of tasks run during calibration\n- \\p workerid is the worker on which calibration was performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration was run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_stop (model : * mut starpu_perfmodel , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint , ntasks : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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$STARPU_HOME/.starpu. 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Save the performance model in its file."] pub fn starpu_save_history_based_model (model : * mut starpu_perfmodel) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } unsafe 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 tools/starpu_perfmodel_display.c."] pub fn starpu_perfmodel_free_sampling () ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the estimated time in µs 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 ; } unsafe 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 () ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with one explicit\nmeasurement (in µs or J), 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.\n\nNote that this records only one measurement, and StarPU would ignore\nthe first measurement (since it is usually disturbed by library loading\netc.). Make sure to call this function several times to record all your\nmeasurements.\n\nYou can also call starpu_perfmodel_update_history_n() to directly provide an\naverage performed on several tasks.\n\nSee \\ref PerformanceModelCalibration for more details."] 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) ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with an explicit average measurement (in µs or J).\n\nThis is similar to starpu_perfmodel_update_history(), but records a batch of\n\\p number measurements provided as the average of the measurements \\p average_measured."] pub fn starpu_perfmodel_update_history_n (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 , average_measured : f64 , number : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the latency of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task_list"] [:: std :: mem :: size_of :: < starpu_task_list > () - 16usize] ; ["Alignment of starpu_task_list"] [:: std :: mem :: align_of :: < starpu_task_list > () - 8usize] ; ["Offset of field: starpu_task_list::head"] [:: std :: mem :: offset_of ! (starpu_task_list , head) - 0usize] ; ["Offset of field: starpu_task_list::tail"] [:: std :: mem :: offset_of ! (starpu_task_list , tail) - 8usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize a list structure.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } unsafe extern "C" { # [doc = "Push \\p task at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Push \\p task at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Get the front of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the back of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test if \\p list is empty.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Remove \\p task from \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Remove the element at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Remove the element at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the first task of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the end of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Move list from one head \\p lsrc to another \\p ldst.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } unsafe 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\n- ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n
- ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n
- ::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
- ::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
- 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
\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.\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Identical to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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\ntask->dyn_handles array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating task->dyn_handles 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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().\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [doc = "Structure to be used for starpu_codelet_pack_arg_init() & co, and\nstarpu_codelet_unpack_arg_init() & co. The contents is public,\nhowever users should not directly access it, but only use as a\nparameter to the appropriate functions."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub arg_buffer_used : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet_pack_arg_data"] [:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () - 40usize] ; ["Alignment of starpu_codelet_pack_arg_data"] [:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer) - 0usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_size"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_size) - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_used"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_used) - 16usize] ; ["Offset of field: starpu_codelet_pack_arg_data::current_offset"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , current_offset) - 24usize] ; ["Offset of field: starpu_codelet_pack_arg_data::nargs"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , nargs) - 32usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } unsafe extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times.\nSee \\ref InsertTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } unsafe extern "C" { # [doc = "Initialize \\p state with \\p cl_arg and \\p cl_arg_size. This has to\nbe called before calling starpu_codelet_unpack_arg().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_init (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut :: std :: os :: raw :: c_void , cl_arg_size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of size \\p size from \\p state into \\p ptr with a copy.\n\\p state has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr\nwith a copy. \\p ptr is allocated before copying in it the value of\nthe argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_dup_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr.\n\\p ptr will be a pointer to the memory of the argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pick_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Finish unpacking data, after calling starpu_codelet_unpack_arg_init()\nonce and starpu_codelet_unpack_arg() or starpu_codelet_dup_arg() or\nstarpu_codelet_pick_arg() several times.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_fini (state : * mut starpu_codelet_pack_arg_data) ; } unsafe extern "C" { # [doc = "Call this function during unpacking to skip saving the argument in ptr.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_discard_arg (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] 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\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here given the task
\n- starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here gives back the task to the core. It must not\naccess this task any more
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- 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.
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n\nNote: to get an estimation of the task duration, \\p perf_workerid\nneeds to be used rather than \\p workerid, for the case of parallel\ntasks."] 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 NULL, 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 = "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 = " Whether this scheduling policy does data prefetching, and thus the\ncore should not try to do it opportunistically."] pub prefetches : :: std :: os :: raw :: c_int , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_policy"] [:: std :: mem :: size_of :: < starpu_sched_policy > () - 128usize] ; ["Alignment of starpu_sched_policy"] [:: std :: mem :: align_of :: < starpu_sched_policy > () - 8usize] ; ["Offset of field: starpu_sched_policy::init_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , init_sched) - 0usize] ; ["Offset of field: starpu_sched_policy::deinit_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , deinit_sched) - 8usize] ; ["Offset of field: starpu_sched_policy::push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task) - 16usize] ; ["Offset of field: starpu_sched_policy::simulate_push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , simulate_push_task) - 24usize] ; ["Offset of field: starpu_sched_policy::push_task_notify"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task_notify) - 32usize] ; ["Offset of field: starpu_sched_policy::pop_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pop_task) - 40usize] ; ["Offset of field: starpu_sched_policy::submit_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , submit_hook) - 48usize] ; ["Offset of field: starpu_sched_policy::pre_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pre_exec_hook) - 56usize] ; ["Offset of field: starpu_sched_policy::post_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , post_exec_hook) - 64usize] ; ["Offset of field: starpu_sched_policy::do_schedule"] [:: std :: mem :: offset_of ! (starpu_sched_policy , do_schedule) - 72usize] ; ["Offset of field: starpu_sched_policy::add_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , add_workers) - 80usize] ; ["Offset of field: starpu_sched_policy::remove_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , remove_workers) - 88usize] ; ["Offset of field: starpu_sched_policy::prefetches"] [:: std :: mem :: offset_of ! (starpu_sched_policy , prefetches) - 96usize] ; ["Offset of field: starpu_sched_policy::policy_name"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_name) - 104usize] ; ["Offset of field: starpu_sched_policy::policy_description"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_description) - 112usize] ; ["Offset of field: starpu_sched_policy::worker_type"] [:: std :: mem :: offset_of ! (starpu_sched_policy , worker_type) - 120usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Return an NULL-terminated array of all the predefined\nscheduling policies.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a scheduling policy to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policy (name : * const :: std :: os :: raw :: c_char) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a list of scheduling policies to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the default context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the given context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy () -> * mut starpu_sched_policy ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the job identifier associated with the task.\nSee \\ref TraceSchedTaskDetails for more details."] pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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 impl_mask == NULL to check for at\nleast one implementation without determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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\nimpl_mask == NULL to check for at least one implementation\nwithout determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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. \\p back is ignored: the task priority is\nused to order tasks in this queue.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions.\nSee \\ref PerformanceModelExample for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions).\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds on a given architecture \\p arch using given implementation \\p nimpl.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_length() but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_length (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the durations using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the durations.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } unsafe extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return expected energy use in J.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_energy but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_energy (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task energy use in J, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the energy uses using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the energy uses.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only).\nSee \\ref SchedulingHelpers for more details."] 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) > ; unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "The scheduling policy should call this when it makes a scheduling decision\nfor a task. This will possibly stop execution at this point, and then the\nprogrammer can inspect local variables etc. to determine why this scheduling\ndecision was done.\n\nSee \\ref STARPU_TASK_BREAK_ON_SCHED\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_task_break (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n- ::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
\n- ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n
\n- ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n
\n- ::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
\n
\nSee \\ref CreatingAContext for more details."] 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto.\nSee \\ref SubmittingTasksToAContext and \\ref TmpCTXS for more details."] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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.\nSee \\ref EmptyingAContext for more details."] pub fn starpu_sched_ctx_stop_task_submission () ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the function associated with the scheduler context \\p\nsched_ctx_id which was given through the field\nstarpu_conf::sched_policy_callback"] pub fn starpu_sched_ctx_get_sched_policy_callback (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; unsafe extern "C" { # [doc = "Initialize HIPBLAS on every HIPdevice. The\nHIPBLAS library must be initialized prior to any HIPBLAS call. Calling\nstarpu_hipblas_init() will initialize HIPBLAS on every HIP device\ncontrolled by StarPU. This call blocks until HIPBLAS has been properly\ninitialized on every device."] pub fn starpu_hipblas_init () ; } pub type hipblasHandle_t = * mut :: std :: os :: raw :: c_void ; unsafe extern "C" { # [doc = "Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It\nis properly initialized and configured for multistream by\nstarpu_hipblas_init()."] pub fn starpu_hipblas_get_local_handle () -> hipblasHandle_t ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the HIPBLAS library on\nevery HIP device."] pub fn starpu_hipblas_shutdown () ; } unsafe 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. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_init () ; } unsafe 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().\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_set_stream () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device.\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_shutdown () ; } unsafe extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_init () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_shutdown () ; } unsafe extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Stop recording tasks\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_stop () ; } unsafe extern "C" { # [doc = "Emit the DAG that was recorded on \\p output.\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } unsafe 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. \\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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_lp (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_mps (output : * mut FILE) ; } unsafe 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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a pointer value seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_ptr (input : * mut :: std :: os :: raw :: c_void , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc current\nstate. The return value should be considered as the new current\nstate for future CRC computation. This is used for computing data\nsize footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] 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 , # [doc = " PAPI Events"] pub papi_values : [:: std :: os :: raw :: c_longlong ; 15usize] , pub papi_event_set : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_task_info"] [:: std :: mem :: size_of :: < starpu_profiling_task_info > () - 368usize] ; ["Alignment of starpu_profiling_task_info"] [:: std :: mem :: align_of :: < starpu_profiling_task_info > () - 8usize] ; ["Offset of field: starpu_profiling_task_info::submit_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , submit_time) - 0usize] ; ["Offset of field: starpu_profiling_task_info::push_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_start_time) - 16usize] ; ["Offset of field: starpu_profiling_task_info::push_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_end_time) - 32usize] ; ["Offset of field: starpu_profiling_task_info::pop_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_start_time) - 48usize] ; ["Offset of field: starpu_profiling_task_info::pop_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_end_time) - 64usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_start_time) - 80usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_end_time) - 96usize] ; ["Offset of field: starpu_profiling_task_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , start_time) - 112usize] ; ["Offset of field: starpu_profiling_task_info::end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , end_time) - 128usize] ; ["Offset of field: starpu_profiling_task_info::release_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_start_time) - 144usize] ; ["Offset of field: starpu_profiling_task_info::release_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_end_time) - 160usize] ; ["Offset of field: starpu_profiling_task_info::callback_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_start_time) - 176usize] ; ["Offset of field: starpu_profiling_task_info::callback_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_end_time) - 192usize] ; ["Offset of field: starpu_profiling_task_info::workerid"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , workerid) - 208usize] ; ["Offset of field: starpu_profiling_task_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , used_cycles) - 216usize] ; ["Offset of field: starpu_profiling_task_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , stall_cycles) - 224usize] ; ["Offset of field: starpu_profiling_task_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , energy_consumed) - 232usize] ; ["Offset of field: starpu_profiling_task_info::papi_values"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_values) - 240usize] ; ["Offset of field: starpu_profiling_task_info::papi_event_set"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_event_set) - 360usize] ; } ; 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: {:?}, papi_values: {:?}, papi_event_set: {:?} }}" , self . workerid , self . energy_consumed , self . papi_values , self . papi_event_set) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info().\n\nThe executing_time, callback_time, waiting_time, sleeping_time, and\nscheduling_time are exclusive to each other, i.e. they can be added up, their\nsum is smaller than total_time. The difference between total_time and the sum\nis the uncategorized runtime overhead."] # [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 by the worker to execute callbacks, while not executing a\n task, during the profiling measurement interval."] pub callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish,\n while not executing a task or a callback, during the profiling\n measurement interval."] pub waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available, and\n not executing a task or a callback or waiting for a data transfer to\n finish, during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks, while not executing a\n task or a callback or waiting for a data transfer to finish, and there\n are tasks to be scheduled, during the profiling measurement interval."] pub scheduling_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval.\n Normally always equal to executing_time."] pub all_executing_time : timespec , # [doc = " Time spent by the worker to execute callbacks during the profiling measurement interval.\n Normally always greater than callback_time."] pub all_callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval.\n Normally always greater than waiting_time."] pub all_waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available during the profiling measurement interval.\n Normally always greater than sleeping_time."] pub all_sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks during the profiling measurement interval.\n Normally always greater than scheduling_time."] pub all_scheduling_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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_worker_info"] [:: std :: mem :: size_of :: < starpu_profiling_worker_info > () - 232usize] ; ["Alignment of starpu_profiling_worker_info"] [:: std :: mem :: align_of :: < starpu_profiling_worker_info > () - 8usize] ; ["Offset of field: starpu_profiling_worker_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_worker_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_worker_info::executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executing_time) - 32usize] ; ["Offset of field: starpu_profiling_worker_info::callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , callback_time) - 48usize] ; ["Offset of field: starpu_profiling_worker_info::waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , waiting_time) - 64usize] ; ["Offset of field: starpu_profiling_worker_info::sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , sleeping_time) - 80usize] ; ["Offset of field: starpu_profiling_worker_info::scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , scheduling_time) - 96usize] ; ["Offset of field: starpu_profiling_worker_info::all_executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_executing_time) - 112usize] ; ["Offset of field: starpu_profiling_worker_info::all_callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_callback_time) - 128usize] ; ["Offset of field: starpu_profiling_worker_info::all_waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_waiting_time) - 144usize] ; ["Offset of field: starpu_profiling_worker_info::all_sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_sleeping_time) - 160usize] ; ["Offset of field: starpu_profiling_worker_info::all_scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_scheduling_time) - 176usize] ; ["Offset of field: starpu_profiling_worker_info::executed_tasks"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executed_tasks) - 192usize] ; ["Offset of field: starpu_profiling_worker_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , used_cycles) - 200usize] ; ["Offset of field: starpu_profiling_worker_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , stall_cycles) - 208usize] ; ["Offset of field: starpu_profiling_worker_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , energy_consumed) - 216usize] ; ["Offset of field: starpu_profiling_worker_info::flops"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , flops) - 224usize] ; } ; 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) } } # [doc = "todo"] # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_bus_info"] [:: std :: mem :: size_of :: < starpu_profiling_bus_info > () - 48usize] ; ["Alignment of starpu_profiling_bus_info"] [:: std :: mem :: align_of :: < starpu_profiling_bus_info > () - 8usize] ; ["Offset of field: starpu_profiling_bus_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_bus_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_bus_info::transferred_bytes"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transferred_bytes) - 32usize] ; ["Offset of field: starpu_profiling_bus_info::transfer_count"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transfer_count) - 40usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_init () ; } unsafe extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init().\nSee \\ref TraceMpi for more details."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } unsafe 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 NULL, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned.\nSee \\ref Per-workerFeedback for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of buses in the machine.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the source point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the destination point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref FeedBackFigures for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } unsafe extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_bus_helper_display_summary () ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_worker_helper_display_summary () ; } unsafe 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).\nSee \\ref MemoryFeedback for more details."] pub fn starpu_data_display_memory_stats () ; } pub const starpu_prof_tool_event_none : starpu_prof_tool_event = 0 ; pub const starpu_prof_tool_event_init : starpu_prof_tool_event = 1 ; pub const starpu_prof_tool_event_terminate : starpu_prof_tool_event = 2 ; pub const starpu_prof_tool_event_init_begin : starpu_prof_tool_event = 3 ; pub const starpu_prof_tool_event_init_end : starpu_prof_tool_event = 4 ; pub const starpu_prof_tool_event_driver_init : starpu_prof_tool_event = 5 ; pub const starpu_prof_tool_event_driver_deinit : starpu_prof_tool_event = 6 ; pub const starpu_prof_tool_event_driver_init_start : starpu_prof_tool_event = 7 ; pub const starpu_prof_tool_event_driver_init_end : starpu_prof_tool_event = 8 ; pub const starpu_prof_tool_event_start_cpu_exec : starpu_prof_tool_event = 9 ; pub const starpu_prof_tool_event_end_cpu_exec : starpu_prof_tool_event = 10 ; pub const starpu_prof_tool_event_start_gpu_exec : starpu_prof_tool_event = 11 ; pub const starpu_prof_tool_event_end_gpu_exec : starpu_prof_tool_event = 12 ; pub const starpu_prof_tool_event_start_transfer : starpu_prof_tool_event = 13 ; pub const starpu_prof_tool_event_end_transfer : starpu_prof_tool_event = 14 ; pub const starpu_prof_tool_event_user_start : starpu_prof_tool_event = 15 ; pub const starpu_prof_tool_event_user_end : starpu_prof_tool_event = 16 ; # [doc = "Event type"] pub type starpu_prof_tool_event = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_driver_cpu : starpu_prof_tool_driver_type = 0 ; pub const starpu_prof_tool_driver_gpu : starpu_prof_tool_driver_type = 1 ; pub const starpu_prof_tool_driver_hip : starpu_prof_tool_driver_type = 2 ; pub const starpu_prof_tool_driver_ocl : starpu_prof_tool_driver_type = 3 ; # [doc = "todo"] pub type starpu_prof_tool_driver_type = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_command_reg : starpu_prof_tool_command = 0 ; pub const starpu_prof_tool_command_toggle : starpu_prof_tool_command = 1 ; pub const starpu_prof_tool_command_toggle_per_thread : starpu_prof_tool_command = 2 ; # [doc = "todo"] pub type starpu_prof_tool_command = :: std :: os :: raw :: c_uint ; # [doc = "General information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_prof_tool_info { pub conf : * mut starpu_conf , pub event_type : starpu_prof_tool_event , pub starpu_version : [:: std :: os :: raw :: c_uint ; 3usize] , pub thread_id : :: std :: os :: raw :: c_int , pub worker_id : :: std :: os :: raw :: c_int , pub device_number : :: std :: os :: raw :: c_int , pub driver_type : starpu_prof_tool_driver_type , pub memnode : :: std :: os :: raw :: c_uint , pub bytes_to_transfer : :: std :: os :: raw :: c_uint , pub bytes_transfered : :: std :: os :: raw :: c_uint , pub fun_ptr : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_info > () - 64usize] ; ["Alignment of starpu_prof_tool_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_info > () - 8usize] ; ["Offset of field: starpu_prof_tool_info::conf"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , conf) - 0usize] ; ["Offset of field: starpu_prof_tool_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , event_type) - 8usize] ; ["Offset of field: starpu_prof_tool_info::starpu_version"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , starpu_version) - 12usize] ; ["Offset of field: starpu_prof_tool_info::thread_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , thread_id) - 24usize] ; ["Offset of field: starpu_prof_tool_info::worker_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , worker_id) - 28usize] ; ["Offset of field: starpu_prof_tool_info::device_number"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , device_number) - 32usize] ; ["Offset of field: starpu_prof_tool_info::driver_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , driver_type) - 36usize] ; ["Offset of field: starpu_prof_tool_info::memnode"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , memnode) - 40usize] ; ["Offset of field: starpu_prof_tool_info::bytes_to_transfer"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_to_transfer) - 44usize] ; ["Offset of field: starpu_prof_tool_info::bytes_transfered"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_transfered) - 48usize] ; ["Offset of field: starpu_prof_tool_info::fun_ptr"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , fun_ptr) - 56usize] ; } ; impl Default for starpu_prof_tool_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 () } } } # [doc = "Event info"] # [repr (C)] # [derive (Copy , Clone)] pub union starpu_prof_tool_event_info { pub event_type : starpu_prof_tool_event , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_event_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Alignment of starpu_prof_tool_event_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Offset of field: starpu_prof_tool_event_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_event_info , event_type) - 0usize] ; } ; impl Default for starpu_prof_tool_event_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_prof_tool_event_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_prof_tool_event_info {{ union }}") } } # [doc = "API info"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_prof_tool_api_info { } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_api_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_api_info > () - 0usize] ; ["Alignment of starpu_prof_tool_api_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_api_info > () - 1usize] ; } ; pub type starpu_prof_tool_cb_func = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_prof_tool_info , arg2 : * mut starpu_prof_tool_event_info , arg3 : * mut starpu_prof_tool_api_info) > ; # [doc = "Register / unregister events"] pub type starpu_prof_tool_entry_register_func = :: std :: option :: Option < unsafe extern "C" fn (event_type : starpu_prof_tool_event , cb : starpu_prof_tool_cb_func , info : starpu_prof_tool_command) > ; # [doc = "A function with this signature must be implemented by external tools that want to use the callbacks"] pub type starpu_prof_tool_entry_func = :: std :: option :: Option < unsafe extern "C" fn (reg : starpu_prof_tool_entry_register_func , unreg : starpu_prof_tool_entry_register_func) > ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 2048usize] , 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_codelet_event"] [:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () - 2328usize] ; ["Alignment of starpu_fxt_codelet_event"] [:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () - 8usize] ; ["Offset of field: starpu_fxt_codelet_event::symbol"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , symbol) - 0usize] ; ["Offset of field: starpu_fxt_codelet_event::workerid"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , workerid) - 2048usize] ; ["Offset of field: starpu_fxt_codelet_event::perfmodel_archname"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , perfmodel_archname) - 2052usize] ; ["Offset of field: starpu_fxt_codelet_event::hash"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , hash) - 2308usize] ; ["Offset of field: starpu_fxt_codelet_event::size"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , size) - 2312usize] ; ["Offset of field: starpu_fxt_codelet_event::time"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , time) - 2320usize] ; } ; 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 () } } } # [doc = "Store information related to clock synchronizations: mainly the offset to apply to each time."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_fxt_mpi_offset { # [doc = "< node time for the barrier at the beginning of the program"] pub local_time_start : u64 , # [doc = "< offset to apply to node time, computed at the beginning of the program"] pub offset_start : i64 , # [doc = "< node time for the barrier at the end of the program (optional)"] pub local_time_end : u64 , # [doc = "< offset to apply to node time, computed at the end of the program (optional)"] pub offset_end : i64 , # [doc = "< number of barriers to synchronize clocks during the execution of the program\n(can be 0, 1 or 2)"] pub nb_barriers : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_mpi_offset"] [:: std :: mem :: size_of :: < starpu_fxt_mpi_offset > () - 40usize] ; ["Alignment of starpu_fxt_mpi_offset"] [:: std :: mem :: align_of :: < starpu_fxt_mpi_offset > () - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_start) - 0usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_start) - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_end) - 16usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_end) - 24usize] ; ["Offset of field: starpu_fxt_mpi_offset::nb_barriers"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , nb_barriers) - 32usize] ; } ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 sched_tasks_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 papi_path : * mut :: std :: os :: raw :: c_char , pub comms_path : * mut :: std :: os :: raw :: c_char , pub number_events_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 , pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 48usize] , pub nworkers : :: std :: os :: raw :: c_int , pub worker_archtypes : [starpu_perfmodel_arch ; 48usize] , # [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 synchronize clocks and apply an offset."] pub file_offset : starpu_fxt_mpi_offset , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), this variable stores the MPI rank of the trace file."] pub file_rank : :: 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, number\nof dumped codelets."] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_options"] [:: std :: mem :: size_of :: < starpu_fxt_options > () - 13800usize] ; ["Alignment of starpu_fxt_options"] [:: std :: mem :: align_of :: < starpu_fxt_options > () - 8usize] ; ["Offset of field: starpu_fxt_options::per_task_colour"] [:: std :: mem :: offset_of ! (starpu_fxt_options , per_task_colour) - 0usize] ; ["Offset of field: starpu_fxt_options::no_events"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_events) - 4usize] ; ["Offset of field: starpu_fxt_options::no_counter"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_counter) - 8usize] ; ["Offset of field: starpu_fxt_options::no_bus"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_bus) - 12usize] ; ["Offset of field: starpu_fxt_options::no_flops"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_flops) - 16usize] ; ["Offset of field: starpu_fxt_options::ninputfiles"] [:: std :: mem :: offset_of ! (starpu_fxt_options , ninputfiles) - 20usize] ; ["Offset of field: starpu_fxt_options::no_smooth"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_smooth) - 24usize] ; ["Offset of field: starpu_fxt_options::no_acquire"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_acquire) - 28usize] ; ["Offset of field: starpu_fxt_options::memory_states"] [:: std :: mem :: offset_of ! (starpu_fxt_options , memory_states) - 32usize] ; ["Offset of field: starpu_fxt_options::internal"] [:: std :: mem :: offset_of ! (starpu_fxt_options , internal) - 36usize] ; ["Offset of field: starpu_fxt_options::label_deps"] [:: std :: mem :: offset_of ! (starpu_fxt_options , label_deps) - 40usize] ; ["Offset of field: starpu_fxt_options::filenames"] [:: std :: mem :: offset_of ! (starpu_fxt_options , filenames) - 48usize] ; ["Offset of field: starpu_fxt_options::out_paje_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , out_paje_path) - 560usize] ; ["Offset of field: starpu_fxt_options::distrib_time_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , distrib_time_path) - 568usize] ; ["Offset of field: starpu_fxt_options::activity_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , activity_path) - 576usize] ; ["Offset of field: starpu_fxt_options::sched_tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , sched_tasks_path) - 584usize] ; ["Offset of field: starpu_fxt_options::dag_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dag_path) - 592usize] ; ["Offset of field: starpu_fxt_options::tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , tasks_path) - 600usize] ; ["Offset of field: starpu_fxt_options::data_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , data_path) - 608usize] ; ["Offset of field: starpu_fxt_options::papi_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , papi_path) - 616usize] ; ["Offset of field: starpu_fxt_options::comms_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , comms_path) - 624usize] ; ["Offset of field: starpu_fxt_options::number_events_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , number_events_path) - 632usize] ; ["Offset of field: starpu_fxt_options::anim_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , anim_path) - 640usize] ; ["Offset of field: starpu_fxt_options::states_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , states_path) - 648usize] ; ["Offset of field: starpu_fxt_options::dir"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dir) - 656usize] ; ["Offset of field: starpu_fxt_options::worker_names"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_names) - 664usize] ; ["Offset of field: starpu_fxt_options::nworkers"] [:: std :: mem :: offset_of ! (starpu_fxt_options , nworkers) - 12952usize] ; ["Offset of field: starpu_fxt_options::worker_archtypes"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_archtypes) - 12960usize] ; ["Offset of field: starpu_fxt_options::file_prefix"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_prefix) - 13728usize] ; ["Offset of field: starpu_fxt_options::file_offset"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_offset) - 13736usize] ; ["Offset of field: starpu_fxt_options::file_rank"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_rank) - 13776usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets) - 13784usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets_count"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets_count) - 13792usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } unsafe 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.\nThis function has to be called before starpu_init().\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_start_profiling () ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_stop_profiling () ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace_in_dir (filename_in : * mut :: std :: os :: raw :: c_char , dir : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } unsafe extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Pre-initialize drivers\nSo as to register information on device types, memory types, etc.\nOnly use internally by StarPU."] pub fn starpu_drivers_preinit () ; } # [doc = "structure for designating a given driver. See \\ref UsingTheDriverAPI for more details."] # [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 hip_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver__bindgen_ty_1"] [:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Alignment of starpu_driver__bindgen_ty_1"] [:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cpu_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cpu_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cuda_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cuda_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::hip_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , hip_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::opencl_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , opencl_id) - 0usize] ; } ; 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 }}") } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver"] [:: std :: mem :: size_of :: < starpu_driver > () - 16usize] ; ["Alignment of starpu_driver"] [:: std :: mem :: align_of :: < starpu_driver > () - 8usize] ; ["Offset of field: starpu_driver::type_"] [:: std :: mem :: offset_of ! (starpu_driver , type_) - 0usize] ; ["Offset of field: starpu_driver::id"] [:: std :: mem :: offset_of ! (starpu_driver , id) - 8usize] ; } ; 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) } } unsafe 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-EINVAL 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().\n\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Notify all running drivers that they should terminate.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_drivers_request_termination () ; } unsafe extern "C" { # [doc = "Initialize the given driver. Return 0 on success, -EINVAL\nif starpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Run the driver once, then return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tree"] [:: std :: mem :: size_of :: < starpu_tree > () - 32usize] ; ["Alignment of starpu_tree"] [:: std :: mem :: align_of :: < starpu_tree > () - 8usize] ; ["Offset of field: starpu_tree::nodes"] [:: std :: mem :: offset_of ! (starpu_tree , nodes) - 0usize] ; ["Offset of field: starpu_tree::father"] [:: std :: mem :: offset_of ! (starpu_tree , father) - 8usize] ; ["Offset of field: starpu_tree::arity"] [:: std :: mem :: offset_of ! (starpu_tree , arity) - 16usize] ; ["Offset of field: starpu_tree::id"] [:: std :: mem :: offset_of ! (starpu_tree , id) - 20usize] ; ["Offset of field: starpu_tree::level"] [:: std :: mem :: offset_of ! (starpu_tree , level) - 24usize] ; ["Offset of field: starpu_tree::is_pu"] [:: std :: mem :: offset_of ! (starpu_tree , is_pu) - 28usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } unsafe 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 ; } unsafe 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)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_lock_t > () - 8usize] ; ["Alignment of starpu_omp_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_lock_t , internal) - 0usize] ; } ; 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)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_nest_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Alignment of starpu_omp_nest_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_nest_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_nest_lock_t , internal) - 0usize] ; } ; 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 chosen 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)] 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 pragma omp parallel 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_parallel_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () - 872usize] ; ["Alignment of starpu_omp_parallel_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_parallel_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_parallel_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , if_clause) - 860usize] ; ["Offset of field: starpu_omp_parallel_region_attr::num_threads"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , num_threads) - 864usize] ; } ; 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)] 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 pragma omp task is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding pragma omp task is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding pragma omp task is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding pragma omp task 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_task_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () - 936usize] ; ["Alignment of starpu_omp_task_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_task_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_task_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_task_region_attr::priority"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , priority) - 860usize] ; ["Offset of field: starpu_omp_task_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , if_clause) - 864usize] ; ["Offset of field: starpu_omp_task_region_attr::final_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , final_clause) - 868usize] ; ["Offset of field: starpu_omp_task_region_attr::untied_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , untied_clause) - 872usize] ; ["Offset of field: starpu_omp_task_region_attr::mergeable_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , mergeable_clause) - 876usize] ; ["Offset of field: starpu_omp_task_region_attr::is_loop"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , is_loop) - 880usize] ; ["Offset of field: starpu_omp_task_region_attr::nogroup_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nogroup_clause) - 884usize] ; ["Offset of field: starpu_omp_task_region_attr::collapse"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , collapse) - 888usize] ; ["Offset of field: starpu_omp_task_region_attr::num_tasks"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , num_tasks) - 892usize] ; ["Offset of field: starpu_omp_task_region_attr::nb_iterations"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nb_iterations) - 896usize] ; ["Offset of field: starpu_omp_task_region_attr::grainsize"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , grainsize) - 904usize] ; ["Offset of field: starpu_omp_task_region_attr::begin_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , begin_i) - 912usize] ; ["Offset of field: starpu_omp_task_region_attr::end_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , end_i) - 920usize] ; ["Offset of field: starpu_omp_task_region_attr::chunk"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , chunk) - 928usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_shutdown () ; } unsafe 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 \\#pragma omp parallel.\nSee \\ref OMPParallel for more details."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } unsafe 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 \\#pragma omp master.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp master without code\noutlining.\n\\return !0 if called by the region's master thread.\n\\return 0 if not called by the region's master thread.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp barrier.\nSee \\ref OMPBarrier for more details."] pub fn starpu_omp_barrier () ; } unsafe 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 name == NULL, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement \\#pragma omp\ncritical.\n\nSee \\ref OMPCritical for more details."] 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) ; } unsafe 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 name == NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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\nname==NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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(nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp single.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single without code\noutlining.\n\\return !0 if the calling thread has won the election.\n\\return 0 if the calling thread has lost the election.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp single 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\n\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and NULL for\nthe task that won the election. This function can be used to implement\n\\#pragma omp single with a copyprivate clause without code outlining.\n\nReturn the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\nReturn NULL 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\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_end () ; } unsafe 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 \\#pragma omp for 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(ordered==!0) or not (ordered==0). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(nowait==0) or not (nowait==!0).\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 \\#pragma omp for.\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for.\n\n\\sa starpu_omp_for\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp ordered.\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_begin () ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_end () ; } unsafe 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 (nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp sections and \\#pragma omp section.\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp sections and \\#pragma omp section.\n\n\\sa starpu_omp_sections\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp task.\n\nSee \\ref OMPTaskExplicit for more details."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } unsafe 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 \\#pragma omp taskwait.\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskwait () ; } unsafe 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 \\#pragma omp taskgroup.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] 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) ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_begin () ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_end () ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return !0 if called from a parallel region scope.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return !0 if dynamic thread number adjustment is enabled.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_dynamic\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return !0 if nested parallel sections are enabled.\n\\return 0 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the state of the cancel ICVS var.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } unsafe 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 information such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } unsafe 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 1 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return !0 if called from a final task.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } unsafe extern "C" { # [doc = "Return the number of places available to the execution environment in the place list.\n\n\\return the number of places available to the execution environment in the place list.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of processors available to the execution environment in the specified place.\n\n\\return the number of processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the numerical identifiers of the processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the place number of the place to which the encountering thread is bound.\n\n\\return the place number of the place to which the encountering thread is bound.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of places in the place partition of the innermost implicit task.\n\n\\return the number of places in the place partition of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current device is the initial device or not.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a device number that represents the host device.\n\n\\return a device number that represents the host device.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return !0 if called from the host device.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } unsafe extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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 !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 () ; } unsafe 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 () ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtime () -> f64 ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtick () -> f64 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Only use internally by StarPU."] pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } unsafe extern "C" { # [doc = "Register a handle for ptr->handle data lookup.\n\n\\sa starpu_omp_handle_unregister\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_register (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Unregister a handle from ptr->handle data lookup.\n\n\\sa starpu_omp_handle_register\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_unregister (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer.\n\n\\return the handle or \\c NULL if not found.\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_bitmap { pub bits : [:: std :: os :: raw :: c_ulong ; 1usize] , pub cardinal : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bitmap"] [:: std :: mem :: size_of :: < starpu_bitmap > () - 16usize] ; ["Alignment of starpu_bitmap"] [:: std :: mem :: align_of :: < starpu_bitmap > () - 8usize] ; ["Offset of field: starpu_bitmap::bits"] [:: std :: mem :: offset_of ! (starpu_bitmap , bits) - 0usize] ; ["Offset of field: starpu_bitmap::cardinal"] [:: std :: mem :: offset_of ! (starpu_bitmap , cardinal) - 8usize] ; } ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_OPENMP : starpu_parallel_worker_types = 0 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_INTEL_OPENMP_MKL : starpu_parallel_worker_types = 1 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_GNU_OPENMP_MKL : starpu_parallel_worker_types = 2 ; # [doc = "These represent the default available functions to enforce parallel_worker\nuse by the sub-runtime"] pub type starpu_parallel_worker_types = :: std :: os :: raw :: c_uint ; # [doc = "Parallel_Worker configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_parallel_worker_config { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Create parallel_workers on the machine with the given parameters.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_init (parallel_worker_level : hwloc_obj_type_t , ...) -> * mut starpu_parallel_worker_config ; } unsafe extern "C" { # [doc = "Delete the given parallel_workers configuration"] pub fn starpu_parallel_worker_shutdown (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print the given parallel_workers configuration.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_print (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " Prologue functions"] pub fn starpu_parallel_worker_openmp_prologue (arg1 : * mut :: std :: os :: raw :: c_void) ; } # [doc = "< deprecated"] pub const STARPU_CLUSTER_OPENMP : starpu_cluster_types = 0 ; # [doc = "< deprecated"] pub const STARPU_CLUSTER_INTEL_OPENMP_MKL : starpu_cluster_types = 1 ; # [doc = "@deprecated Use ::starpu_parallel_worker_types"] pub type starpu_cluster_types = :: std :: os :: raw :: c_uint ; # [doc = " @deprecated Use starpu_parallel_worker_config"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_cluster_machine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_init()"] pub fn starpu_cluster_machine (cluster_level : hwloc_obj_type_t , ...) -> * mut starpu_cluster_machine ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_shutdown()"] pub fn starpu_uncluster_machine (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_print()"] pub fn starpu_cluster_print (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } # [doc = "< undefined scope"] pub const starpu_perf_counter_scope_undefined : starpu_perf_counter_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_counter_scope_global : starpu_perf_counter_scope = 2 ; # [doc = "< per-worker scope"] pub const starpu_perf_counter_scope_per_worker : starpu_perf_counter_scope = 4 ; # [doc = "< per-codelet scope"] pub const starpu_perf_counter_scope_per_codelet : starpu_perf_counter_scope = 6 ; # [doc = "Enum of all possible performance counter scopes."] pub type starpu_perf_counter_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_counter_type_undefined : starpu_perf_counter_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_counter_type_int32 : starpu_perf_counter_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_counter_type_int64 : starpu_perf_counter_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_counter_type_float : starpu_perf_counter_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_counter_type_double : starpu_perf_counter_type = 4 ; # [doc = "Enum of all possible performance counter value type."] pub type starpu_perf_counter_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_listener { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_sample { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_set { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Start collecting performance counter values."] pub fn starpu_perf_counter_collection_start () ; } unsafe extern "C" { # [doc = "Stop collecting performance counter values."] pub fn starpu_perf_counter_collection_stop () ; } unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_counter_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_counter_scope_id_to_name (scope : starpu_perf_counter_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_counter_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_counter_type_id_to_name (type_ : starpu_perf_counter_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance counters for the given scope."] pub fn starpu_perf_counter_nb (scope : starpu_perf_counter_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter name to its id."] pub fn starpu_perf_counter_name_to_id (scope : starpu_perf_counter_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter rank in its scope to its counter id."] pub fn starpu_perf_counter_nth_to_id (scope : starpu_perf_counter_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a counter id to its name constant string."] pub fn starpu_perf_counter_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the counter's type id."] pub fn starpu_perf_counter_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the counter's help string."] pub fn starpu_perf_counter_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of counters defined in the given scope."] pub fn starpu_perf_counter_list_avail (scope : starpu_perf_counter_scope) ; } unsafe extern "C" { # [doc = "Display the list of counters defined in all scopes."] pub fn starpu_perf_counter_list_all_avail () ; } unsafe extern "C" { # [doc = "Allocate a new performance counter set."] pub fn starpu_perf_counter_set_alloc (scope : starpu_perf_counter_scope) -> * mut starpu_perf_counter_set ; } unsafe extern "C" { # [doc = "Free a performance counter set."] pub fn starpu_perf_counter_set_free (set : * mut starpu_perf_counter_set) ; } unsafe extern "C" { # [doc = "Enable a given counter in the set."] pub fn starpu_perf_counter_set_enable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Disable a given counter in the set."] pub fn starpu_perf_counter_set_disable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Initialize a new performance counter listener."] pub fn starpu_perf_counter_listener_init (set : * mut starpu_perf_counter_set , callback : :: std :: option :: Option < unsafe extern "C" fn (listener : * mut starpu_perf_counter_listener , sample : * mut starpu_perf_counter_sample , context : * mut :: std :: os :: raw :: c_void) > , user_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_perf_counter_listener ; } unsafe extern "C" { # [doc = "End a performance counter listener."] pub fn starpu_perf_counter_listener_exit (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the global scope."] pub fn starpu_perf_counter_set_global_listener (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the per_worker scope on a given worker."] pub fn starpu_perf_counter_set_per_worker_listener (workerid : :: std :: os :: raw :: c_uint , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a common listener for all workers."] pub fn starpu_perf_counter_set_all_per_worker_listeners (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a per_codelet listener for a codelet."] pub fn starpu_perf_counter_set_per_codelet_listener (cl : * mut starpu_codelet , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Unset the global listener."] pub fn starpu_perf_counter_unset_global_listener () ; } unsafe extern "C" { # [doc = "Unset the per_worker listener."] pub fn starpu_perf_counter_unset_per_worker_listener (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Unset all per_worker listeners."] pub fn starpu_perf_counter_unset_all_per_worker_listeners () ; } unsafe extern "C" { # [doc = "Unset a per_codelet listener."] pub fn starpu_perf_counter_unset_per_codelet_listener (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Read an int32 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int32_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Read an int64 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int64_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Read a float counter value from a sample."] pub fn starpu_perf_counter_sample_get_float_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Read a double counter value from a sample."] pub fn starpu_perf_counter_sample_get_double_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f64 ; } # [doc = "< undefined scope"] pub const starpu_perf_knob_scope_undefined : starpu_perf_knob_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_knob_scope_global : starpu_perf_knob_scope = 1 ; # [doc = "< per-worker scope"] pub const starpu_perf_knob_scope_per_worker : starpu_perf_knob_scope = 3 ; # [doc = "< per-scheduler scope"] pub const starpu_perf_knob_scope_per_scheduler : starpu_perf_knob_scope = 5 ; # [doc = "Enum of all possible performance knob scopes."] pub type starpu_perf_knob_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_knob_type_undefined : starpu_perf_knob_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_knob_type_int32 : starpu_perf_knob_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_knob_type_int64 : starpu_perf_knob_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_knob_type_float : starpu_perf_knob_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_knob_type_double : starpu_perf_knob_type = 4 ; # [doc = "Enum of all possible performance knob value type."] pub type starpu_perf_knob_type = :: std :: os :: raw :: c_uint ; unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_knob_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_knob_scope_id_to_name (scope : starpu_perf_knob_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_knob_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_knob_type_id_to_name (type_ : starpu_perf_knob_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance steering knobs for the given scope."] pub fn starpu_perf_knob_nb (scope : starpu_perf_knob_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_name_to_id (scope : starpu_perf_knob_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_nth_to_id (scope : starpu_perf_knob_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob rank in its scope to its knob id."] pub fn starpu_perf_knob_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate a knob id to its name constant string."] pub fn starpu_perf_knob_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the knob's help string."] pub fn starpu_perf_knob_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in the given scope."] pub fn starpu_perf_knob_list_avail (scope : starpu_perf_knob_scope) ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in all scopes."] pub fn starpu_perf_knob_list_all_avail () ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int32_value (knob_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int64_value (knob_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_float_value (knob_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_double_value (knob_id : :: std :: os :: raw :: c_int) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int32_value (knob_id : :: std :: os :: raw :: c_int , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int64_value (knob_id : :: std :: os :: raw :: c_int , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float knob value for Global scope."] pub fn starpu_perf_knob_set_global_float_value (knob_id : :: std :: os :: raw :: c_int , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double knob value for Global scope."] pub fn starpu_perf_knob_set_global_double_value (knob_id : :: std :: os :: raw :: c_int , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f64) ; } # [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 unless\nstarpu_conf::precedence_over_environment_variables is set."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 =\nNULL)."] 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 = NULL)"] pub sched_policy : * mut starpu_sched_policy , # [doc = "Callback function that can later be used by the scheduler.\nThe scheduler can retrieve this function by calling\nstarpu_sched_ctx_get_sched_policy_callback()"] pub sched_policy_callback : :: 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 = \\c -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 = \\c -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of HIP devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NHIP.\n(default = \\c -1)"] pub nhip : :: 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 = \\c -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of Maxeler FPGA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NMAX_FPGA.\n(default = -1)"] pub nmax_fpga : :: 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 = \\c -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "Number of TCP/IP Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NTCPIP_MS.\n(default = \\c -1)"] pub ntcpip_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 = \\c 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 \\c hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the HIP workers will be attached to\nthe HIP devices specified in the\nstarpu_conf::workers_hip_gpuid array. Otherwise, StarPU\naffects the HIP devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_HIPID.\n(default = \\c 0)"] pub use_explicit_workers_hip_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_hip_gpuid flag is\nset, this array contains the logical identifiers of the\nHIP devices (as used by \\c hipGetDevice())."] pub workers_hip_gpuid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the Maxeler FPGA workers will be attached to\nthe Maxeler FPGA devices specified in the\nstarpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU\naffects the Maxeler FPGA devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_MAX_FPGAID.\n(default = 0)"] pub use_explicit_workers_max_fpga_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag\nis set, this array contains the logical identifiers of the\nMaxeler FPGA devices to be used."] pub workers_max_fpga_deviceid : [:: std :: os :: raw :: c_uint ; 48usize] , pub max_fpga_load : * mut :: std :: os :: raw :: c_void , # [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 = \\c 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 ; 48usize] , # [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 = \\c 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 = \\c 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to enforce data locality when\nchoosing a worker to execute a task.\nThis can also be specified with the environment variable\n\\ref STARPU_DATA_LOCALITY_ENFORCE.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\nenable-data-locality-enforce \"--enable-data-locality-enforce\".\n(default = \\c 0)"] pub data_locality_enforce : :: 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 = \\c 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [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 = \\c 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 = \\c 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 HIP accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-hip-copy\n\"--disable-asynchronous-hip-copy\".\n(default = \\c 0)"] pub disable_asynchronous_hip_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 = \\c 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 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 = \\c 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and TCP/IP Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-tcpip-master-slave-copy\n\"--disable-asynchronous-tcpip-master-slave-copy\".\n(default = \\c 0)."] pub disable_asynchronous_tcpip_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and Maxeler FPGA devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-fpga-copy\n\"--disable-asynchronous-fpga-copy\".\n(default = 0)."] pub disable_asynchronous_max_fpga_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable memory mapping\nsupport between memory nodes. This can also be specified\nwith the environment variable \\ref STARPU_ENABLE_MAP."] pub enable_map : :: 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 = NULL)"] 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 = NULL)"] 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 = \\c 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 , # [doc = "Set the minimum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MIN_PRIO"] pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , # [doc = "Set the maximum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MAX_PRIO"] pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch \\c SIGINT, \\c SIGSEGV and \\c 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 caught. 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 = "Specify whether StarPU should automatically start to collect\nperformance counters after initialization"] pub start_perf_counter_collection : :: std :: os :: raw :: c_uint , # [doc = "Minimum spinning backoff of drivers (default = \\c 1)"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. (default = \\c 32)"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , # [doc = "Specify if CUDA workers should do only fast allocations\nwhen running the datawizard progress of\nother memory nodes. This will pass the interval value\n_STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.\nDefault value is 0, allowing CUDA workers to do slow\nallocations.\nThis can also be specified with the environment variable\n\\ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES."] pub cuda_only_fast_alloc_other_memnodes : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_conf"] [:: std :: mem :: size_of :: < starpu_conf > () - 1376usize] ; ["Alignment of starpu_conf"] [:: std :: mem :: align_of :: < starpu_conf > () - 8usize] ; ["Offset of field: starpu_conf::magic"] [:: std :: mem :: offset_of ! (starpu_conf , magic) - 0usize] ; ["Offset of field: starpu_conf::will_use_mpi"] [:: std :: mem :: offset_of ! (starpu_conf , will_use_mpi) - 4usize] ; ["Offset of field: starpu_conf::sched_policy_name"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_name) - 8usize] ; ["Offset of field: starpu_conf::sched_policy"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy) - 16usize] ; ["Offset of field: starpu_conf::sched_policy_callback"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_callback) - 24usize] ; ["Offset of field: starpu_conf::precedence_over_environment_variables"] [:: std :: mem :: offset_of ! (starpu_conf , precedence_over_environment_variables) - 32usize] ; ["Offset of field: starpu_conf::ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , ncpus) - 36usize] ; ["Offset of field: starpu_conf::reserve_ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , reserve_ncpus) - 40usize] ; ["Offset of field: starpu_conf::ncuda"] [:: std :: mem :: offset_of ! (starpu_conf , ncuda) - 44usize] ; ["Offset of field: starpu_conf::nhip"] [:: std :: mem :: offset_of ! (starpu_conf , nhip) - 48usize] ; ["Offset of field: starpu_conf::nopencl"] [:: std :: mem :: offset_of ! (starpu_conf , nopencl) - 52usize] ; ["Offset of field: starpu_conf::nmax_fpga"] [:: std :: mem :: offset_of ! (starpu_conf , nmax_fpga) - 56usize] ; ["Offset of field: starpu_conf::nmpi_ms"] [:: std :: mem :: offset_of ! (starpu_conf , nmpi_ms) - 60usize] ; ["Offset of field: starpu_conf::ntcpip_ms"] [:: std :: mem :: offset_of ! (starpu_conf , ntcpip_ms) - 64usize] ; ["Offset of field: starpu_conf::use_explicit_workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_bindid) - 68usize] ; ["Offset of field: starpu_conf::workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_bindid) - 72usize] ; ["Offset of field: starpu_conf::use_explicit_workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_cuda_gpuid) - 264usize] ; ["Offset of field: starpu_conf::workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_cuda_gpuid) - 268usize] ; ["Offset of field: starpu_conf::use_explicit_workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_hip_gpuid) - 460usize] ; ["Offset of field: starpu_conf::workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_hip_gpuid) - 464usize] ; ["Offset of field: starpu_conf::use_explicit_workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_opencl_gpuid) - 656usize] ; ["Offset of field: starpu_conf::workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_opencl_gpuid) - 660usize] ; ["Offset of field: starpu_conf::use_explicit_workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_max_fpga_deviceid) - 852usize] ; ["Offset of field: starpu_conf::workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_max_fpga_deviceid) - 856usize] ; ["Offset of field: starpu_conf::max_fpga_load"] [:: std :: mem :: offset_of ! (starpu_conf , max_fpga_load) - 1048usize] ; ["Offset of field: starpu_conf::use_explicit_workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_mpi_ms_deviceid) - 1056usize] ; ["Offset of field: starpu_conf::workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_mpi_ms_deviceid) - 1060usize] ; ["Offset of field: starpu_conf::bus_calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , bus_calibrate) - 1252usize] ; ["Offset of field: starpu_conf::calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , calibrate) - 1256usize] ; ["Offset of field: starpu_conf::data_locality_enforce"] [:: std :: mem :: offset_of ! (starpu_conf , data_locality_enforce) - 1260usize] ; ["Offset of field: starpu_conf::single_combined_worker"] [:: std :: mem :: offset_of ! (starpu_conf , single_combined_worker) - 1264usize] ; ["Offset of field: starpu_conf::disable_asynchronous_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_copy) - 1268usize] ; ["Offset of field: starpu_conf::disable_asynchronous_cuda_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_cuda_copy) - 1272usize] ; ["Offset of field: starpu_conf::disable_asynchronous_hip_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_hip_copy) - 1276usize] ; ["Offset of field: starpu_conf::disable_asynchronous_opencl_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_opencl_copy) - 1280usize] ; ["Offset of field: starpu_conf::disable_asynchronous_mpi_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_mpi_ms_copy) - 1284usize] ; ["Offset of field: starpu_conf::disable_asynchronous_tcpip_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_tcpip_ms_copy) - 1288usize] ; ["Offset of field: starpu_conf::disable_asynchronous_max_fpga_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_max_fpga_copy) - 1292usize] ; ["Offset of field: starpu_conf::enable_map"] [:: std :: mem :: offset_of ! (starpu_conf , enable_map) - 1296usize] ; ["Offset of field: starpu_conf::cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_opengl_interoperability) - 1304usize] ; ["Offset of field: starpu_conf::n_cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , n_cuda_opengl_interoperability) - 1312usize] ; ["Offset of field: starpu_conf::not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , not_launched_drivers) - 1320usize] ; ["Offset of field: starpu_conf::n_not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , n_not_launched_drivers) - 1328usize] ; ["Offset of field: starpu_conf::trace_buffer_size"] [:: std :: mem :: offset_of ! (starpu_conf , trace_buffer_size) - 1336usize] ; ["Offset of field: starpu_conf::global_sched_ctx_min_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_min_priority) - 1344usize] ; ["Offset of field: starpu_conf::global_sched_ctx_max_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_max_priority) - 1348usize] ; ["Offset of field: starpu_conf::catch_signals"] [:: std :: mem :: offset_of ! (starpu_conf , catch_signals) - 1352usize] ; ["Offset of field: starpu_conf::start_perf_counter_collection"] [:: std :: mem :: offset_of ! (starpu_conf , start_perf_counter_collection) - 1356usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_min"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_min) - 1360usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_max"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_max) - 1364usize] ; ["Offset of field: starpu_conf::cuda_only_fast_alloc_other_memnodes"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_only_fast_alloc_other_memnodes) - 1368usize] ; } ; 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 () } } } unsafe 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-EINVAL indicates that the argument was NULL."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Set fields of \\p conf so that no worker is enabled, i.e. set\nstarpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.\n\nThis allows to portably enable only a given type of worker:\n
\n\nstarpu_conf_noworker(&conf);
\nconf.ncpus = -1;\n\n\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_conf_noworker (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe 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-NULL \\p conf. Default configuration is used if \\p conf\nis NULL. Upon successful completion, this function returns\n0. Otherwise, -ENODEV indicates that no worker was available\n(and thus StarPU was not initialized). See \\ref SubmittingATask for more details."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application, which is necessary when running in\nSimgrid mode or MPI Master Slave mode.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram. See \\ref SubmittingATask for more details."] 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 ; } unsafe extern "C" { # [doc = "Return 1 if StarPU is already initialized. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait for starpu_init() call to finish. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_wait_initialized () ; } unsafe 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. See \\ref SubmittingATask for more details."] pub fn starpu_shutdown () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_pause () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_resume () ; } unsafe extern "C" { # [doc = "Return !0 if task processing by workers is currently paused, 0 otherwise.\nSee \\ref StarPUEatsCPUs for more details."] pub fn starpu_is_paused () -> :: std :: os :: raw :: c_int ; } unsafe 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\n::STARPU_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.\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe 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 \\p cpuid does not produce a warning.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Bind the calling thread on the cores corresponding to the \\p workerid .\n\n\\p workerid can be a basic worker or a combined worker.\n\nThis can be used e.g. before initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_worker (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Bind the calling thread back to the core reserved for the main thread.\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_main () ; } unsafe extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_cpu (cpuid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the OS number of a given \\p cpuid\n\nStarPU uses logical numbering (as define by hwloc) all along, but in case\ninteraction is needed with another binding tool that uses numbering as\ndefined by the OS, we need to convert from hwloc logical numbering to hwloc\nphysical numbering."] pub fn starpu_cpu_os_index (cpuid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print a description of the topology on \\p f.\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_topology_print (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled.\nSee \\ref Basic for more details."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled.\nSee \\ref cudaWorkers for more details."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and HIP\naccelerators are disabled.\nSee \\ref hipWorkers for more details."] pub fn starpu_asynchronous_hip_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled.\nSee \\ref openclWorkers for more details."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and Maxeler FPGA\ndevices are disabled.\nSee \\ref maxfpgaWorkers for more details."] pub fn starpu_asynchronous_max_fpga_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled.\nSee \\ref mpimsWorkers for more details."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and TCP/IP Slave\ndevices are disabled.\nSee \\ref tcpipmsWorkers for more details."] pub fn starpu_asynchronous_tcpip_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers with a given kind of memory\nare disabled."] pub fn starpu_asynchronous_copy_disabled_for (kind : starpu_node_kind) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if memory mapping support between memory nodes is\nenabled.\nSee \\ref Basic for more details."] pub fn starpu_map_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call starpu_profiling_bus_helper_display_summary() and\nstarpu_profiling_worker_helper_display_summary().\nSee \\ref DataStatistics for more details."] pub fn starpu_display_stats () ; } unsafe extern "C" { # [doc = "Return as 3 integers the version of StarPU used when running the\napplication.\nSee \\ref ConfigurationAndInitialization for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_perf_counter_sample_cl_values { pub _address : u8 , } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_omp_task { pub _address : u8 , }
[INFO] [stdout] | ++++++++++
[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-d9f436f8999da027/out/bindings.rs:3:29066
[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_event` in this scope
[INFO] [stdout] --> /opt/rustwide/target/debug/build/starpu-sys-d9f436f8999da027/out/bindings.rs:3:29251
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ze , offset : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "C...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:29307
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes asynchronously from byte offset \\p s...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:30089
[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-d9f436f8999da027/out/bindings.rs:3:30168
[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-d9f436f8999da027/out/bindings.rs:3:30270
[INFO] [stdout] |
[INFO] [stdout] 3 | ...size , size : usize , event : * mut cl_event , ret : * mut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "C...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:30326
[INFO] [stdout] |
[INFO] [stdout] 3 | ...ut :: std :: os :: raw :: c_int) -> cl_int ; } unsafe extern "C" { # [doc = "Copy \\p size bytes from byte offset \\p src_offset of \\...
[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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:31154
[INFO] [stdout] |
[INFO] [stdout] 3 | ...uint , size : usize , event : * mut cl_event) -> cl_int ; } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va...
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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-d9f436f8999da027/out/bindings.rs:3:31167
[INFO] [stdout] |
[INFO] [stdout] 3 | ... usize , event : * mut cl_event) -> cl_int ; } pub type __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_va_list ; pub 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.174/src/primitives.rs:58:9
[INFO] [stdout] |
[INFO] [stdout] 58 | 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-d9f436f8999da027/out/bindings.rs:3:95826
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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] fn extract_bit (byte : u8 , index : usize) -> bool { 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 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] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { 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 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] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [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 unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , 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) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; 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 } ; unsafe { Self :: raw_set_bit (this , 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 = 4 ; pub const STARPU_RELEASE_VERSION : u32 = 3 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_USE_TCPIP_MASTER_SLAVE : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_PARALLEL_WORKER : 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_CBLAS_H : 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_PAPI : 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_BOOL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : 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_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_MAXCPUS : u32 = 32 ; pub const STARPU_MAXNUMANODES : u32 = 4 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMAXFPGADEVS : u32 = 12 ; pub const STARPU_MAXHIPDEVS : u32 = 8 ; pub const STARPU_NMAXWORKERS : u32 = 48 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; 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_HAVE_MPI_COMM_CREATE_GROUP : u32 = 1 ; pub const STARPU_USE_FXT : 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_PTHREAD_MUTEX_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_COND_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO : 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 STARPU_PYTHON_HAVE_NUMPY : u32 = 1 ; pub const STARPU_PROF_TOOL : 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_MALLOC_SIMULATION_UNIQUE : u32 = 128 ; pub const STARPU_NOWHERE : u32 = 1 ; 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_HIP_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_SPECIFIC_NODE_LOCAL_OR_CPU : i32 = - 5 ; pub const STARPU_SPECIFIC_NODE_NONE : i32 = - 6 ; 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_TRANSACTION : u32 = 5505024 ; pub const STARPU_TASK_FILE : u32 = 5636096 ; pub const STARPU_TASK_LINE : u32 = 5767168 ; pub const STARPU_EPILOGUE_CALLBACK : u32 = 5898240 ; pub const STARPU_EPILOGUE_CALLBACK_ARG : u32 = 6029312 ; pub const STARPU_BUBBLE_FUNC : u32 = 6160384 ; pub const STARPU_BUBBLE_FUNC_ARG : u32 = 6291456 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC : u32 = 6422528 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC_ARG : u32 = 6553600 ; pub const STARPU_BUBBLE_PARENT : u32 = 6684672 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 6815744 ; 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_PARALLEL_WORKER_MIN_NB : u32 = 131072 ; pub const STARPU_PARALLEL_WORKER_MAX_NB : u32 = 262144 ; pub const STARPU_PARALLEL_WORKER_NB : u32 = 393216 ; pub const STARPU_PARALLEL_WORKER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_PARALLEL_WORKER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_PARALLEL_WORKER_POLICY_NAME : u32 = 786432 ; pub const STARPU_PARALLEL_WORKER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_PARALLEL_WORKER_TYPE : u32 = 1310720 ; pub const STARPU_PARALLEL_WORKER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_PARALLEL_WORKER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_PARALLEL_WORKER_NEW : u32 = 1703936 ; pub const STARPU_PARALLEL_WORKER_NCORES : u32 = 1835008 ; pub const STARPU_CLUSTER_MIN_NB : u32 = 131072 ; pub const STARPU_CLUSTER_MAX_NB : u32 = 262144 ; pub const STARPU_CLUSTER_NB : u32 = 393216 ; pub const STARPU_CLUSTER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_CLUSTER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_CLUSTER_POLICY_NAME : u32 = 786432 ; pub const STARPU_CLUSTER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_CLUSTER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_CLUSTER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_CLUSTER_TYPE : u32 = 1310720 ; pub const STARPU_CLUSTER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_CLUSTER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_CLUSTER_NEW : u32 = 1703936 ; pub const STARPU_CLUSTER_NCORES : u32 = 1835008 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of drand48_data"] [:: std :: mem :: size_of :: < drand48_data > () - 24usize] ; ["Alignment of drand48_data"] [:: std :: mem :: align_of :: < drand48_data > () - 8usize] ; ["Offset of field: drand48_data::__x"] [:: std :: mem :: offset_of ! (drand48_data , __x) - 0usize] ; ["Offset of field: drand48_data::__old_x"] [:: std :: mem :: offset_of ! (drand48_data , __old_x) - 6usize] ; ["Offset of field: drand48_data::__c"] [:: std :: mem :: offset_of ! (drand48_data , __c) - 12usize] ; ["Offset of field: drand48_data::__init"] [:: std :: mem :: offset_of ! (drand48_data , __init) - 14usize] ; ["Offset of field: drand48_data::__a"] [:: std :: mem :: offset_of ! (drand48_data , __a) - 16usize] ; } ; 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_opencl_program"] [:: std :: mem :: size_of :: < starpu_opencl_program > () - 64usize] ; ["Alignment of starpu_opencl_program"] [:: std :: mem :: align_of :: < starpu_opencl_program > () - 8usize] ; ["Offset of field: starpu_opencl_program::programs"] [:: std :: mem :: offset_of ! (starpu_opencl_program , programs) - 0usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current worker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as (size_t size_of_the_argument, cl_mem *\npointer_to_the_argument). 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\n\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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 share/starpu/opencl 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. See \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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$STARPU_HOME/.starpu/opencl/\\.\\.vendor_id_\\_device_id_\\.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a file.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a string.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Unload an OpenCL compiled code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe 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). See \\ref OpenCL-specificOptimizations for more details."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe 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 NULL, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not NULL, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns -EAGAIN if the asynchronous launch was\nsuccessful. It returns 0 if the synchronous copy was successful, or\nfails otherwise.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_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 ; unsafe extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe 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)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_pthread_spinlock_t"] [:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Alignment of starpu_pthread_spinlock_t"] [:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Offset of field: starpu_pthread_spinlock_t::taken"] [:: std :: mem :: offset_of ! (starpu_pthread_spinlock_t , taken) - 0usize] ; } ; unsafe 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 ; } unsafe extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; unsafe extern "C" { pub fn starpu_sem_trywait (sem : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sem_wait (sem : * 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. See \\ref DataInterface for more details."] 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\nNULL pointer, since the value\nof the provided buffer is simply\nignored for now.\n\nSee \\ref ScratchData for more details."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< Reduction mode.\nStarPU will allocate on the fly a per-worker\nbuffer, so that various tasks that access the\nsame data in ::STARPU_REDUX mode can execute\nin parallel. When a task accesses the\ndata without ::STARPU_REDUX, StarPU will\nautomatically reduce the different contributions.\n\nCodelets contributing to these reductions\nwith ::STARPU_REDUX must be registered with\n::STARPU_RW | ::STARPU_COMMUTE access modes.\n\nSee \\ref DataReduction for more details."] 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).\n\nSee \\ref DataCommute for more details."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_task_insert() 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.\n\nTODO add extended description in documentation."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Inter-node reduction only.\nThis is similar to ::STARPU_REDUX, except that\nStarPU will allocate a per-node buffer only,\ni.e. parallelism will be achieved between\nnodes, but not within each node. This is\nuseful when the per-worker buffers allocated\nwith ::STARPU_REDUX consume too much memory.\n\nSee \\ref MPIMpiRedux for more details."] pub const STARPU_MPI_REDUX : starpu_data_access_mode = 128 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning, only use internally by StarPU"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< Request unmapping the destination replicate, only use internally by StarPU"] pub const STARPU_UNMAP : starpu_data_access_mode = 512 ; # [doc = "< Ignore this data for the footprint computation. See \\ref ScratchData"] pub const STARPU_NOFOOTPRINT : starpu_data_access_mode = 1024 ; # [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 = 2048 ; # [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 ; unsafe extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] 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]) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] 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 ; } unsafe 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.\nSee \\ref TaskSubmission for more details."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref TemporaryData for more details."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks. See \\ref DataReduction for more details."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } unsafe 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) ; } unsafe 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\nexplicitly 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 -EDEADLK). Upon successful\ncompletion, this function returns 0. See \\ref DataAccess for more details."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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.\n\n\\p callback_acquired is called when the data is acquired in terms of semantic,\nbut the data is not fetched yet. It is given a pointer to the node, which it\ncan modify if it wishes so.\n\nThis is a very internal interface, subject to changes, do not use this."] 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_acquired : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , node : * mut :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) > , callback : :: std :: option :: Option < unsafe extern "C" fn (arg : * 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 , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb(). See \\ref DataAccess for more details."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Partly release the piece of data acquired by the application either by\nstarpu_data_acquire() or by starpu_data_acquire_cb(), switching the\nacquisition down to \\p down_to_mode. For now, only releasing from ::STARPU_RW\nor ::STARPU_W acquisition down to ::STARPU_R is supported, or down to the same\nacquisition. ::STARPU_NONE can also be passed as \\p down_to_mode, in which\ncase this is equivalent to calling starpu_data_release(). See \\ref DataAccess for more details."] pub fn starpu_data_release_to (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release_to(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_to_on_node (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode , 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 ; unsafe extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } unsafe extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter, see \\ref\nConcurrentDataAccess for the details."] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Destroy the \\p arbiter. This must only be called after all data\nassigned to it have been unregistered. See \\ref\nConcurrentDataAccess for the details."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A task really needs it now!"] pub const STARPU_FETCH : starpu_is_prefetch = 0 ; # [doc = " A task will need it soon"] pub const STARPU_TASK_PREFETCH : starpu_is_prefetch = 1 ; # [doc = " It is a good idea to have it asap"] pub const STARPU_PREFETCH : starpu_is_prefetch = 2 ; # [doc = " Get this here when you have time to"] pub const STARPU_IDLEFETCH : starpu_is_prefetch = 3 ; # [doc = " Get this here when you have time to"] pub const STARPU_NFETCH : starpu_is_prefetch = 4 ; # [doc = "Prefetch levels\n\nData requests are ordered by priorities, but also by prefetching level,\nbetween data that a task wants now, and data that we will probably want\n\"soon\"."] pub type starpu_is_prefetch = :: std :: os :: raw :: c_uint ; unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node (or a transfer request for getting so is ongoing). See \\ref SchedulingHelpers for more details."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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. See \\ref DataPrefetch for more details."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Advise StarPU to evict \\p handle from the memory node \\p node\nStarPU will thus write its value back to its home node, before evicting it.\nThis may however fail if e.g. some task is still working on it.\n\nIf the eviction was successful, 0 is returned ; -1 is returned otherwise.\n\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_evict_from_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 transferred into those memory nodes. For\ninstance a 1<<0 write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0). See \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } unsafe 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().\nSee \\ref SequentialConsistency and \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the default sequential consistency flag. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } unsafe 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(). See \\ref SequentialConsistency for more details."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1. See \\ref OOCDataRegistration for more details."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0). See \\ref OOCDataRegistration for more details."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node.\n\n\\p is_allocated tells whether memory was allocated there for the data.\n\\p is_valid tells whether the actual value is available there.\n\\p is_loading tells whether the actual value is getting loaded there.\n\\p is_requested tells whether the actual value is requested to be loaded\nthere by some fetch/prefetch/idlefetch request.\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_query_status2 (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_loading : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Same as starpu_data_query_status2(), but without the is_loading parameter. See \\ref DataPrefetch for more details."] 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) ; } unsafe 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 (which has to take one handle with ::STARPU_W), and\nreduction between per-worker buffers will be done with the codelet \\p\nredux_cl (which has to take a first accumulation handle with\n::STARPU_RW|::STARPU_COMMUTE, and a second contribution handle with ::STARPU_R).\nSee \\ref DataReduction and \\ref TemporaryData for more details."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Same as starpu_data_set_reduction_methods() but allows to pass\narguments to the reduction and init tasks"] pub fn starpu_data_set_reduction_methods_with_args (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , redux_cl_arg : * mut :: std :: os :: raw :: c_void , init_cl : * mut starpu_codelet , init_cl_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_data_test_if_mapped_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Set the field \\c sched_data for the \\p handle to \\p sched_data . It can\nthen be retrieved with starpu_data_get_sched_data(). \\p sched_data can be any\nscheduler-defined value.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_sched_data (handle : starpu_data_handle_t , sched_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c sched_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_sched_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Check whether data \\p handle can be evicted now from node \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_can_evict (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , is_prefetch : starpu_is_prefetch) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Retrieve the value of an environment variable.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the current date in micro-seconds. See \\ref Preparing for more details."] pub fn starpu_timing_now () -> f64 ; } unsafe 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Like starpu_data_cpy(), copy the content of \\p src_handle into \\p dst_handle,\nbut additionally take a \\p priority parameter to sort it among the whole task\ngraph.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_cpy_priority (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 , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Create a copy of \\p src_handle, and return a new handle in \\p dst_handle,\nwhich is to be used only for read accesses. This allows StarPU to optimize it\nby not actually copying the data whenever possible (e.g. it may possibly\nsimply return src_handle itself).\nThe parameter \\p asynchronous indicates whether the function should block\nor not. In the case of an asynchronous call, it is possible to synchronize\nwith the 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_dup_ro (dst_handle : * mut starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call hwloc-ps to display binding of each process and thread running on\nthe machine.
\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU.\nSee \\ref MiscellaneousAndDebug for more details."] pub fn starpu_display_bindings () ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a bitmap representing logical indexes of NUMA nodes where the buffer\ntargeted by \\p ptr is allocated. An error is notified by a negative result.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_memory_location_bitmap (ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_long ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate data on disk. See \\ref DiskFunctions for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 data 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 data, 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 data \\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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_disk_ops"] [:: std :: mem :: size_of :: < starpu_disk_ops > () - 152usize] ; ["Alignment of starpu_disk_ops"] [:: std :: mem :: align_of :: < starpu_disk_ops > () - 8usize] ; ["Offset of field: starpu_disk_ops::plug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , plug) - 0usize] ; ["Offset of field: starpu_disk_ops::unplug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , unplug) - 8usize] ; ["Offset of field: starpu_disk_ops::bandwidth"] [:: std :: mem :: offset_of ! (starpu_disk_ops , bandwidth) - 16usize] ; ["Offset of field: starpu_disk_ops::alloc"] [:: std :: mem :: offset_of ! (starpu_disk_ops , alloc) - 24usize] ; ["Offset of field: starpu_disk_ops::free"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free) - 32usize] ; ["Offset of field: starpu_disk_ops::open"] [:: std :: mem :: offset_of ! (starpu_disk_ops , open) - 40usize] ; ["Offset of field: starpu_disk_ops::close"] [:: std :: mem :: offset_of ! (starpu_disk_ops , close) - 48usize] ; ["Offset of field: starpu_disk_ops::read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , read) - 56usize] ; ["Offset of field: starpu_disk_ops::write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , write) - 64usize] ; ["Offset of field: starpu_disk_ops::full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_read) - 72usize] ; ["Offset of field: starpu_disk_ops::full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_write) - 80usize] ; ["Offset of field: starpu_disk_ops::async_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_write) - 88usize] ; ["Offset of field: starpu_disk_ops::async_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_read) - 96usize] ; ["Offset of field: starpu_disk_ops::async_full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_read) - 104usize] ; ["Offset of field: starpu_disk_ops::async_full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_write) - 112usize] ; ["Offset of field: starpu_disk_ops::copy"] [:: std :: mem :: offset_of ! (starpu_disk_ops , copy) - 120usize] ; ["Offset of field: starpu_disk_ops::wait_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , wait_request) - 128usize] ; ["Offset of field: starpu_disk_ops::test_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , test_request) - 136usize] ; ["Offset of field: starpu_disk_ops::free_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free_request) - 144usize] ; } ; unsafe extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\nWarning: It creates one file per allocation !\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the HDF5 library.\n\nIt doesn't support multiple opening from different processes. \n\nYou may only allow one process to write in the HDF5 file.\n\nIf HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. "] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\nWarning: It creates one file per allocation !"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\nWarning: It creates one file per allocation !\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Close an existing data opened with starpu_disk_open(). See \\ref OutOfCore_Introduction for more details."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe 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. See \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndata. 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
\nSUCCESS: return the disk node.
\nFAIL: return an error code.
\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size.\n\nSee \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe 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, HIP or OpenCL support.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 HIP node. Return 0 on success."] pub ram_to_hip : :: 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 FPGA node. Return 0 on success."] pub ram_to_max_fpga : :: 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 HIP node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub hip_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 HIP node to the \\p dst_interface interface on the \\p\ndst_node HIP node. Return 0 on success."] pub hip_to_hip : :: 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 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 FPGA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub max_fpga_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 > , 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 > , pub ram_to_hip_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_hip_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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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 FPGA node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_max_fpga_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 FPGA 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 -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub max_fpga_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 -EAGAIN if any of the starpu_interface_copy()\ncalls has returned -EAGAIN (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::peek_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 > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_copy_methods"] [:: std :: mem :: size_of :: < starpu_data_copy_methods > () - 200usize] ; ["Alignment of starpu_data_copy_methods"] [:: std :: mem :: align_of :: < starpu_data_copy_methods > () - 8usize] ; ["Offset of field: starpu_data_copy_methods::can_copy"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , can_copy) - 0usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_ram) - 8usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda) - 16usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip) - 24usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl) - 32usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga) - 40usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram) - 48usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda) - 56usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram) - 64usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip) - 72usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram) - 80usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl) - 88usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram) - 96usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda_async) - 104usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram_async) - 112usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda_async) - 120usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip_async) - 128usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram_async) - 136usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip_async) - 144usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl_async) - 152usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram_async) - 160usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl_async) - 168usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga_async) - 176usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram_async) - 184usize] ; ["Offset of field: starpu_data_copy_methods::any_to_any"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , any_to_any) - 192usize] ; } ; # [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 = "< Identifier for the tensor data interface"] pub const STARPU_TENSOR_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "< Identifier for the ndim array data interface"] pub const STARPU_NDIM_INTERFACE_ID : starpu_data_interface_id = 10 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 11 ; # [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)] 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 (if >= 0), 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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 = "Cache the buffers from the given node to a caching interface.\n\nThis method is optional, mostly useful when also making\nstarpu_data_interface_ops::unregister_data_handle check that pointers are NULL.\n\n\\p src_interface is an interface that already has buffers\nallocated, but which we don't need any more. \\p cached_interface\nis a new interface into which the buffer pointers should be\ntransferred, for later reuse when allocating data of the same kind.\n\nUsually we can just memcpy over the set of pointers and descriptions\n(this is what StarPU does when this method is not implemented), but\nif unregister_data_handle checks that pointers are NULL, we need to\nadditionally clear the pointers in \\p src_interface. Also,\nit is not useful to copy the whole interface, only the\npointers need to be copied (essentially the pointers that\nstarpu_data_interface_ops::reuse_data_on_node will then transfer into\na new handle interface), as well as the properties\nthat starpu_data_interface_ops::compare (or\nstarpu_data_interface_ops::alloc_compare if defined) needs for\ncomparing interfaces for caching compatibility.\n\nWhen this method is not defined, StarPU will just copy the \\p\ncached_interface into \\p src_interface.\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub cache_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (cached_interface : * mut :: std :: os :: raw :: c_void , src_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Reuse on the given node the buffers of the provided interface\n\nThis method is optional, mostly useful when also defining\nalloc_footprint to share tiles of the same allocation size but\ndifferent shapes, or when the interface contains pointers which\nare initialized at registration (e.g. nn array in the ndim interface)\n\n\\p cached_interface is an already-allocated buffer that we want to\nreuse, and \\p new_data_interface is an interface in which we want to\ninstall that already-allocated buffer. Usually we can just memcpy over\nthe set of pointers and descriptions. But e.g. with 2D tiles the ld\nvalue may not be correct, and memcpy would wrongly overwrite it in\nnew_data_interface, i.e. reusing a vertical tile allocation for a horizontal tile, or vice-versa.\n\nreuse_data_on_node should thus copy over pointers, and define fields\nthat are usually set by allocate_data_on_node (e.g. ld).\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub reuse_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (dst_data_interface : * mut :: std :: os :: raw :: c_void , cached_interface : * const :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Map data from a source to a destination.\nDefine function starpu_interface_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub map_data : :: 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 = "Unmap data from a source to a destination.\nDefine function starpu_interface_unmap() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub unmap_data : :: 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 = "Update map data from a source to a destination.\nDefine function starpu_interface_update_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub update_map : :: 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 = "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 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 the maximum size that the data may need to increase to. For\ninstance, in the case of compressed matrix tiles this is the size\nwhen the block is fully dense.\nThis is currently only used for feedback tools."] pub get_max_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.\nIf specified, alloc_compare should be set to provide the strict\ncomparison, and reuse_data_on_node should be set to provide correct buffer reuse."] 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 starpu_malloc_flags(ptr, size, 0) (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is NULL, 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 = "Read the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count."] pub peek_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 = "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 = "Pack the interface into a contiguous buffer and set the\nsize of the newly created buffer in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub pack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the interface from the given buffer and set the size\nof the unpacked data in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub unpack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Free the allocated memory by a previous call to unpack_meta()"] pub free_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_data_interface_ops > () - 264usize] ; ["Alignment of starpu_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_data_interface_ops::register_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , register_data_handle) - 0usize] ; ["Offset of field: starpu_data_interface_ops::unregister_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unregister_data_handle) - 8usize] ; ["Offset of field: starpu_data_interface_ops::allocate_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , allocate_data_on_node) - 16usize] ; ["Offset of field: starpu_data_interface_ops::free_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_data_on_node) - 24usize] ; ["Offset of field: starpu_data_interface_ops::cache_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , cache_data_on_node) - 32usize] ; ["Offset of field: starpu_data_interface_ops::reuse_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , reuse_data_on_node) - 40usize] ; ["Offset of field: starpu_data_interface_ops::map_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , map_data) - 48usize] ; ["Offset of field: starpu_data_interface_ops::unmap_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unmap_data) - 56usize] ; ["Offset of field: starpu_data_interface_ops::update_map"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , update_map) - 64usize] ; ["Offset of field: starpu_data_interface_ops::init"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , init) - 72usize] ; ["Offset of field: starpu_data_interface_ops::copy_methods"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , copy_methods) - 80usize] ; ["Offset of field: starpu_data_interface_ops::handle_to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , handle_to_pointer) - 88usize] ; ["Offset of field: starpu_data_interface_ops::to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , to_pointer) - 96usize] ; ["Offset of field: starpu_data_interface_ops::get_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_size) - 104usize] ; ["Offset of field: starpu_data_interface_ops::get_alloc_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_alloc_size) - 112usize] ; ["Offset of field: starpu_data_interface_ops::get_max_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_max_size) - 120usize] ; ["Offset of field: starpu_data_interface_ops::footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , footprint) - 128usize] ; ["Offset of field: starpu_data_interface_ops::alloc_footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_footprint) - 136usize] ; ["Offset of field: starpu_data_interface_ops::compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , compare) - 144usize] ; ["Offset of field: starpu_data_interface_ops::alloc_compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_compare) - 152usize] ; ["Offset of field: starpu_data_interface_ops::display"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , display) - 160usize] ; ["Offset of field: starpu_data_interface_ops::describe"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , describe) - 168usize] ; ["Offset of field: starpu_data_interface_ops::interfaceid"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interfaceid) - 176usize] ; ["Offset of field: starpu_data_interface_ops::interface_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interface_size) - 184usize] ; ["Offset of field: starpu_data_interface_ops::is_multiformat"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , is_multiformat) - 192usize] ; ["Offset of field: starpu_data_interface_ops::dontcache"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , dontcache) - 193usize] ; ["Offset of field: starpu_data_interface_ops::get_mf_ops"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_mf_ops) - 200usize] ; ["Offset of field: starpu_data_interface_ops::pack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_data) - 208usize] ; ["Offset of field: starpu_data_interface_ops::peek_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , peek_data) - 216usize] ; ["Offset of field: starpu_data_interface_ops::unpack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_data) - 224usize] ; ["Offset of field: starpu_data_interface_ops::pack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_meta) - 232usize] ; ["Offset of field: starpu_data_interface_ops::unpack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_meta) - 240usize] ; ["Offset of field: starpu_data_interface_ops::free_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_meta) - 248usize] ; ["Offset of field: starpu_data_interface_ops::name"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , name) - 256usize] ; } ; 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 () } } } unsafe 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()).\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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) ; } unsafe extern "C" { # [doc = "Register the given data interface operations. If the field\nstarpu_data_interface_ops::field is set to\n::STARPU_UNKNOWN_INTERFACE_ID, then a new identifier will be set by\ncalling starpu_data_interface_get_next_id().\nThe function is automatically called when registering a piece of\ndata with starpu_data_register(). It is only necessary to call it\nbeforehand for some specific cases (such as the usmaster slave mode)."] pub fn starpu_data_register_ops (ops : * mut starpu_data_interface_ops) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or NULL\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node.\nSee \\ref DataPointers for more details."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle or NULL if\n\\p handle’s interface does not have any data allocated locally.\nSee \\ref DataPointers for more details."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node.\nSee \\ref DefiningANewDataInterface_pack for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle.\nSee \\ref DefiningANewDataInterface_helpers for more details."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } unsafe 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 on node \\p node 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 NULL, 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_pack_node (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 ; } unsafe extern "C" { # [doc = "Like starpu_data_pack_node(), but for the local memory node.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Read in handle's \\p node replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek_node (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 ; } unsafe extern "C" { # [doc = "Read in handle's local replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count allocated\non node \\p node as described by the interface of the data. The interface\nregistered at \\p handle must define an unpacking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack_node (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 ; } unsafe 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).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the size of the data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the maximum size that the \\p handle data may need to increase to.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_max_size (handle : starpu_data_handle_t) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "See \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print basic information on \\p handle on \\p node.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_print (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , stream : * mut FILE) ; } unsafe 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 ; } unsafe 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 -EAGAIN if the\ntransfer is still ongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 4D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe extern "C" { # [doc = "Copy \\p nn[1] * \\p nn[2]...* \\p nn[ndim-1] blocks of \\p nn[0] * \\p elemsize 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 nn[i] blocks (i = 1, 2, ... ndim-1) whose start addresses are\nldn_src[i] * \\p elemsize (resp. ld1_dst[i] * \\p elemsize) bytes apart\nin the source (resp. destination) interface.\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 Ndim data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_copynd (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , elemsize : usize , ndim : usize , nn : * mut u32 , ldn_src : * mut u32 , ldn_dst : * mut u32 , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "When an asynchronous 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().\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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) ; } unsafe extern "C" { # [doc = "See starpu_interface_start_driver_copy_async().\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } unsafe extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node.\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node_flags().\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::map_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_map (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize , ret : * mut :: std :: os :: raw :: c_int) -> usize ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::unmap_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_unmap (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::update_map.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_update_map (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) -> :: std :: os :: raw :: c_int ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_matrix_interface"] [:: std :: mem :: size_of :: < starpu_matrix_interface > () - 64usize] ; ["Alignment of starpu_matrix_interface"] [:: std :: mem :: align_of :: < starpu_matrix_interface > () - 8usize] ; ["Offset of field: starpu_matrix_interface::id"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , id) - 0usize] ; ["Offset of field: starpu_matrix_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ptr) - 8usize] ; ["Offset of field: starpu_matrix_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_matrix_interface::offset"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , offset) - 24usize] ; ["Offset of field: starpu_matrix_interface::nx"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , nx) - 32usize] ; ["Offset of field: starpu_matrix_interface::ny"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ny) - 36usize] ; ["Offset of field: starpu_matrix_interface::ld"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ld) - 40usize] ; ["Offset of field: starpu_matrix_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , elemsize) - 48usize] ; ["Offset of field: starpu_matrix_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_coo_interface"] [:: std :: mem :: size_of :: < starpu_coo_interface > () - 56usize] ; ["Alignment of starpu_coo_interface"] [:: std :: mem :: align_of :: < starpu_coo_interface > () - 8usize] ; ["Offset of field: starpu_coo_interface::id"] [:: std :: mem :: offset_of ! (starpu_coo_interface , id) - 0usize] ; ["Offset of field: starpu_coo_interface::columns"] [:: std :: mem :: offset_of ! (starpu_coo_interface , columns) - 8usize] ; ["Offset of field: starpu_coo_interface::rows"] [:: std :: mem :: offset_of ! (starpu_coo_interface , rows) - 16usize] ; ["Offset of field: starpu_coo_interface::values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , values) - 24usize] ; ["Offset of field: starpu_coo_interface::nx"] [:: std :: mem :: offset_of ! (starpu_coo_interface , nx) - 32usize] ; ["Offset of field: starpu_coo_interface::ny"] [:: std :: mem :: offset_of ! (starpu_coo_interface , ny) - 36usize] ; ["Offset of field: starpu_coo_interface::n_values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , n_values) - 40usize] ; ["Offset of field: starpu_coo_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_coo_interface , elemsize) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref COODataInterface for more details."] 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) ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_block_interface"] [:: std :: mem :: size_of :: < starpu_block_interface > () - 64usize] ; ["Alignment of starpu_block_interface"] [:: std :: mem :: align_of :: < starpu_block_interface > () - 8usize] ; ["Offset of field: starpu_block_interface::id"] [:: std :: mem :: offset_of ! (starpu_block_interface , id) - 0usize] ; ["Offset of field: starpu_block_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_block_interface , ptr) - 8usize] ; ["Offset of field: starpu_block_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_block_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_block_interface::offset"] [:: std :: mem :: offset_of ! (starpu_block_interface , offset) - 24usize] ; ["Offset of field: starpu_block_interface::nx"] [:: std :: mem :: offset_of ! (starpu_block_interface , nx) - 32usize] ; ["Offset of field: starpu_block_interface::ny"] [:: std :: mem :: offset_of ! (starpu_block_interface , ny) - 36usize] ; ["Offset of field: starpu_block_interface::nz"] [:: std :: mem :: offset_of ! (starpu_block_interface , nz) - 40usize] ; ["Offset of field: starpu_block_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldy) - 44usize] ; ["Offset of field: starpu_block_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldz) - 48usize] ; ["Offset of field: starpu_block_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_block_interface , elemsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Tensor Data Interface\n@{"] pub static mut starpu_interface_tensor_ops : starpu_data_interface_ops ; } # [doc = "Tensor interface for 4D dense tensors"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_tensor_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the tensor"] pub ptr : usize , # [doc = "< device handle of the tensor."] pub dev_handle : usize , # [doc = "< offset in the tensor."] pub offset : usize , # [doc = "< number of elements on the x-axis of the tensor."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the tensor."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the tensor."] pub nz : u32 , # [doc = "< number of elements on the t-axis of the tensor."] pub nt : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< number of elements between two cubes"] pub ldt : u32 , # [doc = "< size of the elements of the tensor."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tensor_interface"] [:: std :: mem :: size_of :: < starpu_tensor_interface > () - 72usize] ; ["Alignment of starpu_tensor_interface"] [:: std :: mem :: align_of :: < starpu_tensor_interface > () - 8usize] ; ["Offset of field: starpu_tensor_interface::id"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , id) - 0usize] ; ["Offset of field: starpu_tensor_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ptr) - 8usize] ; ["Offset of field: starpu_tensor_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_tensor_interface::offset"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , offset) - 24usize] ; ["Offset of field: starpu_tensor_interface::nx"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nx) - 32usize] ; ["Offset of field: starpu_tensor_interface::ny"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ny) - 36usize] ; ["Offset of field: starpu_tensor_interface::nz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nz) - 40usize] ; ["Offset of field: starpu_tensor_interface::nt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nt) - 44usize] ; ["Offset of field: starpu_tensor_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldy) - 48usize] ; ["Offset of field: starpu_tensor_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldz) - 52usize] ; ["Offset of field: starpu_tensor_interface::ldt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldt) - 56usize] ; ["Offset of field: starpu_tensor_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , elemsize) - 64usize] ; } ; impl Default for starpu_tensor_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz x \\p nt 4D tensor of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy,\n\\p ldz, and \\p ldt specify the number of elements between rows, between z planes and between t cubes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *tensor;\nstarpu_data_handle_t tensor_handle;\ntensor = (float*)malloc(nx*ny*nz*nt*sizeof(float));\nstarpu_tensor_data_register(&tensor_handle, STARPU_MAIN_RAM, (uintptr_t)tensor, nx, nx*ny, nx*ny*nz, nx, ny, nz, nt, sizeof(float));\n\\endcode\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , ldt : u32 , nx : u32 , ny : u32 , nz : u32 , nt : u32 , elemsize : usize) ; } unsafe 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, and \\p ldt elements between t cubes."] pub fn starpu_tensor_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32 , ldt : u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on the x-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nx (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the y-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_ny (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the z-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the t-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each row of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each z plane of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each t cubes of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_tensor_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the tensor designated by\n\\p handle."] pub fn starpu_tensor_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Ndim Array Data Interface\n@{"] pub static mut starpu_interface_ndim_ops : starpu_data_interface_ops ; } # [doc = "ndim interface for ndim array"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_ndim_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the ndim"] pub ptr : usize , # [doc = "< device handle of the ndim."] pub dev_handle : usize , # [doc = "< offset in the ndim."] pub offset : usize , # [doc = "< size actually currently allocated."] pub allocsize : usize , # [doc = "< array of element number on each dimension"] pub nn : * mut u32 , # [doc = "< array of element number between two units on each dimension"] pub ldn : * mut u32 , # [doc = "< size of the dimension."] pub ndim : usize , # [doc = "< size of the elements of the ndim."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_ndim_interface"] [:: std :: mem :: size_of :: < starpu_ndim_interface > () - 72usize] ; ["Alignment of starpu_ndim_interface"] [:: std :: mem :: align_of :: < starpu_ndim_interface > () - 8usize] ; ["Offset of field: starpu_ndim_interface::id"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , id) - 0usize] ; ["Offset of field: starpu_ndim_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ptr) - 8usize] ; ["Offset of field: starpu_ndim_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_ndim_interface::offset"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , offset) - 24usize] ; ["Offset of field: starpu_ndim_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , allocsize) - 32usize] ; ["Offset of field: starpu_ndim_interface::nn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , nn) - 40usize] ; ["Offset of field: starpu_ndim_interface::ldn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ldn) - 48usize] ; ["Offset of field: starpu_ndim_interface::ndim"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ndim) - 56usize] ; ["Offset of field: starpu_ndim_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , elemsize) - 64usize] ; } ; impl Default for starpu_ndim_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nn[0] x \\p nn[1] x ... \\p ndim-dimension matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldn,\nspecifies the number of elements between two units on each dimension.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *ndim_arr;\nsize_t arrsize = 1;\nint i;\nfor (i = 0; i < ndim; i++)\narrsize = arrsize * nn[i];\nstarpu_data_handle_t ndim_handle;\nndim_arr = (float*)malloc(arrsize*sizeof(float));\nstarpu_ndim_data_register(&ndim_handle, STARPU_MAIN_RAM, (uintptr_t)ndim_arr, ldn, nn, ndim, sizeof(float));\n\\endcode\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldn : * mut u32 , nn : * mut u32 , ndim : usize , elemsize : usize) ; } unsafe 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 ldn elements between two units on each dimension."] pub fn starpu_ndim_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldn : * mut u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on each dimension of the ndim array\ndesignated by \\p handle."] pub fn starpu_ndim_get_nn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the i-axis of the ndim array\ndesignated by \\p handle. When i=0, it means x-axis,\nwhen i=1, it means y-axis, when i=2, it means z-axis, etc."] pub fn starpu_ndim_get_ni (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units on each dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units i-axis dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldi (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_ndim_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the dimension size."] pub fn starpu_ndim_get_ndim (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the ndim array designated by\n\\p handle."] pub fn starpu_ndim_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_vector_interface"] [:: std :: mem :: size_of :: < starpu_vector_interface > () - 64usize] ; ["Alignment of starpu_vector_interface"] [:: std :: mem :: align_of :: < starpu_vector_interface > () - 8usize] ; ["Offset of field: starpu_vector_interface::id"] [:: std :: mem :: offset_of ! (starpu_vector_interface , id) - 0usize] ; ["Offset of field: starpu_vector_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_vector_interface , ptr) - 8usize] ; ["Offset of field: starpu_vector_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_vector_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_vector_interface::offset"] [:: std :: mem :: offset_of ! (starpu_vector_interface , offset) - 24usize] ; ["Offset of field: starpu_vector_interface::nx"] [:: std :: mem :: offset_of ! (starpu_vector_interface , nx) - 32usize] ; ["Offset of field: starpu_vector_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , elemsize) - 40usize] ; ["Offset of field: starpu_vector_interface::slice_base"] [:: std :: mem :: offset_of ! (starpu_vector_interface , slice_base) - 48usize] ; ["Offset of field: starpu_vector_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_vector_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize.\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_variable_interface"] [:: std :: mem :: size_of :: < starpu_variable_interface > () - 40usize] ; ["Alignment of starpu_variable_interface"] [:: std :: mem :: align_of :: < starpu_variable_interface > () - 8usize] ; ["Offset of field: starpu_variable_interface::id"] [:: std :: mem :: offset_of ! (starpu_variable_interface , id) - 0usize] ; ["Offset of field: starpu_variable_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_variable_interface , ptr) - 8usize] ; ["Offset of field: starpu_variable_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_variable_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_variable_interface::offset"] [:: std :: mem :: offset_of ! (starpu_variable_interface , offset) - 24usize] ; ["Offset of field: starpu_variable_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_variable_interface , elemsize) - 32usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VariableDataInterface for more details."] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } unsafe 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 void\ndata in read-write concurrently.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } unsafe 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)] 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 = "< position of non-zero entries on the row (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitioning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_csr_interface"] [:: std :: mem :: size_of :: < starpu_csr_interface > () - 72usize] ; ["Alignment of starpu_csr_interface"] [:: std :: mem :: align_of :: < starpu_csr_interface > () - 8usize] ; ["Offset of field: starpu_csr_interface::id"] [:: std :: mem :: offset_of ! (starpu_csr_interface , id) - 0usize] ; ["Offset of field: starpu_csr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nnz) - 4usize] ; ["Offset of field: starpu_csr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nrow) - 8usize] ; ["Offset of field: starpu_csr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nzval) - 16usize] ; ["Offset of field: starpu_csr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , colind) - 24usize] ; ["Offset of field: starpu_csr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_csr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_csr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_csr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_csr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_csr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_csr_interface , elemsize) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix.\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 = "< array of nnz elements (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< array of nrow+1 elements (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitioning 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bcsr_interface"] [:: std :: mem :: size_of :: < starpu_bcsr_interface > () - 80usize] ; ["Alignment of starpu_bcsr_interface"] [:: std :: mem :: align_of :: < starpu_bcsr_interface > () - 8usize] ; ["Offset of field: starpu_bcsr_interface::id"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , id) - 0usize] ; ["Offset of field: starpu_bcsr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nnz) - 4usize] ; ["Offset of field: starpu_bcsr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nrow) - 8usize] ; ["Offset of field: starpu_bcsr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nzval) - 16usize] ; ["Offset of field: starpu_bcsr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , colind) - 24usize] ; ["Offset of field: starpu_bcsr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_bcsr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_bcsr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_bcsr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_bcsr_interface::r"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , r) - 60usize] ; ["Offset of field: starpu_bcsr_interface::c"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , c) - 64usize] ; ["Offset of field: starpu_bcsr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , elemsize) - 72usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () - 56usize] ; ["Alignment of starpu_multiformat_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_elemsize) - 0usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_elemsize) - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_opencl_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_opencl_cl) - 16usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_to_cpu_cl) - 24usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_elemsize) - 32usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_cuda_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_cuda_cl) - 40usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_to_cpu_cl) - 48usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 hip_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_interface"] [:: std :: mem :: size_of :: < starpu_multiformat_interface > () - 56usize] ; ["Alignment of starpu_multiformat_interface"] [:: std :: mem :: align_of :: < starpu_multiformat_interface > () - 8usize] ; ["Offset of field: starpu_multiformat_interface::id"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , id) - 0usize] ; ["Offset of field: starpu_multiformat_interface::cpu_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cpu_ptr) - 8usize] ; ["Offset of field: starpu_multiformat_interface::cuda_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cuda_ptr) - 16usize] ; ["Offset of field: starpu_multiformat_interface::hip_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , hip_ptr) - 24usize] ; ["Offset of field: starpu_multiformat_interface::opencl_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , opencl_ptr) - 32usize] ; ["Offset of field: starpu_multiformat_interface::nx"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , nx) - 40usize] ; ["Offset of field: starpu_multiformat_interface::ops"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , ops) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref TheMultiformatInterface for more details."] 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().\nSee \\ref DefiningANewDataFilter for more details."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n- id 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
\n- nx, ny 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).
\n- ld for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange.
\n- elemsize is usually just copied over.
\n- ptr, the pointer to the data, has to be\ncomputed according to \\p i and the father's ptr, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has ptr different\nfrom NULL: in the OpenCL case notably, the\ndev_handle and offset fields are used\ninstead.
\n- dev_handle should be just copied over from the\nparent.
\n- offset has to be computed according to \\p i and\nthe father's offset, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n
"] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_filter"] [:: std :: mem :: size_of :: < starpu_data_filter > () - 48usize] ; ["Alignment of starpu_data_filter"] [:: std :: mem :: align_of :: < starpu_data_filter > () - 8usize] ; ["Offset of field: starpu_data_filter::filter_func"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_func) - 0usize] ; ["Offset of field: starpu_data_filter::nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , nchildren) - 8usize] ; ["Offset of field: starpu_data_filter::get_nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_nchildren) - 16usize] ; ["Offset of field: starpu_data_filter::get_child_ops"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_child_ops) - 24usize] ; ["Offset of field: starpu_data_filter::filter_arg"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg) - 32usize] ; ["Offset of field: starpu_data_filter::filter_arg_ptr"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg_ptr) - 40usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitioned beforehand.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list.\nSee \\ref PartitioningData for more details."] 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 ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The pointer of the filter list \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_parray (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut * mut starpu_data_filter) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The list of filter \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_array (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_readonly_submit(), but allow to\nspecify the coherency to be used for the main data \\p initial_handle.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\nin read-write mode through starpu_data_partition_submit(), and will downgrade\nthat partitioning into read-only mode for the \\p children, fetching data back to the \\p\ninitial_handle, and adding the necessary dependencies.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_downgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_clean() but the root data will be\ngathered on the given node.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean_node (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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().\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] 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 ; } unsafe 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.\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices.\n\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a matrix along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_vector.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_vector_y().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a matrix. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_variable.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_variable().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr, thus getting a vector\nof size (n-2*shadow)/nparts+2*shadow. The starpu_data_filter::filter_arg_ptr field\nof \\p f must be the shadow size casted into \\c void*.\n\nIMPORTANT: 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in 2 chunks of\nequal size, ignoring nparts. Thus, \\p id must be 0 or 1.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a vector. The starting\nposition is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_vector_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fvector_pick_variable.c\n\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_vector_filter_pick_variable().\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_matrix_z()\nand starpu_block_filter_pick_matrix_y().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a block. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_variable.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_variable().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, thus getting\n(x/\\p nparts ,y,z,t) tensors. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z,t) tensors. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, thus getting\n(x,y/\\p nparts ,z,t) tensors. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z,t) tensors. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, thus getting\n(x,y,z/\\p nparts,t) tensors. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow,t) tensors. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, thus getting\n(x,y,z,t/\\p nparts) tensors. If \\p nparts does not divide t, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,z,(t-2*shadow)/\\p nparts +2*shadow) tensors. If \\p nparts does not\ndivide t, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe T dimension. The starting position on T-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_t (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_block_t(),\nstarpu_tensor_filter_pick_block_z() and starpu_tensor_filter_pick_block_y().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a tensor. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_variable.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_variable().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg, with a shadow border\nstarpu_data_filter::filter_arg_ptr. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a 4-dim array into \\p nparts tensors along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_to_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor (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) ; } unsafe extern "C" { # [doc = "Partition a 3-dim array into \\p nparts blocks along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_block_child_ops(). A usage example is\navailable in examples/filters/fndim_to_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_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) ; } unsafe extern "C" { # [doc = "Partition a 2-dim array into \\p nparts matrices along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_to_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix (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) ; } unsafe extern "C" { # [doc = "Partition a 1-dim array into \\p nparts vectors.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_to_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector (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) ; } unsafe extern "C" { # [doc = "Transfer a 0-dim array to a variable.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_to_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous (n-1)dim arrays from a ndim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nA usage example is available in examples/filters/fndim_pick_ndim.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_ndim (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous tensors from a 5-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_5d_pick_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_5d_pick_tensor (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a 4-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/fndim_4d_pick_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_4d_pick_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a 3-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_3d_pick_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_3d_pick_matrix (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a 2-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_2d_pick_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_2d_pick_vector (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a 1-dim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_1d_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_1d_pick_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a ndim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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 blocksize, which is most often 1.\nSee \\ref DefiningANewDataFilter for more details."] 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 , blocksize : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_align (align : usize) ; } unsafe 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_noflag() function.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "@deprecated\nFree memory which has previously been allocated with\nstarpu_malloc(). This function is deprecated, one should use\nstarpu_free_noflag().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe extern "C" { # [doc = "Free memory by specifying its size. Should be used for memory\nallocated with starpu_malloc().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free_noflag (A : * mut :: std :: os :: raw :: c_void , dim : usize) -> :: 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 > ; unsafe 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().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on the node.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used (node : :: std :: os :: raw :: c_uint) -> usize ; } unsafe extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref DataManagementAllocation)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nDataManagementAllocation)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on all memory nodes.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used_all_nodes () -> usize ; } unsafe 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 -ENOMEM 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_sec seconds. Similar to calling Unix' \\c\nsleep function, except that it takes a float to allow sub-second\nsleeping, and when StarPU is compiled in SimGrid mode it does not\nreally sleep but just makes SimGrid record that the thread has\ntaken some time to sleep.\nSee \\ref Helpers for more details."] pub fn starpu_sleep (nb_sec : f32) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_micro_sec micro-seconds.\nIn simgrid mode, this only sleeps within virtual time.\nSee \\ref Helpers for more details."] pub fn starpu_usleep (nb_micro_sec : f32) ; } unsafe extern "C" { # [doc = "Account for \\p joules J being used.\nThis is support in simgrid mode, to record how much energy was used, and will\nshow up in further call to starpu_energy_used().\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_use (joules : f32) ; } unsafe extern "C" { # [doc = "Return the amount of energy having been used in J.\nThis account the amounts passed to starpu_energy_use(), but also the static\nenergy use set by the \\ref STARPU_IDLE_POWER environment variable.\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_used () -> f64 ; } # [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 ; unsafe 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) ; } unsafe 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 -EPERM, if\n\\p task was already submitted it returns -EINVAL."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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-ENOENT."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] 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]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\nNULL 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifier. It is possible to associate a task\nwith a unique tag 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 ; unsafe 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\nWARNING! Use with caution. 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\n0x200000003 instead of 0x2 and 0x3 when\ncalling starpu_tag_declare_deps(0x1, 2, 0x2, 0x3). 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } unsafe 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 structure starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled).\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Clear the already notified 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } unsafe 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().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } unsafe extern "C" { # [doc = "Return the task associated to the tag \\p id.\nSee \\ref TasksAndTagsDependencies for more details."] 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 submitted, 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 ; # [doc = "todo"] 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 = "HIP implementation of a codelet."] pub type starpu_hip_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 = "Maxeler FPGA implementation of a codelet."] pub type starpu_max_fpga_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 = "@ingroup API_Bubble Hierarchical Dags\nBubble decision function"] pub type starpu_bubble_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = "@ingroup API_Bubble Hierarchical Dags\nBubble DAG generation function"] pub type starpu_bubble_gen_dag_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_trs_epoch { _unused : [u8 ; 0] , } pub type starpu_trs_epoch_t = * mut _starpu_trs_epoch ; # [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.\n\nNote that the codelet structure needs to exist until the task is\nterminated. If dynamic codelet allocation is desired, release should be done\nno sooner than the starpu_task::callback_func callback time.\n\nIf the application wants to make the structure constant, it needs to be\nfilled exactly as StarPU expects:\n\n- starpu_codelet::cpu_funcs, starpu_codelet::cuda_funcs, etc. must be used instead\nof the deprecated starpu_codelet::cpu_func, starpu_codelet::cuda_func, etc.\n\n- the starpu_codelet::where field must be set.\n\nand additionally, starpu_codelet::checked must be set to 1 to tell StarPU\nthat the conditions above are properly met. Also, the \\ref\nSTARPU_CODELET_PROFILING environment variable must be set to 0.\nAn example is provided in tests/main/const_codelet.c"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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_HIP, ::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-NULL 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-NULL 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 HIP\nimplementations of the codelet. The functions must be\nhost-functions written in the HIP runtime API. Their\nprototype must be:\n\\code{.c}\nvoid hip_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::hip_funcs is ignored if ::STARPU_HIP does\nnot appear in the field starpu_codelet::where, it must be\nnon-NULL otherwise."] pub hip_funcs : [starpu_hip_func_t ; 4usize] , # [doc = "Optional array of flags for HIP execution. They specify\nsome semantic details about HIP kernel execution, such as\nasynchronous execution."] pub hip_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-NULL 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 the Maxeler FPGA\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid fpga_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 starpu_codelet::max_fpga_funcs is ignored if\n::STARPU_MAX_FPGA does not appear in the field\nstarpu_codelet::where, it must be non-NULL otherwise."] pub max_fpga_funcs : [starpu_max_fpga_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\nMPI MS devices for StarPU to simply look\nup the MPI MS function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional function to decide if the task is to be\ntransformed into a bubble"] pub bubble_func : starpu_bubble_func_t , # [doc = "Optional function to transform the task into a new graph"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\nvoid *buffers[] 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 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,\nand should not exceed \\ref STARPU_NMAXBUFS. If\ninsufficient, 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\ndata 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 data 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 NULL 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 (in J). This optional field is\nignored when set to NULL 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 ; 48usize] , # [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. Value 0 acts like if this field wasn't specified.\nColor representation is hex triplet (for example: 0xff0000 is red,\n0x0000ff is blue, 0xffa500 is orange, ...)."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL."] 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 , pub perf_counter_sample : * mut starpu_perf_counter_sample , pub perf_counter_values : * mut starpu_perf_counter_sample_cl_values , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet"] [:: std :: mem :: size_of :: < starpu_codelet > () - 832usize] ; ["Alignment of starpu_codelet"] [:: std :: mem :: align_of :: < starpu_codelet > () - 8usize] ; ["Offset of field: starpu_codelet::where_"] [:: std :: mem :: offset_of ! (starpu_codelet , where_) - 0usize] ; ["Offset of field: starpu_codelet::can_execute"] [:: std :: mem :: offset_of ! (starpu_codelet , can_execute) - 8usize] ; ["Offset of field: starpu_codelet::type_"] [:: std :: mem :: offset_of ! (starpu_codelet , type_) - 16usize] ; ["Offset of field: starpu_codelet::max_parallelism"] [:: std :: mem :: offset_of ! (starpu_codelet , max_parallelism) - 20usize] ; ["Offset of field: starpu_codelet::cpu_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_func) - 24usize] ; ["Offset of field: starpu_codelet::cuda_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_func) - 32usize] ; ["Offset of field: starpu_codelet::opencl_func"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_func) - 40usize] ; ["Offset of field: starpu_codelet::cpu_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs) - 48usize] ; ["Offset of field: starpu_codelet::cuda_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_funcs) - 80usize] ; ["Offset of field: starpu_codelet::cuda_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_flags) - 112usize] ; ["Offset of field: starpu_codelet::hip_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_funcs) - 120usize] ; ["Offset of field: starpu_codelet::hip_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_flags) - 152usize] ; ["Offset of field: starpu_codelet::opencl_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_funcs) - 160usize] ; ["Offset of field: starpu_codelet::opencl_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_flags) - 192usize] ; ["Offset of field: starpu_codelet::max_fpga_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , max_fpga_funcs) - 200usize] ; ["Offset of field: starpu_codelet::cpu_funcs_name"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs_name) - 232usize] ; ["Offset of field: starpu_codelet::bubble_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_func) - 264usize] ; ["Offset of field: starpu_codelet::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_gen_dag_func) - 272usize] ; ["Offset of field: starpu_codelet::nbuffers"] [:: std :: mem :: offset_of ! (starpu_codelet , nbuffers) - 280usize] ; ["Offset of field: starpu_codelet::modes"] [:: std :: mem :: offset_of ! (starpu_codelet , modes) - 284usize] ; ["Offset of field: starpu_codelet::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_modes) - 320usize] ; ["Offset of field: starpu_codelet::specific_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , specific_nodes) - 328usize] ; ["Offset of field: starpu_codelet::nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , nodes) - 332usize] ; ["Offset of field: starpu_codelet::dyn_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_nodes) - 368usize] ; ["Offset of field: starpu_codelet::model"] [:: std :: mem :: offset_of ! (starpu_codelet , model) - 376usize] ; ["Offset of field: starpu_codelet::energy_model"] [:: std :: mem :: offset_of ! (starpu_codelet , energy_model) - 384usize] ; ["Offset of field: starpu_codelet::per_worker_stats"] [:: std :: mem :: offset_of ! (starpu_codelet , per_worker_stats) - 392usize] ; ["Offset of field: starpu_codelet::name"] [:: std :: mem :: offset_of ! (starpu_codelet , name) - 776usize] ; ["Offset of field: starpu_codelet::color"] [:: std :: mem :: offset_of ! (starpu_codelet , color) - 784usize] ; ["Offset of field: starpu_codelet::callback_func"] [:: std :: mem :: offset_of ! (starpu_codelet , callback_func) - 792usize] ; ["Offset of field: starpu_codelet::flags"] [:: std :: mem :: offset_of ! (starpu_codelet , flags) - 800usize] ; ["Offset of field: starpu_codelet::perf_counter_sample"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_sample) - 808usize] ; ["Offset of field: starpu_codelet::perf_counter_values"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_values) - 816usize] ; ["Offset of field: starpu_codelet::checked"] [:: std :: mem :: offset_of ! (starpu_codelet , checked) - 824usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Codelet with empty function defined for all drivers"] pub static mut starpu_codelet_nop : starpu_codelet ; } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_descr"] [:: std :: mem :: size_of :: < starpu_data_descr > () - 16usize] ; ["Alignment of starpu_data_descr"] [:: std :: mem :: align_of :: < starpu_data_descr > () - 8usize] ; ["Offset of field: starpu_data_descr::handle"] [:: std :: mem :: offset_of ! (starpu_data_descr , handle) - 0usize] ; ["Offset of field: starpu_data_descr::mode"] [:: std :: mem :: offset_of ! (starpu_data_descr , mode) - 8usize] ; } ; 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)] 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 = "Optional file name where the task was submitted. This can be useful\nfor debugging purposes."] pub file : * const :: std :: os :: raw :: c_char , # [doc = "Optional line number where the task was submitted. This can be useful\nfor debugging purposes."] pub line : :: std :: os :: raw :: c_int , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to NULL,\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 data 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\ndata 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 insufficient, 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 needed 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 insufficient,\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 NULL. 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 pointer which points to the return value of submitted task.\nThe default value is NULL. starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be used to respectively\npack and unpack the return value into and form it. starpu_task::cl_ret\ncan be used for MPI support. The only requirement is that\nthe size of the return value must be set in starpu_task::cl_ret_size ."] pub cl_ret : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. The buffer of starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be allocated with\nthe starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret.\nstarpu_task::cl_ret_size can be used for MPI support."] pub cl_ret_size : usize , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *) which\nspecifies a possible callback. If this pointer is non-NULL,\nthe callback function is executed on the host after the execution of\nthe task. Contrary to starpu_task::callback_func, it is called\nbefore releasing tasks which depend on this task, so those cannot be\nalready executing. The callback is passed\nthe value contained in the starpu_task::epilogue_callback_arg field.\nNo callback is executed if the field is set to NULL.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EPILOGUE_CALLBACK followed by the function pointer."] pub epilogue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is NULL. This is\nthe pointer passed to the epilogue callback function. This field is\nignored if the field starpu_task::epilogue_callback_func is set to\nNULL."] pub epilogue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, the callback function is executed on the\nhost after the execution of the task. Contrary to\nstarpu_task::epilogue_callback, it is called after releasing\ntasks which depend on this task, so those\nmight 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 NULL.\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 NULL. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\nNULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void*)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 = "Transaction to which the task belongs, if any"] pub transaction : * mut starpu_transaction , # [doc = "Transaction epoch to which the task belongs, if any"] pub trs_epoch : starpu_trs_epoch_t , # [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 this task has failed and will thus have to be retried\n\nSet by StarPU."] pub failed : :: 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\nCall starpu_task_status_get_as_string() to get the status as a string.\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 NULL."] 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 starpu_perfmodel_plot, 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 in microseconds. 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 = "When using hierarchical dags, the job identifier of the\nbubble task which created the current task"] pub bubble_parent : :: std :: os :: raw :: c_ulong , # [doc = "When using hierarchical dags, a pointer to the bubble\ndecision function"] pub bubble_func : starpu_bubble_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble decision function"] pub bubble_func_arg : * mut :: std :: os :: raw :: c_void , # [doc = "When using hierarchical dags, a pointer to the bubble\nDAG generation function"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble DAG generation function"] pub bubble_gen_dag_func_arg : * mut :: std :: os :: raw :: c_void , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task"] [:: std :: mem :: size_of :: < starpu_task > () - 552usize] ; ["Alignment of starpu_task"] [:: std :: mem :: align_of :: < starpu_task > () - 8usize] ; ["Offset of field: starpu_task::name"] [:: std :: mem :: offset_of ! (starpu_task , name) - 0usize] ; ["Offset of field: starpu_task::file"] [:: std :: mem :: offset_of ! (starpu_task , file) - 8usize] ; ["Offset of field: starpu_task::line"] [:: std :: mem :: offset_of ! (starpu_task , line) - 16usize] ; ["Offset of field: starpu_task::cl"] [:: std :: mem :: offset_of ! (starpu_task , cl) - 24usize] ; ["Offset of field: starpu_task::where_"] [:: std :: mem :: offset_of ! (starpu_task , where_) - 32usize] ; ["Offset of field: starpu_task::nbuffers"] [:: std :: mem :: offset_of ! (starpu_task , nbuffers) - 36usize] ; ["Offset of field: starpu_task::dyn_handles"] [:: std :: mem :: offset_of ! (starpu_task , dyn_handles) - 40usize] ; ["Offset of field: starpu_task::dyn_interfaces"] [:: std :: mem :: offset_of ! (starpu_task , dyn_interfaces) - 48usize] ; ["Offset of field: starpu_task::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_task , dyn_modes) - 56usize] ; ["Offset of field: starpu_task::handles"] [:: std :: mem :: offset_of ! (starpu_task , handles) - 64usize] ; ["Offset of field: starpu_task::interfaces"] [:: std :: mem :: offset_of ! (starpu_task , interfaces) - 128usize] ; ["Offset of field: starpu_task::modes"] [:: std :: mem :: offset_of ! (starpu_task , modes) - 192usize] ; ["Offset of field: starpu_task::handles_sequential_consistency"] [:: std :: mem :: offset_of ! (starpu_task , handles_sequential_consistency) - 224usize] ; ["Offset of field: starpu_task::cl_arg"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg) - 232usize] ; ["Offset of field: starpu_task::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg_size) - 240usize] ; ["Offset of field: starpu_task::cl_ret"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret) - 248usize] ; ["Offset of field: starpu_task::cl_ret_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret_size) - 256usize] ; ["Offset of field: starpu_task::epilogue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_func) - 264usize] ; ["Offset of field: starpu_task::epilogue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_arg) - 272usize] ; ["Offset of field: starpu_task::callback_func"] [:: std :: mem :: offset_of ! (starpu_task , callback_func) - 280usize] ; ["Offset of field: starpu_task::callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , callback_arg) - 288usize] ; ["Offset of field: starpu_task::prologue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_func) - 296usize] ; ["Offset of field: starpu_task::prologue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_arg) - 304usize] ; ["Offset of field: starpu_task::prologue_callback_pop_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_func) - 312usize] ; ["Offset of field: starpu_task::prologue_callback_pop_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_arg) - 320usize] ; ["Offset of field: starpu_task::transaction"] [:: std :: mem :: offset_of ! (starpu_task , transaction) - 328usize] ; ["Offset of field: starpu_task::trs_epoch"] [:: std :: mem :: offset_of ! (starpu_task , trs_epoch) - 336usize] ; ["Offset of field: starpu_task::tag_id"] [:: std :: mem :: offset_of ! (starpu_task , tag_id) - 344usize] ; ["Offset of field: starpu_task::mf_skip"] [:: std :: mem :: offset_of ! (starpu_task , mf_skip) - 354usize] ; ["Offset of field: starpu_task::failed"] [:: std :: mem :: offset_of ! (starpu_task , failed) - 355usize] ; ["Offset of field: starpu_task::scheduled"] [:: std :: mem :: offset_of ! (starpu_task , scheduled) - 356usize] ; ["Offset of field: starpu_task::prefetched"] [:: std :: mem :: offset_of ! (starpu_task , prefetched) - 357usize] ; ["Offset of field: starpu_task::workerid"] [:: std :: mem :: offset_of ! (starpu_task , workerid) - 360usize] ; ["Offset of field: starpu_task::workerorder"] [:: std :: mem :: offset_of ! (starpu_task , workerorder) - 364usize] ; ["Offset of field: starpu_task::workerids"] [:: std :: mem :: offset_of ! (starpu_task , workerids) - 368usize] ; ["Offset of field: starpu_task::workerids_len"] [:: std :: mem :: offset_of ! (starpu_task , workerids_len) - 376usize] ; ["Offset of field: starpu_task::priority"] [:: std :: mem :: offset_of ! (starpu_task , priority) - 380usize] ; ["Offset of field: starpu_task::status"] [:: std :: mem :: offset_of ! (starpu_task , status) - 384usize] ; ["Offset of field: starpu_task::magic"] [:: std :: mem :: offset_of ! (starpu_task , magic) - 388usize] ; ["Offset of field: starpu_task::type_"] [:: std :: mem :: offset_of ! (starpu_task , type_) - 392usize] ; ["Offset of field: starpu_task::color"] [:: std :: mem :: offset_of ! (starpu_task , color) - 396usize] ; ["Offset of field: starpu_task::sched_ctx"] [:: std :: mem :: offset_of ! (starpu_task , sched_ctx) - 400usize] ; ["Offset of field: starpu_task::hypervisor_tag"] [:: std :: mem :: offset_of ! (starpu_task , hypervisor_tag) - 404usize] ; ["Offset of field: starpu_task::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_task , possibly_parallel) - 408usize] ; ["Offset of field: starpu_task::bundle"] [:: std :: mem :: offset_of ! (starpu_task , bundle) - 416usize] ; ["Offset of field: starpu_task::profiling_info"] [:: std :: mem :: offset_of ! (starpu_task , profiling_info) - 424usize] ; ["Offset of field: starpu_task::flops"] [:: std :: mem :: offset_of ! (starpu_task , flops) - 432usize] ; ["Offset of field: starpu_task::predicted"] [:: std :: mem :: offset_of ! (starpu_task , predicted) - 440usize] ; ["Offset of field: starpu_task::predicted_transfer"] [:: std :: mem :: offset_of ! (starpu_task , predicted_transfer) - 448usize] ; ["Offset of field: starpu_task::predicted_start"] [:: std :: mem :: offset_of ! (starpu_task , predicted_start) - 456usize] ; ["Offset of field: starpu_task::prev"] [:: std :: mem :: offset_of ! (starpu_task , prev) - 464usize] ; ["Offset of field: starpu_task::next"] [:: std :: mem :: offset_of ! (starpu_task , next) - 472usize] ; ["Offset of field: starpu_task::starpu_private"] [:: std :: mem :: offset_of ! (starpu_task , starpu_private) - 480usize] ; ["Offset of field: starpu_task::omp_task"] [:: std :: mem :: offset_of ! (starpu_task , omp_task) - 488usize] ; ["Offset of field: starpu_task::bubble_parent"] [:: std :: mem :: offset_of ! (starpu_task , bubble_parent) - 496usize] ; ["Offset of field: starpu_task::bubble_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func) - 504usize] ; ["Offset of field: starpu_task::bubble_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func_arg) - 512usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func) - 520usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func_arg) - 528usize] ; ["Offset of field: starpu_task::nb_termination_call_required"] [:: std :: mem :: offset_of ! (starpu_task , nb_termination_call_required) - 536usize] ; ["Offset of field: starpu_task::sched_data"] [:: std :: mem :: offset_of ! (starpu_task , sched_data) - 544usize] ; } ; 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 unsafe fn cl_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn cl_ret_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_cl_ret_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 unsafe fn cl_ret_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_ret_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn 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_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 unsafe fn callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn epilogue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_epilogue_callback_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 unsafe fn epilogue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_epilogue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 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 (4usize , 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 (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 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 (5usize , 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 (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_pop_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_pop_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 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 (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_tag_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_tag_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 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 (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn sequential_consistency_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_sequential_consistency_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 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 (8usize , 1u8 , val as u64) } } # [inline] pub unsafe fn synchronous_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 8usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_synchronous_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 8usize , 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 (9usize , 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 (9usize , 1u8 , val as u64) } } # [inline] pub unsafe fn execute_on_a_specific_worker_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 9usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_execute_on_a_specific_worker_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 9usize , 1u8 , val as u64 ,) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 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 (10usize , 1u8 , val as u64) } } # [inline] pub unsafe fn detach_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 10usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_detach_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 10usize , 1u8 , val as u64 ,) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 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 (11usize , 1u8 , val as u64) } } # [inline] pub unsafe fn destroy_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 11usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_destroy_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 11usize , 1u8 , val as u64 ,) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (12usize , 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 (12usize , 1u8 , val as u64) } } # [inline] pub unsafe fn regenerate_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 12usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_regenerate_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 12usize , 1u8 , val as u64 ,) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (13usize , 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 (13usize , 1u8 , val as u64) } } # [inline] pub unsafe fn no_submitorder_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 13usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_no_submitorder_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 13usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , cl_ret_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , epilogue_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 cl_ret_free : u32 = unsafe { :: std :: mem :: transmute (cl_ret_free) } ; cl_ret_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let epilogue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (epilogue_callback_arg_free) } ; epilogue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 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 (5usize , 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 (6usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (9usize , 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 (10usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (12usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (13usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } unsafe 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.\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_init (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_clean (task : * mut starpu_task) ; } unsafe 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().\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_create () -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Allocate a task structure that does nothing but accesses data \\p handle\nwith mode \\p mode. This allows to synchronize with the task graph, according\nto the sequential consistency, against tasks submitted before or after\nsubmitting this task. One can then use starpu_task_declare_deps_array() or\nstarpu_task_end_dep_add() / starpu_task_end_dep_release() to add dependencies\nagainst this task before submitting it.\nSee \\ref SynchronizationTasks for more details."] pub fn starpu_task_create_sync (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> * mut starpu_task ; } unsafe 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.\nSee \\ref Per-taskFeedback and \\ref PerformanceModelExample for more details."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Tell StarPU to free the resources associated with \\p task when the task is\nover. This is equivalent to having set task->destroy = 1 before submission,\nthe difference is that this can be called after submission and properly deals\nwith concurrency with the task execution.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_set_destroy (task : * mut starpu_task) ; } unsafe 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-ENODEV 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Submit \\p task to StarPU with dependency bypass.\n\nThis can only be called on behalf of another task which has already taken the\nproper dependencies, e.g. this task is just an attempt of doing the actual\ncomputation of that task.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_submit_nodeps (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingTasksToAContext for more details."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if \\p task is terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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, -EINVAL indicates that the\nspecified task was either synchronous or detached.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, -EINVAL indicates that\none of the tasks was either synchronous or detached.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowtoReuseMemory for more details."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] 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 ; } unsafe extern "C" { # [doc = "Wait until there is no more ready task.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_pop () ; } unsafe extern "C" { # [doc = "See \\ref GraphScheduling for more details."] pub fn starpu_do_schedule () ; } unsafe 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++.\nSee \\ref DefiningACodelet for more details."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl.\nSee \\ref Per-codeletFeedback for more details."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Return the task currently executed by the worker, or NULL 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.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_task_get_current () -> * mut starpu_task ; } unsafe 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.\n\nSee \\ref SpecifyingATargetNode for more details."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the name of the performance model of \\p task.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref TraceTaskDetails for more details."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Create and submit an empty task with the given callback.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Function to be used as a prologue callback to enable fault tolerance for the\ntask. This prologue will create a try-task, i.e a duplicate of the task,\nwhich will to the actual computation.\n\nThe prologue argument can be set to a check_ft function that will be\ncalled on termination of the duplicate, which can check the result of the\ntask, and either confirm success, or resubmit another attempt.\nIf it is not set, the default implementation is to just resubmit a new\ntry-task.\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_prologue (check_ft : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Create a try-task for a \\p meta_task, given a \\p template_task task\ntemplate. The meta task can be passed as template on the first call, but\nsince it is mangled by starpu_task_ft_create_retry(), further calls\n(typically made by the check_ft callback) need to be passed the previous\ntry-task as template task.\n\n\\p check_ft is similar to the prologue argument of\nstarpu_task_ft_prologue(), and is typically set to the very function calling\nstarpu_task_ft_create_retry().\n\nThe try-task is returned, and can be modified (e.g. to change scheduling\nparameters) before being submitted with starpu_task_submit_nodeps().\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_create_retry (meta_task : * const starpu_task , template_task : * const starpu_task , check_ft : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Record that this task failed, and should thus be retried.\nThis is usually called from the task codelet function itself, after checking\nthe result and noticing that the computation went wrong, and thus the task\nshould be retried. The performance of this task execution will not be\nrecorded for performance models.\n\nThis can only be called for a task whose data access modes are either\n::STARPU_R and ::STARPU_W."] pub fn starpu_task_ft_failed (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Notify that the try-task was successful and thus the meta-task was\nsuccessful.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_success (meta_task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for \\ref STARPU_WATCHDOG_TIMEOUT seconds.\nSee \\ref WatchdogSupport for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the given status as a string"] pub fn starpu_task_status_get_as_string (status : starpu_task_status) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Specify a minimum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MIN_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_min_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Specify a maximum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MAX_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_max_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Function to open a new transaction object and start the first transaction epoch.\n\n@return A pointer to an initializes struct starpu_transaction\nor \\c NULL if submitting the transaction begin task failed with \\c ENODEV.\nSee \\ref TransactionsCreation for more details."] pub fn starpu_transaction_open (do_start_func : :: std :: option :: Option < unsafe extern "C" fn (buffer : * mut :: std :: os :: raw :: c_void , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , do_start_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_transaction ; } unsafe extern "C" { # [doc = "Function to mark the end of the current transaction epoch and start a new epoch.\nSee \\ref TransactionsEpochNext for more details."] pub fn starpu_transaction_next_epoch (p_trs : * mut starpu_transaction , do_start_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Function to mark the end of the last transaction epoch and free the transaction object.\nSee \\ref TransactionsClosing for more details."] pub fn starpu_transaction_close (p_trs : * mut starpu_transaction) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; # [doc = "< CPU core"] pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; # [doc = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_RAM : starpu_node_kind = 4 ; # [doc = "< Disk memory"] pub const STARPU_DISK_RAM : starpu_node_kind = 5 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_RAM : starpu_node_kind = 7 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_RAM : starpu_node_kind = 8 ; # [doc = "< Maximum value of memory types"] pub const STARPU_MAX_RAM : starpu_node_kind = 8 ; # [doc = "< Number of memory types"] pub const STARPU_NRAM : starpu_node_kind = 9 ; # [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 = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_WORKER : starpu_worker_archtype = 4 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_WORKER : starpu_worker_archtype = 6 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_WORKER : starpu_worker_archtype = 7 ; # [doc = "< Number of arch types"] pub const STARPU_NARCH : starpu_worker_archtype = 8 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 255 ; # [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)] 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 ; 48usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_ctx_iterator"] [:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () - 80usize] ; ["Alignment of starpu_sched_ctx_iterator"] [:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::cursor"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , cursor) - 0usize] ; ["Offset of field: starpu_sched_ctx_iterator::value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , value) - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::possible_value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possible_value) - 16usize] ; ["Offset of field: starpu_sched_ctx_iterator::visited"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , visited) - 24usize] ; ["Offset of field: starpu_sched_ctx_iterator::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possibly_parallel) - 72usize] ; } ; 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)] 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 ; 48usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 48usize] , pub is_master : [:: std :: os :: raw :: c_char ; 48usize] , # [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 collection"] 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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_worker_collection"] [:: std :: mem :: size_of :: < starpu_worker_collection > () - 264usize] ; ["Alignment of starpu_worker_collection"] [:: std :: mem :: align_of :: < starpu_worker_collection > () - 8usize] ; ["Offset of field: starpu_worker_collection::workerids"] [:: std :: mem :: offset_of ! (starpu_worker_collection , workerids) - 0usize] ; ["Offset of field: starpu_worker_collection::collection_private"] [:: std :: mem :: offset_of ! (starpu_worker_collection , collection_private) - 8usize] ; ["Offset of field: starpu_worker_collection::nworkers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nworkers) - 16usize] ; ["Offset of field: starpu_worker_collection::unblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , unblocked_workers) - 24usize] ; ["Offset of field: starpu_worker_collection::nunblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nunblocked_workers) - 32usize] ; ["Offset of field: starpu_worker_collection::masters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , masters) - 40usize] ; ["Offset of field: starpu_worker_collection::nmasters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nmasters) - 48usize] ; ["Offset of field: starpu_worker_collection::present"] [:: std :: mem :: offset_of ! (starpu_worker_collection , present) - 52usize] ; ["Offset of field: starpu_worker_collection::is_unblocked"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_unblocked) - 100usize] ; ["Offset of field: starpu_worker_collection::is_master"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_master) - 148usize] ; ["Offset of field: starpu_worker_collection::type_"] [:: std :: mem :: offset_of ! (starpu_worker_collection , type_) - 196usize] ; ["Offset of field: starpu_worker_collection::has_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , has_next) - 200usize] ; ["Offset of field: starpu_worker_collection::get_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , get_next) - 208usize] ; ["Offset of field: starpu_worker_collection::add"] [:: std :: mem :: offset_of ! (starpu_worker_collection , add) - 216usize] ; ["Offset of field: starpu_worker_collection::remove"] [:: std :: mem :: offset_of ! (starpu_worker_collection , remove) - 224usize] ; ["Offset of field: starpu_worker_collection::init"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init) - 232usize] ; ["Offset of field: starpu_worker_collection::deinit"] [:: std :: mem :: offset_of ! (starpu_worker_collection , deinit) - 240usize] ; ["Offset of field: starpu_worker_collection::init_iterator"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator) - 248usize] ; ["Offset of field: starpu_worker_collection::init_iterator_for_parallel_tasks"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator_for_parallel_tasks) - 256usize] ; } ; 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 () } } } unsafe extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } unsafe extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } unsafe extern "C" { # [doc = "Wait for all workers to be initialised. Calling this function is\nnormally not necessary. It is called for example in\ntools/starpu_machine_display to make sure all workers\ninformation are correctly set before printing their information.\nSee \\ref PauseResume for more details."] pub fn starpu_worker_wait_for_initialisation () ; } unsafe extern "C" { # [doc = "Return true if type matches one of StarPU's defined worker architectures.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_archtype_is_valid (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Convert a mask of architectures to a worker archtype.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_arch_mask_to_worker_archtype (mask : :: std :: os :: raw :: c_uint) -> starpu_worker_archtype ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of HIP devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXHIPDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_hip_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of TCPIP Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_tcpip_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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).\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_sched_find_all_worker_combinations () ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\nNULL) value is returned in case of success, -EINVAL\nindicates that \\p type is not valid otherwise.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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-ERANGE 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return true if worker type can execute this task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_type_can_execute_task (worker_type : starpu_worker_archtype , task : * const starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all workers.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_all (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe extern "C" { # [doc = "Display on \\p output the number of workers of the given \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_count (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe 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 hwloc in case it is available.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devnum (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_subworkerid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return when the current task is expected to be finished.\n\nNote: the returned date should be used with caution since the task might very\nwell end just after this function returns.\n\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_worker_get_current_task_exp_end (workerid : :: std :: os :: raw :: c_uint , date : * mut timespec) ; } unsafe extern "C" { # [doc = "Return whether worker \\p workerid is currently blocked in a parallel task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return worker \\p type from a string.\nReturns STARPU_UNKNOWN_WORKER if the string doesn't match a worker type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_from_string (type_ : * const :: std :: os :: raw :: c_char) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string suitable for environment variable names (CPU, CUDA, etc.).\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_env_var (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe 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().\nSee \\ref InteroperabilityHWLOC for more details."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } unsafe extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to the worker \\p workerid.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } unsafe extern "C" { # [doc = "See \\ref TopologyMemory for more details."] pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the memory node associated to the current worker.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes of a given \\p kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count_by_kind (kind : starpu_node_kind) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Get the list of memory nodes of kind \\p kind.\nFill the array \\p memory_nodes_ids with the memory nodes numbers.\nThe argument \\p maxsize indicates the size of the array\n\\p memory_nodes_ids. The return value gives the number of node numbers\nthat were put in the array. -ERANGE is returned if \\p maxsize\nis lower than the number of memory nodes with the appropriate kind: in that\ncase, the array is filled with the \\p maxsize first elements. To avoid such\noverflows, the value of maxsize can be chosen by the means of function\nstarpu_memory_nodes_get_count_by_kind(), or by passing a value greater or\nequal to \\ref STARPU_MAXNODES.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_ids_by_type (kind : starpu_node_kind , memory_nodes_ids : * mut :: std :: os :: raw :: c_uint , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } unsafe extern "C" { # [doc = "Return the type of worker which operates on memory node kind \\p node_kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_worker_archtype (node_kind : starpu_node_kind) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the type of memory node that arch type \\p type operates on.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node_kind (type_ : starpu_worker_archtype) -> starpu_node_kind ; } unsafe 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 ; } unsafe 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 UINT_MAX-1 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_on () ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_off () ; } unsafe extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Acquire the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock_self () ; } unsafe extern "C" { # [doc = "Release the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock_self () ; } unsafe extern "C" { # [doc = "Return the number of different combined workers.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the current combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref Fork-modeParallelTasks and \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Register a new combined worker and get its identifier.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Get the description of a combined worker.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } unsafe 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).\nSee \\ref SchedulingHelpers for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_device"] [:: std :: mem :: size_of :: < starpu_perfmodel_device > () - 12usize] ; ["Alignment of starpu_perfmodel_device"] [:: std :: mem :: align_of :: < starpu_perfmodel_device > () - 4usize] ; ["Offset of field: starpu_perfmodel_device::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , type_) - 0usize] ; ["Offset of field: starpu_perfmodel_device::devid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , devid) - 4usize] ; ["Offset of field: starpu_perfmodel_device::ncores"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , ncores) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_arch > () - 16usize] ; ["Alignment of starpu_perfmodel_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_arch::ndevices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , ndevices) - 0usize] ; ["Offset of field: starpu_perfmodel_arch::devices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , devices) - 8usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_entry"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () - 88usize] ; ["Alignment of starpu_perfmodel_history_entry"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::mean"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , mean) - 0usize] ; ["Offset of field: starpu_perfmodel_history_entry::deviation"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , deviation) - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum) - 16usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum2) - 24usize] ; ["Offset of field: starpu_perfmodel_history_entry::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nsample) - 32usize] ; ["Offset of field: starpu_perfmodel_history_entry::nerror"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nerror) - 36usize] ; ["Offset of field: starpu_perfmodel_history_entry::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel_history_entry::size"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , size) - 48usize] ; ["Offset of field: starpu_perfmodel_history_entry::flops"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , flops) - 56usize] ; ["Offset of field: starpu_perfmodel_history_entry::duration"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , duration) - 64usize] ; ["Offset of field: starpu_perfmodel_history_entry::tag"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , tag) - 72usize] ; ["Offset of field: starpu_perfmodel_history_entry::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , parameters) - 80usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_list"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () - 16usize] ; ["Alignment of starpu_perfmodel_history_list"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_list::next"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , next) - 0usize] ; ["Offset of field: starpu_perfmodel_history_list::entry"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , entry) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_regression_model"] [:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () - 120usize] ; ["Alignment of starpu_perfmodel_regression_model"] [:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlny) - 0usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx) - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx2) - 16usize] ; ["Offset of field: starpu_perfmodel_regression_model::minx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , minx) - 24usize] ; ["Offset of field: starpu_perfmodel_regression_model::maxx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , maxx) - 32usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnxlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnxlny) - 40usize] ; ["Offset of field: starpu_perfmodel_regression_model::alpha"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , alpha) - 48usize] ; ["Offset of field: starpu_perfmodel_regression_model::beta"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , beta) - 56usize] ; ["Offset of field: starpu_perfmodel_regression_model::valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , valid) - 64usize] ; ["Offset of field: starpu_perfmodel_regression_model::a"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , a) - 72usize] ; ["Offset of field: starpu_perfmodel_regression_model::b"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , b) - 80usize] ; ["Offset of field: starpu_perfmodel_regression_model::c"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , c) - 88usize] ; ["Offset of field: starpu_perfmodel_regression_model::nl_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nl_valid) - 96usize] ; ["Offset of field: starpu_perfmodel_regression_model::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nsample) - 100usize] ; ["Offset of field: starpu_perfmodel_regression_model::coeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , coeff) - 104usize] ; ["Offset of field: starpu_perfmodel_regression_model::ncoeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , ncoeff) - 112usize] ; ["Offset of field: starpu_perfmodel_regression_model::multi_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , multi_valid) - 116usize] ; } ; 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)] 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_per_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () - 408usize] ; ["Alignment of starpu_perfmodel_per_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , cost_function) - 0usize] ; ["Offset of field: starpu_perfmodel_per_arch::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , size_base) - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::history"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , history) - 16usize] ; ["Offset of field: starpu_perfmodel_per_arch::list"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , list) - 24usize] ; ["Offset of field: starpu_perfmodel_per_arch::regression"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , regression) - 32usize] ; ["Offset of field: starpu_perfmodel_per_arch::debug_path"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , debug_path) - 152usize] ; } ; 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-worker cost model function"] pub const STARPU_PER_WORKER : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 2 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 3 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic linear regression-based cost model (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 7 ; # [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)] pub struct starpu_perfmodel { # [doc = "type of performance model\n\n- \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
\n- \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
\n- \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
\n- \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
\n
"] 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_PER_ARCH. 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_PER_WORKER. Take a task, a worker id and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that worker."] pub worker_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not NULL, 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 NULL, 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 = "name of the file storing the performance model. It is non\nNULL if the model has been loaded or stored in a file."] pub path : * mut :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel"] [:: std :: mem :: size_of :: < starpu_perfmodel > () - 128usize] ; ["Alignment of starpu_perfmodel"] [:: std :: mem :: align_of :: < starpu_perfmodel > () - 8usize] ; ["Offset of field: starpu_perfmodel::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel , type_) - 0usize] ; ["Offset of field: starpu_perfmodel::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , cost_function) - 8usize] ; ["Offset of field: starpu_perfmodel::arch_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , arch_cost_function) - 16usize] ; ["Offset of field: starpu_perfmodel::worker_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , worker_cost_function) - 24usize] ; ["Offset of field: starpu_perfmodel::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel , size_base) - 32usize] ; ["Offset of field: starpu_perfmodel::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel::symbol"] [:: std :: mem :: offset_of ! (starpu_perfmodel , symbol) - 48usize] ; ["Offset of field: starpu_perfmodel::path"] [:: std :: mem :: offset_of ! (starpu_perfmodel , path) - 56usize] ; ["Offset of field: starpu_perfmodel::is_loaded"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_loaded) - 64usize] ; ["Offset of field: starpu_perfmodel::benchmarking"] [:: std :: mem :: offset_of ! (starpu_perfmodel , benchmarking) - 68usize] ; ["Offset of field: starpu_perfmodel::is_init"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_init) - 72usize] ; ["Offset of field: starpu_perfmodel::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters) - 80usize] ; ["Offset of field: starpu_perfmodel::parameters_names"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters_names) - 88usize] ; ["Offset of field: starpu_perfmodel::nparameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , nparameters) - 96usize] ; ["Offset of field: starpu_perfmodel::combinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , combinations) - 104usize] ; ["Offset of field: starpu_perfmodel::ncombinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , ncombinations) - 112usize] ; ["Offset of field: starpu_perfmodel::state"] [:: std :: mem :: offset_of ! (starpu_perfmodel , state) - 120usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = "Deinitialize the \\p model performance model structure. You need to call this\nbefore deallocating the structure. You will probably want to call\nstarpu_perfmodel_unload_model() before calling this function, to save the perfmodel."] pub fn starpu_perfmodel_deinit (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_start - start counting hardware events in an event set\n\n- \\p workerid is the worker on which calibration is to be performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration will be run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_start (workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_stop - stop counting hardware events in an event set\n\n- \\p model is the energy performance model to be filled with the result\n- \\p task is a task specimen, so the performance model folds the result according to the parameter sizes of the task.\n- \\p nimpl is the implementation number run during calibration\n- \\p ntasks is the number of tasks run during calibration\n- \\p workerid is the worker on which calibration was performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration was run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_stop (model : * mut starpu_perfmodel , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint , ntasks : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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$STARPU_HOME/.starpu. 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Save the performance model in its file."] pub fn starpu_save_history_based_model (model : * mut starpu_perfmodel) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } unsafe 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 tools/starpu_perfmodel_display.c."] pub fn starpu_perfmodel_free_sampling () ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the estimated time in µs 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 ; } unsafe 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 () ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with one explicit\nmeasurement (in µs or J), 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.\n\nNote that this records only one measurement, and StarPU would ignore\nthe first measurement (since it is usually disturbed by library loading\netc.). Make sure to call this function several times to record all your\nmeasurements.\n\nYou can also call starpu_perfmodel_update_history_n() to directly provide an\naverage performed on several tasks.\n\nSee \\ref PerformanceModelCalibration for more details."] 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) ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with an explicit average measurement (in µs or J).\n\nThis is similar to starpu_perfmodel_update_history(), but records a batch of\n\\p number measurements provided as the average of the measurements \\p average_measured."] pub fn starpu_perfmodel_update_history_n (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 , average_measured : f64 , number : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the latency of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task_list"] [:: std :: mem :: size_of :: < starpu_task_list > () - 16usize] ; ["Alignment of starpu_task_list"] [:: std :: mem :: align_of :: < starpu_task_list > () - 8usize] ; ["Offset of field: starpu_task_list::head"] [:: std :: mem :: offset_of ! (starpu_task_list , head) - 0usize] ; ["Offset of field: starpu_task_list::tail"] [:: std :: mem :: offset_of ! (starpu_task_list , tail) - 8usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize a list structure.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } unsafe extern "C" { # [doc = "Push \\p task at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Push \\p task at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Get the front of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the back of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test if \\p list is empty.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Remove \\p task from \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Remove the element at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Remove the element at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the first task of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the end of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Move list from one head \\p lsrc to another \\p ldst.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } unsafe 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\n- ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n
- ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n
- ::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
- ::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
- 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
\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.\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Identical to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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\ntask->dyn_handles array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating task->dyn_handles 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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().\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [doc = "Structure to be used for starpu_codelet_pack_arg_init() & co, and\nstarpu_codelet_unpack_arg_init() & co. The contents is public,\nhowever users should not directly access it, but only use as a\nparameter to the appropriate functions."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub arg_buffer_used : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet_pack_arg_data"] [:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () - 40usize] ; ["Alignment of starpu_codelet_pack_arg_data"] [:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer) - 0usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_size"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_size) - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_used"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_used) - 16usize] ; ["Offset of field: starpu_codelet_pack_arg_data::current_offset"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , current_offset) - 24usize] ; ["Offset of field: starpu_codelet_pack_arg_data::nargs"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , nargs) - 32usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } unsafe extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times.\nSee \\ref InsertTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } unsafe extern "C" { # [doc = "Initialize \\p state with \\p cl_arg and \\p cl_arg_size. This has to\nbe called before calling starpu_codelet_unpack_arg().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_init (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut :: std :: os :: raw :: c_void , cl_arg_size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of size \\p size from \\p state into \\p ptr with a copy.\n\\p state has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr\nwith a copy. \\p ptr is allocated before copying in it the value of\nthe argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_dup_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr.\n\\p ptr will be a pointer to the memory of the argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pick_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Finish unpacking data, after calling starpu_codelet_unpack_arg_init()\nonce and starpu_codelet_unpack_arg() or starpu_codelet_dup_arg() or\nstarpu_codelet_pick_arg() several times.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_fini (state : * mut starpu_codelet_pack_arg_data) ; } unsafe extern "C" { # [doc = "Call this function during unpacking to skip saving the argument in ptr.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_discard_arg (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] 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\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here given the task
\n- starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here gives back the task to the core. It must not\naccess this task any more
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- 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.
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n\nNote: to get an estimation of the task duration, \\p perf_workerid\nneeds to be used rather than \\p workerid, for the case of parallel\ntasks."] 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 NULL, 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 = "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 = " Whether this scheduling policy does data prefetching, and thus the\ncore should not try to do it opportunistically."] pub prefetches : :: std :: os :: raw :: c_int , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_policy"] [:: std :: mem :: size_of :: < starpu_sched_policy > () - 128usize] ; ["Alignment of starpu_sched_policy"] [:: std :: mem :: align_of :: < starpu_sched_policy > () - 8usize] ; ["Offset of field: starpu_sched_policy::init_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , init_sched) - 0usize] ; ["Offset of field: starpu_sched_policy::deinit_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , deinit_sched) - 8usize] ; ["Offset of field: starpu_sched_policy::push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task) - 16usize] ; ["Offset of field: starpu_sched_policy::simulate_push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , simulate_push_task) - 24usize] ; ["Offset of field: starpu_sched_policy::push_task_notify"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task_notify) - 32usize] ; ["Offset of field: starpu_sched_policy::pop_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pop_task) - 40usize] ; ["Offset of field: starpu_sched_policy::submit_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , submit_hook) - 48usize] ; ["Offset of field: starpu_sched_policy::pre_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pre_exec_hook) - 56usize] ; ["Offset of field: starpu_sched_policy::post_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , post_exec_hook) - 64usize] ; ["Offset of field: starpu_sched_policy::do_schedule"] [:: std :: mem :: offset_of ! (starpu_sched_policy , do_schedule) - 72usize] ; ["Offset of field: starpu_sched_policy::add_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , add_workers) - 80usize] ; ["Offset of field: starpu_sched_policy::remove_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , remove_workers) - 88usize] ; ["Offset of field: starpu_sched_policy::prefetches"] [:: std :: mem :: offset_of ! (starpu_sched_policy , prefetches) - 96usize] ; ["Offset of field: starpu_sched_policy::policy_name"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_name) - 104usize] ; ["Offset of field: starpu_sched_policy::policy_description"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_description) - 112usize] ; ["Offset of field: starpu_sched_policy::worker_type"] [:: std :: mem :: offset_of ! (starpu_sched_policy , worker_type) - 120usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Return an NULL-terminated array of all the predefined\nscheduling policies.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a scheduling policy to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policy (name : * const :: std :: os :: raw :: c_char) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a list of scheduling policies to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the default context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the given context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy () -> * mut starpu_sched_policy ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the job identifier associated with the task.\nSee \\ref TraceSchedTaskDetails for more details."] pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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 impl_mask == NULL to check for at\nleast one implementation without determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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\nimpl_mask == NULL to check for at least one implementation\nwithout determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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. \\p back is ignored: the task priority is\nused to order tasks in this queue.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions.\nSee \\ref PerformanceModelExample for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions).\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds on a given architecture \\p arch using given implementation \\p nimpl.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_length() but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_length (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the durations using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the durations.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } unsafe extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return expected energy use in J.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_energy but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_energy (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task energy use in J, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the energy uses using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the energy uses.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only).\nSee \\ref SchedulingHelpers for more details."] 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) > ; unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "The scheduling policy should call this when it makes a scheduling decision\nfor a task. This will possibly stop execution at this point, and then the\nprogrammer can inspect local variables etc. to determine why this scheduling\ndecision was done.\n\nSee \\ref STARPU_TASK_BREAK_ON_SCHED\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_task_break (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n- ::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
\n- ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n
\n- ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n
\n- ::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
\n
\nSee \\ref CreatingAContext for more details."] 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto.\nSee \\ref SubmittingTasksToAContext and \\ref TmpCTXS for more details."] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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.\nSee \\ref EmptyingAContext for more details."] pub fn starpu_sched_ctx_stop_task_submission () ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the function associated with the scheduler context \\p\nsched_ctx_id which was given through the field\nstarpu_conf::sched_policy_callback"] pub fn starpu_sched_ctx_get_sched_policy_callback (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; unsafe extern "C" { # [doc = "Initialize HIPBLAS on every HIPdevice. The\nHIPBLAS library must be initialized prior to any HIPBLAS call. Calling\nstarpu_hipblas_init() will initialize HIPBLAS on every HIP device\ncontrolled by StarPU. This call blocks until HIPBLAS has been properly\ninitialized on every device."] pub fn starpu_hipblas_init () ; } pub type hipblasHandle_t = * mut :: std :: os :: raw :: c_void ; unsafe extern "C" { # [doc = "Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It\nis properly initialized and configured for multistream by\nstarpu_hipblas_init()."] pub fn starpu_hipblas_get_local_handle () -> hipblasHandle_t ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the HIPBLAS library on\nevery HIP device."] pub fn starpu_hipblas_shutdown () ; } unsafe 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. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_init () ; } unsafe 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().\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_set_stream () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device.\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_shutdown () ; } unsafe extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_init () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_shutdown () ; } unsafe extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Stop recording tasks\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_stop () ; } unsafe extern "C" { # [doc = "Emit the DAG that was recorded on \\p output.\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } unsafe 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. \\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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_lp (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_mps (output : * mut FILE) ; } unsafe 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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a pointer value seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_ptr (input : * mut :: std :: os :: raw :: c_void , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc current\nstate. The return value should be considered as the new current\nstate for future CRC computation. This is used for computing data\nsize footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] 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 , # [doc = " PAPI Events"] pub papi_values : [:: std :: os :: raw :: c_longlong ; 15usize] , pub papi_event_set : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_task_info"] [:: std :: mem :: size_of :: < starpu_profiling_task_info > () - 368usize] ; ["Alignment of starpu_profiling_task_info"] [:: std :: mem :: align_of :: < starpu_profiling_task_info > () - 8usize] ; ["Offset of field: starpu_profiling_task_info::submit_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , submit_time) - 0usize] ; ["Offset of field: starpu_profiling_task_info::push_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_start_time) - 16usize] ; ["Offset of field: starpu_profiling_task_info::push_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_end_time) - 32usize] ; ["Offset of field: starpu_profiling_task_info::pop_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_start_time) - 48usize] ; ["Offset of field: starpu_profiling_task_info::pop_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_end_time) - 64usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_start_time) - 80usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_end_time) - 96usize] ; ["Offset of field: starpu_profiling_task_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , start_time) - 112usize] ; ["Offset of field: starpu_profiling_task_info::end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , end_time) - 128usize] ; ["Offset of field: starpu_profiling_task_info::release_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_start_time) - 144usize] ; ["Offset of field: starpu_profiling_task_info::release_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_end_time) - 160usize] ; ["Offset of field: starpu_profiling_task_info::callback_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_start_time) - 176usize] ; ["Offset of field: starpu_profiling_task_info::callback_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_end_time) - 192usize] ; ["Offset of field: starpu_profiling_task_info::workerid"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , workerid) - 208usize] ; ["Offset of field: starpu_profiling_task_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , used_cycles) - 216usize] ; ["Offset of field: starpu_profiling_task_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , stall_cycles) - 224usize] ; ["Offset of field: starpu_profiling_task_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , energy_consumed) - 232usize] ; ["Offset of field: starpu_profiling_task_info::papi_values"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_values) - 240usize] ; ["Offset of field: starpu_profiling_task_info::papi_event_set"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_event_set) - 360usize] ; } ; 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: {:?}, papi_values: {:?}, papi_event_set: {:?} }}" , self . workerid , self . energy_consumed , self . papi_values , self . papi_event_set) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info().\n\nThe executing_time, callback_time, waiting_time, sleeping_time, and\nscheduling_time are exclusive to each other, i.e. they can be added up, their\nsum is smaller than total_time. The difference between total_time and the sum\nis the uncategorized runtime overhead."] # [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 by the worker to execute callbacks, while not executing a\n task, during the profiling measurement interval."] pub callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish,\n while not executing a task or a callback, during the profiling\n measurement interval."] pub waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available, and\n not executing a task or a callback or waiting for a data transfer to\n finish, during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks, while not executing a\n task or a callback or waiting for a data transfer to finish, and there\n are tasks to be scheduled, during the profiling measurement interval."] pub scheduling_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval.\n Normally always equal to executing_time."] pub all_executing_time : timespec , # [doc = " Time spent by the worker to execute callbacks during the profiling measurement interval.\n Normally always greater than callback_time."] pub all_callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval.\n Normally always greater than waiting_time."] pub all_waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available during the profiling measurement interval.\n Normally always greater than sleeping_time."] pub all_sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks during the profiling measurement interval.\n Normally always greater than scheduling_time."] pub all_scheduling_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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_worker_info"] [:: std :: mem :: size_of :: < starpu_profiling_worker_info > () - 232usize] ; ["Alignment of starpu_profiling_worker_info"] [:: std :: mem :: align_of :: < starpu_profiling_worker_info > () - 8usize] ; ["Offset of field: starpu_profiling_worker_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_worker_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_worker_info::executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executing_time) - 32usize] ; ["Offset of field: starpu_profiling_worker_info::callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , callback_time) - 48usize] ; ["Offset of field: starpu_profiling_worker_info::waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , waiting_time) - 64usize] ; ["Offset of field: starpu_profiling_worker_info::sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , sleeping_time) - 80usize] ; ["Offset of field: starpu_profiling_worker_info::scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , scheduling_time) - 96usize] ; ["Offset of field: starpu_profiling_worker_info::all_executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_executing_time) - 112usize] ; ["Offset of field: starpu_profiling_worker_info::all_callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_callback_time) - 128usize] ; ["Offset of field: starpu_profiling_worker_info::all_waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_waiting_time) - 144usize] ; ["Offset of field: starpu_profiling_worker_info::all_sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_sleeping_time) - 160usize] ; ["Offset of field: starpu_profiling_worker_info::all_scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_scheduling_time) - 176usize] ; ["Offset of field: starpu_profiling_worker_info::executed_tasks"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executed_tasks) - 192usize] ; ["Offset of field: starpu_profiling_worker_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , used_cycles) - 200usize] ; ["Offset of field: starpu_profiling_worker_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , stall_cycles) - 208usize] ; ["Offset of field: starpu_profiling_worker_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , energy_consumed) - 216usize] ; ["Offset of field: starpu_profiling_worker_info::flops"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , flops) - 224usize] ; } ; 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) } } # [doc = "todo"] # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_bus_info"] [:: std :: mem :: size_of :: < starpu_profiling_bus_info > () - 48usize] ; ["Alignment of starpu_profiling_bus_info"] [:: std :: mem :: align_of :: < starpu_profiling_bus_info > () - 8usize] ; ["Offset of field: starpu_profiling_bus_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_bus_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_bus_info::transferred_bytes"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transferred_bytes) - 32usize] ; ["Offset of field: starpu_profiling_bus_info::transfer_count"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transfer_count) - 40usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_init () ; } unsafe extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init().\nSee \\ref TraceMpi for more details."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } unsafe 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 NULL, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned.\nSee \\ref Per-workerFeedback for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of buses in the machine.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the source point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the destination point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref FeedBackFigures for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } unsafe extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_bus_helper_display_summary () ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_worker_helper_display_summary () ; } unsafe 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).\nSee \\ref MemoryFeedback for more details."] pub fn starpu_data_display_memory_stats () ; } pub const starpu_prof_tool_event_none : starpu_prof_tool_event = 0 ; pub const starpu_prof_tool_event_init : starpu_prof_tool_event = 1 ; pub const starpu_prof_tool_event_terminate : starpu_prof_tool_event = 2 ; pub const starpu_prof_tool_event_init_begin : starpu_prof_tool_event = 3 ; pub const starpu_prof_tool_event_init_end : starpu_prof_tool_event = 4 ; pub const starpu_prof_tool_event_driver_init : starpu_prof_tool_event = 5 ; pub const starpu_prof_tool_event_driver_deinit : starpu_prof_tool_event = 6 ; pub const starpu_prof_tool_event_driver_init_start : starpu_prof_tool_event = 7 ; pub const starpu_prof_tool_event_driver_init_end : starpu_prof_tool_event = 8 ; pub const starpu_prof_tool_event_start_cpu_exec : starpu_prof_tool_event = 9 ; pub const starpu_prof_tool_event_end_cpu_exec : starpu_prof_tool_event = 10 ; pub const starpu_prof_tool_event_start_gpu_exec : starpu_prof_tool_event = 11 ; pub const starpu_prof_tool_event_end_gpu_exec : starpu_prof_tool_event = 12 ; pub const starpu_prof_tool_event_start_transfer : starpu_prof_tool_event = 13 ; pub const starpu_prof_tool_event_end_transfer : starpu_prof_tool_event = 14 ; pub const starpu_prof_tool_event_user_start : starpu_prof_tool_event = 15 ; pub const starpu_prof_tool_event_user_end : starpu_prof_tool_event = 16 ; # [doc = "Event type"] pub type starpu_prof_tool_event = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_driver_cpu : starpu_prof_tool_driver_type = 0 ; pub const starpu_prof_tool_driver_gpu : starpu_prof_tool_driver_type = 1 ; pub const starpu_prof_tool_driver_hip : starpu_prof_tool_driver_type = 2 ; pub const starpu_prof_tool_driver_ocl : starpu_prof_tool_driver_type = 3 ; # [doc = "todo"] pub type starpu_prof_tool_driver_type = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_command_reg : starpu_prof_tool_command = 0 ; pub const starpu_prof_tool_command_toggle : starpu_prof_tool_command = 1 ; pub const starpu_prof_tool_command_toggle_per_thread : starpu_prof_tool_command = 2 ; # [doc = "todo"] pub type starpu_prof_tool_command = :: std :: os :: raw :: c_uint ; # [doc = "General information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_prof_tool_info { pub conf : * mut starpu_conf , pub event_type : starpu_prof_tool_event , pub starpu_version : [:: std :: os :: raw :: c_uint ; 3usize] , pub thread_id : :: std :: os :: raw :: c_int , pub worker_id : :: std :: os :: raw :: c_int , pub device_number : :: std :: os :: raw :: c_int , pub driver_type : starpu_prof_tool_driver_type , pub memnode : :: std :: os :: raw :: c_uint , pub bytes_to_transfer : :: std :: os :: raw :: c_uint , pub bytes_transfered : :: std :: os :: raw :: c_uint , pub fun_ptr : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_info > () - 64usize] ; ["Alignment of starpu_prof_tool_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_info > () - 8usize] ; ["Offset of field: starpu_prof_tool_info::conf"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , conf) - 0usize] ; ["Offset of field: starpu_prof_tool_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , event_type) - 8usize] ; ["Offset of field: starpu_prof_tool_info::starpu_version"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , starpu_version) - 12usize] ; ["Offset of field: starpu_prof_tool_info::thread_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , thread_id) - 24usize] ; ["Offset of field: starpu_prof_tool_info::worker_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , worker_id) - 28usize] ; ["Offset of field: starpu_prof_tool_info::device_number"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , device_number) - 32usize] ; ["Offset of field: starpu_prof_tool_info::driver_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , driver_type) - 36usize] ; ["Offset of field: starpu_prof_tool_info::memnode"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , memnode) - 40usize] ; ["Offset of field: starpu_prof_tool_info::bytes_to_transfer"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_to_transfer) - 44usize] ; ["Offset of field: starpu_prof_tool_info::bytes_transfered"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_transfered) - 48usize] ; ["Offset of field: starpu_prof_tool_info::fun_ptr"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , fun_ptr) - 56usize] ; } ; impl Default for starpu_prof_tool_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 () } } } # [doc = "Event info"] # [repr (C)] # [derive (Copy , Clone)] pub union starpu_prof_tool_event_info { pub event_type : starpu_prof_tool_event , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_event_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Alignment of starpu_prof_tool_event_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Offset of field: starpu_prof_tool_event_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_event_info , event_type) - 0usize] ; } ; impl Default for starpu_prof_tool_event_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_prof_tool_event_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_prof_tool_event_info {{ union }}") } } # [doc = "API info"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_prof_tool_api_info { } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_api_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_api_info > () - 0usize] ; ["Alignment of starpu_prof_tool_api_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_api_info > () - 1usize] ; } ; pub type starpu_prof_tool_cb_func = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_prof_tool_info , arg2 : * mut starpu_prof_tool_event_info , arg3 : * mut starpu_prof_tool_api_info) > ; # [doc = "Register / unregister events"] pub type starpu_prof_tool_entry_register_func = :: std :: option :: Option < unsafe extern "C" fn (event_type : starpu_prof_tool_event , cb : starpu_prof_tool_cb_func , info : starpu_prof_tool_command) > ; # [doc = "A function with this signature must be implemented by external tools that want to use the callbacks"] pub type starpu_prof_tool_entry_func = :: std :: option :: Option < unsafe extern "C" fn (reg : starpu_prof_tool_entry_register_func , unreg : starpu_prof_tool_entry_register_func) > ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 2048usize] , 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_codelet_event"] [:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () - 2328usize] ; ["Alignment of starpu_fxt_codelet_event"] [:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () - 8usize] ; ["Offset of field: starpu_fxt_codelet_event::symbol"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , symbol) - 0usize] ; ["Offset of field: starpu_fxt_codelet_event::workerid"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , workerid) - 2048usize] ; ["Offset of field: starpu_fxt_codelet_event::perfmodel_archname"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , perfmodel_archname) - 2052usize] ; ["Offset of field: starpu_fxt_codelet_event::hash"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , hash) - 2308usize] ; ["Offset of field: starpu_fxt_codelet_event::size"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , size) - 2312usize] ; ["Offset of field: starpu_fxt_codelet_event::time"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , time) - 2320usize] ; } ; 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 () } } } # [doc = "Store information related to clock synchronizations: mainly the offset to apply to each time."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_fxt_mpi_offset { # [doc = "< node time for the barrier at the beginning of the program"] pub local_time_start : u64 , # [doc = "< offset to apply to node time, computed at the beginning of the program"] pub offset_start : i64 , # [doc = "< node time for the barrier at the end of the program (optional)"] pub local_time_end : u64 , # [doc = "< offset to apply to node time, computed at the end of the program (optional)"] pub offset_end : i64 , # [doc = "< number of barriers to synchronize clocks during the execution of the program\n(can be 0, 1 or 2)"] pub nb_barriers : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_mpi_offset"] [:: std :: mem :: size_of :: < starpu_fxt_mpi_offset > () - 40usize] ; ["Alignment of starpu_fxt_mpi_offset"] [:: std :: mem :: align_of :: < starpu_fxt_mpi_offset > () - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_start) - 0usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_start) - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_end) - 16usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_end) - 24usize] ; ["Offset of field: starpu_fxt_mpi_offset::nb_barriers"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , nb_barriers) - 32usize] ; } ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 sched_tasks_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 papi_path : * mut :: std :: os :: raw :: c_char , pub comms_path : * mut :: std :: os :: raw :: c_char , pub number_events_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 , pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 48usize] , pub nworkers : :: std :: os :: raw :: c_int , pub worker_archtypes : [starpu_perfmodel_arch ; 48usize] , # [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 synchronize clocks and apply an offset."] pub file_offset : starpu_fxt_mpi_offset , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), this variable stores the MPI rank of the trace file."] pub file_rank : :: 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, number\nof dumped codelets."] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_options"] [:: std :: mem :: size_of :: < starpu_fxt_options > () - 13800usize] ; ["Alignment of starpu_fxt_options"] [:: std :: mem :: align_of :: < starpu_fxt_options > () - 8usize] ; ["Offset of field: starpu_fxt_options::per_task_colour"] [:: std :: mem :: offset_of ! (starpu_fxt_options , per_task_colour) - 0usize] ; ["Offset of field: starpu_fxt_options::no_events"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_events) - 4usize] ; ["Offset of field: starpu_fxt_options::no_counter"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_counter) - 8usize] ; ["Offset of field: starpu_fxt_options::no_bus"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_bus) - 12usize] ; ["Offset of field: starpu_fxt_options::no_flops"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_flops) - 16usize] ; ["Offset of field: starpu_fxt_options::ninputfiles"] [:: std :: mem :: offset_of ! (starpu_fxt_options , ninputfiles) - 20usize] ; ["Offset of field: starpu_fxt_options::no_smooth"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_smooth) - 24usize] ; ["Offset of field: starpu_fxt_options::no_acquire"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_acquire) - 28usize] ; ["Offset of field: starpu_fxt_options::memory_states"] [:: std :: mem :: offset_of ! (starpu_fxt_options , memory_states) - 32usize] ; ["Offset of field: starpu_fxt_options::internal"] [:: std :: mem :: offset_of ! (starpu_fxt_options , internal) - 36usize] ; ["Offset of field: starpu_fxt_options::label_deps"] [:: std :: mem :: offset_of ! (starpu_fxt_options , label_deps) - 40usize] ; ["Offset of field: starpu_fxt_options::filenames"] [:: std :: mem :: offset_of ! (starpu_fxt_options , filenames) - 48usize] ; ["Offset of field: starpu_fxt_options::out_paje_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , out_paje_path) - 560usize] ; ["Offset of field: starpu_fxt_options::distrib_time_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , distrib_time_path) - 568usize] ; ["Offset of field: starpu_fxt_options::activity_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , activity_path) - 576usize] ; ["Offset of field: starpu_fxt_options::sched_tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , sched_tasks_path) - 584usize] ; ["Offset of field: starpu_fxt_options::dag_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dag_path) - 592usize] ; ["Offset of field: starpu_fxt_options::tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , tasks_path) - 600usize] ; ["Offset of field: starpu_fxt_options::data_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , data_path) - 608usize] ; ["Offset of field: starpu_fxt_options::papi_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , papi_path) - 616usize] ; ["Offset of field: starpu_fxt_options::comms_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , comms_path) - 624usize] ; ["Offset of field: starpu_fxt_options::number_events_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , number_events_path) - 632usize] ; ["Offset of field: starpu_fxt_options::anim_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , anim_path) - 640usize] ; ["Offset of field: starpu_fxt_options::states_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , states_path) - 648usize] ; ["Offset of field: starpu_fxt_options::dir"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dir) - 656usize] ; ["Offset of field: starpu_fxt_options::worker_names"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_names) - 664usize] ; ["Offset of field: starpu_fxt_options::nworkers"] [:: std :: mem :: offset_of ! (starpu_fxt_options , nworkers) - 12952usize] ; ["Offset of field: starpu_fxt_options::worker_archtypes"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_archtypes) - 12960usize] ; ["Offset of field: starpu_fxt_options::file_prefix"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_prefix) - 13728usize] ; ["Offset of field: starpu_fxt_options::file_offset"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_offset) - 13736usize] ; ["Offset of field: starpu_fxt_options::file_rank"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_rank) - 13776usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets) - 13784usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets_count"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets_count) - 13792usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } unsafe 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.\nThis function has to be called before starpu_init().\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_start_profiling () ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_stop_profiling () ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace_in_dir (filename_in : * mut :: std :: os :: raw :: c_char , dir : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } unsafe extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Pre-initialize drivers\nSo as to register information on device types, memory types, etc.\nOnly use internally by StarPU."] pub fn starpu_drivers_preinit () ; } # [doc = "structure for designating a given driver. See \\ref UsingTheDriverAPI for more details."] # [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 hip_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver__bindgen_ty_1"] [:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Alignment of starpu_driver__bindgen_ty_1"] [:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cpu_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cpu_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cuda_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cuda_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::hip_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , hip_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::opencl_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , opencl_id) - 0usize] ; } ; 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 }}") } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver"] [:: std :: mem :: size_of :: < starpu_driver > () - 16usize] ; ["Alignment of starpu_driver"] [:: std :: mem :: align_of :: < starpu_driver > () - 8usize] ; ["Offset of field: starpu_driver::type_"] [:: std :: mem :: offset_of ! (starpu_driver , type_) - 0usize] ; ["Offset of field: starpu_driver::id"] [:: std :: mem :: offset_of ! (starpu_driver , id) - 8usize] ; } ; 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) } } unsafe 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-EINVAL 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().\n\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Notify all running drivers that they should terminate.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_drivers_request_termination () ; } unsafe extern "C" { # [doc = "Initialize the given driver. Return 0 on success, -EINVAL\nif starpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Run the driver once, then return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tree"] [:: std :: mem :: size_of :: < starpu_tree > () - 32usize] ; ["Alignment of starpu_tree"] [:: std :: mem :: align_of :: < starpu_tree > () - 8usize] ; ["Offset of field: starpu_tree::nodes"] [:: std :: mem :: offset_of ! (starpu_tree , nodes) - 0usize] ; ["Offset of field: starpu_tree::father"] [:: std :: mem :: offset_of ! (starpu_tree , father) - 8usize] ; ["Offset of field: starpu_tree::arity"] [:: std :: mem :: offset_of ! (starpu_tree , arity) - 16usize] ; ["Offset of field: starpu_tree::id"] [:: std :: mem :: offset_of ! (starpu_tree , id) - 20usize] ; ["Offset of field: starpu_tree::level"] [:: std :: mem :: offset_of ! (starpu_tree , level) - 24usize] ; ["Offset of field: starpu_tree::is_pu"] [:: std :: mem :: offset_of ! (starpu_tree , is_pu) - 28usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } unsafe 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 ; } unsafe 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)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_lock_t > () - 8usize] ; ["Alignment of starpu_omp_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_lock_t , internal) - 0usize] ; } ; 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)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_nest_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Alignment of starpu_omp_nest_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_nest_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_nest_lock_t , internal) - 0usize] ; } ; 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 chosen 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)] 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 pragma omp parallel 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_parallel_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () - 872usize] ; ["Alignment of starpu_omp_parallel_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_parallel_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_parallel_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , if_clause) - 860usize] ; ["Offset of field: starpu_omp_parallel_region_attr::num_threads"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , num_threads) - 864usize] ; } ; 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)] 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 pragma omp task is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding pragma omp task is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding pragma omp task is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding pragma omp task 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_task_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () - 936usize] ; ["Alignment of starpu_omp_task_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_task_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_task_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_task_region_attr::priority"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , priority) - 860usize] ; ["Offset of field: starpu_omp_task_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , if_clause) - 864usize] ; ["Offset of field: starpu_omp_task_region_attr::final_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , final_clause) - 868usize] ; ["Offset of field: starpu_omp_task_region_attr::untied_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , untied_clause) - 872usize] ; ["Offset of field: starpu_omp_task_region_attr::mergeable_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , mergeable_clause) - 876usize] ; ["Offset of field: starpu_omp_task_region_attr::is_loop"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , is_loop) - 880usize] ; ["Offset of field: starpu_omp_task_region_attr::nogroup_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nogroup_clause) - 884usize] ; ["Offset of field: starpu_omp_task_region_attr::collapse"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , collapse) - 888usize] ; ["Offset of field: starpu_omp_task_region_attr::num_tasks"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , num_tasks) - 892usize] ; ["Offset of field: starpu_omp_task_region_attr::nb_iterations"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nb_iterations) - 896usize] ; ["Offset of field: starpu_omp_task_region_attr::grainsize"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , grainsize) - 904usize] ; ["Offset of field: starpu_omp_task_region_attr::begin_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , begin_i) - 912usize] ; ["Offset of field: starpu_omp_task_region_attr::end_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , end_i) - 920usize] ; ["Offset of field: starpu_omp_task_region_attr::chunk"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , chunk) - 928usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_shutdown () ; } unsafe 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 \\#pragma omp parallel.\nSee \\ref OMPParallel for more details."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } unsafe 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 \\#pragma omp master.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp master without code\noutlining.\n\\return !0 if called by the region's master thread.\n\\return 0 if not called by the region's master thread.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp barrier.\nSee \\ref OMPBarrier for more details."] pub fn starpu_omp_barrier () ; } unsafe 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 name == NULL, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement \\#pragma omp\ncritical.\n\nSee \\ref OMPCritical for more details."] 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) ; } unsafe 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 name == NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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\nname==NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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(nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp single.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single without code\noutlining.\n\\return !0 if the calling thread has won the election.\n\\return 0 if the calling thread has lost the election.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp single 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\n\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and NULL for\nthe task that won the election. This function can be used to implement\n\\#pragma omp single with a copyprivate clause without code outlining.\n\nReturn the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\nReturn NULL 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\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_end () ; } unsafe 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 \\#pragma omp for 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(ordered==!0) or not (ordered==0). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(nowait==0) or not (nowait==!0).\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 \\#pragma omp for.\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for.\n\n\\sa starpu_omp_for\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp ordered.\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_begin () ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_end () ; } unsafe 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 (nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp sections and \\#pragma omp section.\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp sections and \\#pragma omp section.\n\n\\sa starpu_omp_sections\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp task.\n\nSee \\ref OMPTaskExplicit for more details."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } unsafe 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 \\#pragma omp taskwait.\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskwait () ; } unsafe 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 \\#pragma omp taskgroup.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] 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) ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_begin () ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_end () ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return !0 if called from a parallel region scope.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return !0 if dynamic thread number adjustment is enabled.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_dynamic\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return !0 if nested parallel sections are enabled.\n\\return 0 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the state of the cancel ICVS var.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } unsafe 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 information such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } unsafe 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 1 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return !0 if called from a final task.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } unsafe extern "C" { # [doc = "Return the number of places available to the execution environment in the place list.\n\n\\return the number of places available to the execution environment in the place list.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of processors available to the execution environment in the specified place.\n\n\\return the number of processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the numerical identifiers of the processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the place number of the place to which the encountering thread is bound.\n\n\\return the place number of the place to which the encountering thread is bound.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of places in the place partition of the innermost implicit task.\n\n\\return the number of places in the place partition of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current device is the initial device or not.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a device number that represents the host device.\n\n\\return a device number that represents the host device.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return !0 if called from the host device.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } unsafe extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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 !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 () ; } unsafe 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 () ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtime () -> f64 ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtick () -> f64 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Only use internally by StarPU."] pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } unsafe extern "C" { # [doc = "Register a handle for ptr->handle data lookup.\n\n\\sa starpu_omp_handle_unregister\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_register (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Unregister a handle from ptr->handle data lookup.\n\n\\sa starpu_omp_handle_register\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_unregister (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer.\n\n\\return the handle or \\c NULL if not found.\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_bitmap { pub bits : [:: std :: os :: raw :: c_ulong ; 1usize] , pub cardinal : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bitmap"] [:: std :: mem :: size_of :: < starpu_bitmap > () - 16usize] ; ["Alignment of starpu_bitmap"] [:: std :: mem :: align_of :: < starpu_bitmap > () - 8usize] ; ["Offset of field: starpu_bitmap::bits"] [:: std :: mem :: offset_of ! (starpu_bitmap , bits) - 0usize] ; ["Offset of field: starpu_bitmap::cardinal"] [:: std :: mem :: offset_of ! (starpu_bitmap , cardinal) - 8usize] ; } ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_OPENMP : starpu_parallel_worker_types = 0 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_INTEL_OPENMP_MKL : starpu_parallel_worker_types = 1 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_GNU_OPENMP_MKL : starpu_parallel_worker_types = 2 ; # [doc = "These represent the default available functions to enforce parallel_worker\nuse by the sub-runtime"] pub type starpu_parallel_worker_types = :: std :: os :: raw :: c_uint ; # [doc = "Parallel_Worker configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_parallel_worker_config { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Create parallel_workers on the machine with the given parameters.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_init (parallel_worker_level : hwloc_obj_type_t , ...) -> * mut starpu_parallel_worker_config ; } unsafe extern "C" { # [doc = "Delete the given parallel_workers configuration"] pub fn starpu_parallel_worker_shutdown (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print the given parallel_workers configuration.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_print (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " Prologue functions"] pub fn starpu_parallel_worker_openmp_prologue (arg1 : * mut :: std :: os :: raw :: c_void) ; } # [doc = "< deprecated"] pub const STARPU_CLUSTER_OPENMP : starpu_cluster_types = 0 ; # [doc = "< deprecated"] pub const STARPU_CLUSTER_INTEL_OPENMP_MKL : starpu_cluster_types = 1 ; # [doc = "@deprecated Use ::starpu_parallel_worker_types"] pub type starpu_cluster_types = :: std :: os :: raw :: c_uint ; # [doc = " @deprecated Use starpu_parallel_worker_config"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_cluster_machine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_init()"] pub fn starpu_cluster_machine (cluster_level : hwloc_obj_type_t , ...) -> * mut starpu_cluster_machine ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_shutdown()"] pub fn starpu_uncluster_machine (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_print()"] pub fn starpu_cluster_print (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } # [doc = "< undefined scope"] pub const starpu_perf_counter_scope_undefined : starpu_perf_counter_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_counter_scope_global : starpu_perf_counter_scope = 2 ; # [doc = "< per-worker scope"] pub const starpu_perf_counter_scope_per_worker : starpu_perf_counter_scope = 4 ; # [doc = "< per-codelet scope"] pub const starpu_perf_counter_scope_per_codelet : starpu_perf_counter_scope = 6 ; # [doc = "Enum of all possible performance counter scopes."] pub type starpu_perf_counter_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_counter_type_undefined : starpu_perf_counter_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_counter_type_int32 : starpu_perf_counter_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_counter_type_int64 : starpu_perf_counter_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_counter_type_float : starpu_perf_counter_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_counter_type_double : starpu_perf_counter_type = 4 ; # [doc = "Enum of all possible performance counter value type."] pub type starpu_perf_counter_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_listener { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_sample { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_set { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Start collecting performance counter values."] pub fn starpu_perf_counter_collection_start () ; } unsafe extern "C" { # [doc = "Stop collecting performance counter values."] pub fn starpu_perf_counter_collection_stop () ; } unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_counter_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_counter_scope_id_to_name (scope : starpu_perf_counter_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_counter_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_counter_type_id_to_name (type_ : starpu_perf_counter_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance counters for the given scope."] pub fn starpu_perf_counter_nb (scope : starpu_perf_counter_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter name to its id."] pub fn starpu_perf_counter_name_to_id (scope : starpu_perf_counter_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter rank in its scope to its counter id."] pub fn starpu_perf_counter_nth_to_id (scope : starpu_perf_counter_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a counter id to its name constant string."] pub fn starpu_perf_counter_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the counter's type id."] pub fn starpu_perf_counter_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the counter's help string."] pub fn starpu_perf_counter_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of counters defined in the given scope."] pub fn starpu_perf_counter_list_avail (scope : starpu_perf_counter_scope) ; } unsafe extern "C" { # [doc = "Display the list of counters defined in all scopes."] pub fn starpu_perf_counter_list_all_avail () ; } unsafe extern "C" { # [doc = "Allocate a new performance counter set."] pub fn starpu_perf_counter_set_alloc (scope : starpu_perf_counter_scope) -> * mut starpu_perf_counter_set ; } unsafe extern "C" { # [doc = "Free a performance counter set."] pub fn starpu_perf_counter_set_free (set : * mut starpu_perf_counter_set) ; } unsafe extern "C" { # [doc = "Enable a given counter in the set."] pub fn starpu_perf_counter_set_enable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Disable a given counter in the set."] pub fn starpu_perf_counter_set_disable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Initialize a new performance counter listener."] pub fn starpu_perf_counter_listener_init (set : * mut starpu_perf_counter_set , callback : :: std :: option :: Option < unsafe extern "C" fn (listener : * mut starpu_perf_counter_listener , sample : * mut starpu_perf_counter_sample , context : * mut :: std :: os :: raw :: c_void) > , user_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_perf_counter_listener ; } unsafe extern "C" { # [doc = "End a performance counter listener."] pub fn starpu_perf_counter_listener_exit (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the global scope."] pub fn starpu_perf_counter_set_global_listener (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the per_worker scope on a given worker."] pub fn starpu_perf_counter_set_per_worker_listener (workerid : :: std :: os :: raw :: c_uint , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a common listener for all workers."] pub fn starpu_perf_counter_set_all_per_worker_listeners (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a per_codelet listener for a codelet."] pub fn starpu_perf_counter_set_per_codelet_listener (cl : * mut starpu_codelet , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Unset the global listener."] pub fn starpu_perf_counter_unset_global_listener () ; } unsafe extern "C" { # [doc = "Unset the per_worker listener."] pub fn starpu_perf_counter_unset_per_worker_listener (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Unset all per_worker listeners."] pub fn starpu_perf_counter_unset_all_per_worker_listeners () ; } unsafe extern "C" { # [doc = "Unset a per_codelet listener."] pub fn starpu_perf_counter_unset_per_codelet_listener (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Read an int32 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int32_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Read an int64 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int64_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Read a float counter value from a sample."] pub fn starpu_perf_counter_sample_get_float_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Read a double counter value from a sample."] pub fn starpu_perf_counter_sample_get_double_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f64 ; } # [doc = "< undefined scope"] pub const starpu_perf_knob_scope_undefined : starpu_perf_knob_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_knob_scope_global : starpu_perf_knob_scope = 1 ; # [doc = "< per-worker scope"] pub const starpu_perf_knob_scope_per_worker : starpu_perf_knob_scope = 3 ; # [doc = "< per-scheduler scope"] pub const starpu_perf_knob_scope_per_scheduler : starpu_perf_knob_scope = 5 ; # [doc = "Enum of all possible performance knob scopes."] pub type starpu_perf_knob_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_knob_type_undefined : starpu_perf_knob_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_knob_type_int32 : starpu_perf_knob_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_knob_type_int64 : starpu_perf_knob_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_knob_type_float : starpu_perf_knob_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_knob_type_double : starpu_perf_knob_type = 4 ; # [doc = "Enum of all possible performance knob value type."] pub type starpu_perf_knob_type = :: std :: os :: raw :: c_uint ; unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_knob_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_knob_scope_id_to_name (scope : starpu_perf_knob_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_knob_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_knob_type_id_to_name (type_ : starpu_perf_knob_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance steering knobs for the given scope."] pub fn starpu_perf_knob_nb (scope : starpu_perf_knob_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_name_to_id (scope : starpu_perf_knob_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_nth_to_id (scope : starpu_perf_knob_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob rank in its scope to its knob id."] pub fn starpu_perf_knob_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate a knob id to its name constant string."] pub fn starpu_perf_knob_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the knob's help string."] pub fn starpu_perf_knob_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in the given scope."] pub fn starpu_perf_knob_list_avail (scope : starpu_perf_knob_scope) ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in all scopes."] pub fn starpu_perf_knob_list_all_avail () ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int32_value (knob_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int64_value (knob_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_float_value (knob_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_double_value (knob_id : :: std :: os :: raw :: c_int) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int32_value (knob_id : :: std :: os :: raw :: c_int , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int64_value (knob_id : :: std :: os :: raw :: c_int , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float knob value for Global scope."] pub fn starpu_perf_knob_set_global_float_value (knob_id : :: std :: os :: raw :: c_int , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double knob value for Global scope."] pub fn starpu_perf_knob_set_global_double_value (knob_id : :: std :: os :: raw :: c_int , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f64) ; } # [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 unless\nstarpu_conf::precedence_over_environment_variables is set."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 =\nNULL)."] 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 = NULL)"] pub sched_policy : * mut starpu_sched_policy , # [doc = "Callback function that can later be used by the scheduler.\nThe scheduler can retrieve this function by calling\nstarpu_sched_ctx_get_sched_policy_callback()"] pub sched_policy_callback : :: 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 = \\c -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 = \\c -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of HIP devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NHIP.\n(default = \\c -1)"] pub nhip : :: 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 = \\c -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of Maxeler FPGA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NMAX_FPGA.\n(default = -1)"] pub nmax_fpga : :: 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 = \\c -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "Number of TCP/IP Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NTCPIP_MS.\n(default = \\c -1)"] pub ntcpip_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 = \\c 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 \\c hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the HIP workers will be attached to\nthe HIP devices specified in the\nstarpu_conf::workers_hip_gpuid array. Otherwise, StarPU\naffects the HIP devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_HIPID.\n(default = \\c 0)"] pub use_explicit_workers_hip_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_hip_gpuid flag is\nset, this array contains the logical identifiers of the\nHIP devices (as used by \\c hipGetDevice())."] pub workers_hip_gpuid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the Maxeler FPGA workers will be attached to\nthe Maxeler FPGA devices specified in the\nstarpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU\naffects the Maxeler FPGA devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_MAX_FPGAID.\n(default = 0)"] pub use_explicit_workers_max_fpga_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag\nis set, this array contains the logical identifiers of the\nMaxeler FPGA devices to be used."] pub workers_max_fpga_deviceid : [:: std :: os :: raw :: c_uint ; 48usize] , pub max_fpga_load : * mut :: std :: os :: raw :: c_void , # [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 = \\c 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 ; 48usize] , # [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 = \\c 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 = \\c 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to enforce data locality when\nchoosing a worker to execute a task.\nThis can also be specified with the environment variable\n\\ref STARPU_DATA_LOCALITY_ENFORCE.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\nenable-data-locality-enforce \"--enable-data-locality-enforce\".\n(default = \\c 0)"] pub data_locality_enforce : :: 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 = \\c 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [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 = \\c 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 = \\c 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 HIP accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-hip-copy\n\"--disable-asynchronous-hip-copy\".\n(default = \\c 0)"] pub disable_asynchronous_hip_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 = \\c 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 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 = \\c 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and TCP/IP Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-tcpip-master-slave-copy\n\"--disable-asynchronous-tcpip-master-slave-copy\".\n(default = \\c 0)."] pub disable_asynchronous_tcpip_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and Maxeler FPGA devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-fpga-copy\n\"--disable-asynchronous-fpga-copy\".\n(default = 0)."] pub disable_asynchronous_max_fpga_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable memory mapping\nsupport between memory nodes. This can also be specified\nwith the environment variable \\ref STARPU_ENABLE_MAP."] pub enable_map : :: 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 = NULL)"] 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 = NULL)"] 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 = \\c 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 , # [doc = "Set the minimum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MIN_PRIO"] pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , # [doc = "Set the maximum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MAX_PRIO"] pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch \\c SIGINT, \\c SIGSEGV and \\c 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 caught. 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 = "Specify whether StarPU should automatically start to collect\nperformance counters after initialization"] pub start_perf_counter_collection : :: std :: os :: raw :: c_uint , # [doc = "Minimum spinning backoff of drivers (default = \\c 1)"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. (default = \\c 32)"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , # [doc = "Specify if CUDA workers should do only fast allocations\nwhen running the datawizard progress of\nother memory nodes. This will pass the interval value\n_STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.\nDefault value is 0, allowing CUDA workers to do slow\nallocations.\nThis can also be specified with the environment variable\n\\ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES."] pub cuda_only_fast_alloc_other_memnodes : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_conf"] [:: std :: mem :: size_of :: < starpu_conf > () - 1376usize] ; ["Alignment of starpu_conf"] [:: std :: mem :: align_of :: < starpu_conf > () - 8usize] ; ["Offset of field: starpu_conf::magic"] [:: std :: mem :: offset_of ! (starpu_conf , magic) - 0usize] ; ["Offset of field: starpu_conf::will_use_mpi"] [:: std :: mem :: offset_of ! (starpu_conf , will_use_mpi) - 4usize] ; ["Offset of field: starpu_conf::sched_policy_name"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_name) - 8usize] ; ["Offset of field: starpu_conf::sched_policy"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy) - 16usize] ; ["Offset of field: starpu_conf::sched_policy_callback"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_callback) - 24usize] ; ["Offset of field: starpu_conf::precedence_over_environment_variables"] [:: std :: mem :: offset_of ! (starpu_conf , precedence_over_environment_variables) - 32usize] ; ["Offset of field: starpu_conf::ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , ncpus) - 36usize] ; ["Offset of field: starpu_conf::reserve_ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , reserve_ncpus) - 40usize] ; ["Offset of field: starpu_conf::ncuda"] [:: std :: mem :: offset_of ! (starpu_conf , ncuda) - 44usize] ; ["Offset of field: starpu_conf::nhip"] [:: std :: mem :: offset_of ! (starpu_conf , nhip) - 48usize] ; ["Offset of field: starpu_conf::nopencl"] [:: std :: mem :: offset_of ! (starpu_conf , nopencl) - 52usize] ; ["Offset of field: starpu_conf::nmax_fpga"] [:: std :: mem :: offset_of ! (starpu_conf , nmax_fpga) - 56usize] ; ["Offset of field: starpu_conf::nmpi_ms"] [:: std :: mem :: offset_of ! (starpu_conf , nmpi_ms) - 60usize] ; ["Offset of field: starpu_conf::ntcpip_ms"] [:: std :: mem :: offset_of ! (starpu_conf , ntcpip_ms) - 64usize] ; ["Offset of field: starpu_conf::use_explicit_workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_bindid) - 68usize] ; ["Offset of field: starpu_conf::workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_bindid) - 72usize] ; ["Offset of field: starpu_conf::use_explicit_workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_cuda_gpuid) - 264usize] ; ["Offset of field: starpu_conf::workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_cuda_gpuid) - 268usize] ; ["Offset of field: starpu_conf::use_explicit_workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_hip_gpuid) - 460usize] ; ["Offset of field: starpu_conf::workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_hip_gpuid) - 464usize] ; ["Offset of field: starpu_conf::use_explicit_workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_opencl_gpuid) - 656usize] ; ["Offset of field: starpu_conf::workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_opencl_gpuid) - 660usize] ; ["Offset of field: starpu_conf::use_explicit_workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_max_fpga_deviceid) - 852usize] ; ["Offset of field: starpu_conf::workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_max_fpga_deviceid) - 856usize] ; ["Offset of field: starpu_conf::max_fpga_load"] [:: std :: mem :: offset_of ! (starpu_conf , max_fpga_load) - 1048usize] ; ["Offset of field: starpu_conf::use_explicit_workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_mpi_ms_deviceid) - 1056usize] ; ["Offset of field: starpu_conf::workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_mpi_ms_deviceid) - 1060usize] ; ["Offset of field: starpu_conf::bus_calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , bus_calibrate) - 1252usize] ; ["Offset of field: starpu_conf::calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , calibrate) - 1256usize] ; ["Offset of field: starpu_conf::data_locality_enforce"] [:: std :: mem :: offset_of ! (starpu_conf , data_locality_enforce) - 1260usize] ; ["Offset of field: starpu_conf::single_combined_worker"] [:: std :: mem :: offset_of ! (starpu_conf , single_combined_worker) - 1264usize] ; ["Offset of field: starpu_conf::disable_asynchronous_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_copy) - 1268usize] ; ["Offset of field: starpu_conf::disable_asynchronous_cuda_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_cuda_copy) - 1272usize] ; ["Offset of field: starpu_conf::disable_asynchronous_hip_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_hip_copy) - 1276usize] ; ["Offset of field: starpu_conf::disable_asynchronous_opencl_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_opencl_copy) - 1280usize] ; ["Offset of field: starpu_conf::disable_asynchronous_mpi_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_mpi_ms_copy) - 1284usize] ; ["Offset of field: starpu_conf::disable_asynchronous_tcpip_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_tcpip_ms_copy) - 1288usize] ; ["Offset of field: starpu_conf::disable_asynchronous_max_fpga_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_max_fpga_copy) - 1292usize] ; ["Offset of field: starpu_conf::enable_map"] [:: std :: mem :: offset_of ! (starpu_conf , enable_map) - 1296usize] ; ["Offset of field: starpu_conf::cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_opengl_interoperability) - 1304usize] ; ["Offset of field: starpu_conf::n_cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , n_cuda_opengl_interoperability) - 1312usize] ; ["Offset of field: starpu_conf::not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , not_launched_drivers) - 1320usize] ; ["Offset of field: starpu_conf::n_not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , n_not_launched_drivers) - 1328usize] ; ["Offset of field: starpu_conf::trace_buffer_size"] [:: std :: mem :: offset_of ! (starpu_conf , trace_buffer_size) - 1336usize] ; ["Offset of field: starpu_conf::global_sched_ctx_min_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_min_priority) - 1344usize] ; ["Offset of field: starpu_conf::global_sched_ctx_max_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_max_priority) - 1348usize] ; ["Offset of field: starpu_conf::catch_signals"] [:: std :: mem :: offset_of ! (starpu_conf , catch_signals) - 1352usize] ; ["Offset of field: starpu_conf::start_perf_counter_collection"] [:: std :: mem :: offset_of ! (starpu_conf , start_perf_counter_collection) - 1356usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_min"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_min) - 1360usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_max"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_max) - 1364usize] ; ["Offset of field: starpu_conf::cuda_only_fast_alloc_other_memnodes"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_only_fast_alloc_other_memnodes) - 1368usize] ; } ; 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 () } } } unsafe 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-EINVAL indicates that the argument was NULL."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Set fields of \\p conf so that no worker is enabled, i.e. set\nstarpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.\n\nThis allows to portably enable only a given type of worker:\n
\n\nstarpu_conf_noworker(&conf);
\nconf.ncpus = -1;\n\n\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_conf_noworker (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe 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-NULL \\p conf. Default configuration is used if \\p conf\nis NULL. Upon successful completion, this function returns\n0. Otherwise, -ENODEV indicates that no worker was available\n(and thus StarPU was not initialized). See \\ref SubmittingATask for more details."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application, which is necessary when running in\nSimgrid mode or MPI Master Slave mode.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram. See \\ref SubmittingATask for more details."] 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 ; } unsafe extern "C" { # [doc = "Return 1 if StarPU is already initialized. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait for starpu_init() call to finish. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_wait_initialized () ; } unsafe 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. See \\ref SubmittingATask for more details."] pub fn starpu_shutdown () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_pause () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_resume () ; } unsafe extern "C" { # [doc = "Return !0 if task processing by workers is currently paused, 0 otherwise.\nSee \\ref StarPUEatsCPUs for more details."] pub fn starpu_is_paused () -> :: std :: os :: raw :: c_int ; } unsafe 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\n::STARPU_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.\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe 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 \\p cpuid does not produce a warning.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Bind the calling thread on the cores corresponding to the \\p workerid .\n\n\\p workerid can be a basic worker or a combined worker.\n\nThis can be used e.g. before initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_worker (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Bind the calling thread back to the core reserved for the main thread.\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_main () ; } unsafe extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_cpu (cpuid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the OS number of a given \\p cpuid\n\nStarPU uses logical numbering (as define by hwloc) all along, but in case\ninteraction is needed with another binding tool that uses numbering as\ndefined by the OS, we need to convert from hwloc logical numbering to hwloc\nphysical numbering."] pub fn starpu_cpu_os_index (cpuid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print a description of the topology on \\p f.\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_topology_print (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled.\nSee \\ref Basic for more details."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled.\nSee \\ref cudaWorkers for more details."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and HIP\naccelerators are disabled.\nSee \\ref hipWorkers for more details."] pub fn starpu_asynchronous_hip_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled.\nSee \\ref openclWorkers for more details."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and Maxeler FPGA\ndevices are disabled.\nSee \\ref maxfpgaWorkers for more details."] pub fn starpu_asynchronous_max_fpga_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled.\nSee \\ref mpimsWorkers for more details."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and TCP/IP Slave\ndevices are disabled.\nSee \\ref tcpipmsWorkers for more details."] pub fn starpu_asynchronous_tcpip_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers with a given kind of memory\nare disabled."] pub fn starpu_asynchronous_copy_disabled_for (kind : starpu_node_kind) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if memory mapping support between memory nodes is\nenabled.\nSee \\ref Basic for more details."] pub fn starpu_map_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call starpu_profiling_bus_helper_display_summary() and\nstarpu_profiling_worker_helper_display_summary().\nSee \\ref DataStatistics for more details."] pub fn starpu_display_stats () ; } unsafe extern "C" { # [doc = "Return as 3 integers the version of StarPU used when running the\napplication.\nSee \\ref ConfigurationAndInitialization for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_perf_counter_sample_cl_values { pub _address : u8 , } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_omp_task { pub _address : u8 , }
[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] fn extract_bit (byte : u8 , index : usize) -> bool { 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 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] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { 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 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] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [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 unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , 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) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; 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 } ; unsafe { Self :: raw_set_bit (this , 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 = 4 ; pub const STARPU_RELEASE_VERSION : u32 = 3 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_USE_TCPIP_MASTER_SLAVE : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_PARALLEL_WORKER : 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_CBLAS_H : 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_PAPI : 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_BOOL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : 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_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_MAXCPUS : u32 = 32 ; pub const STARPU_MAXNUMANODES : u32 = 4 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMAXFPGADEVS : u32 = 12 ; pub const STARPU_MAXHIPDEVS : u32 = 8 ; pub const STARPU_NMAXWORKERS : u32 = 48 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; 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_HAVE_MPI_COMM_CREATE_GROUP : u32 = 1 ; pub const STARPU_USE_FXT : 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_PTHREAD_MUTEX_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_COND_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO : 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 STARPU_PYTHON_HAVE_NUMPY : u32 = 1 ; pub const STARPU_PROF_TOOL : 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_MALLOC_SIMULATION_UNIQUE : u32 = 128 ; pub const STARPU_NOWHERE : u32 = 1 ; 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_HIP_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_SPECIFIC_NODE_LOCAL_OR_CPU : i32 = - 5 ; pub const STARPU_SPECIFIC_NODE_NONE : i32 = - 6 ; 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_TRANSACTION : u32 = 5505024 ; pub const STARPU_TASK_FILE : u32 = 5636096 ; pub const STARPU_TASK_LINE : u32 = 5767168 ; pub const STARPU_EPILOGUE_CALLBACK : u32 = 5898240 ; pub const STARPU_EPILOGUE_CALLBACK_ARG : u32 = 6029312 ; pub const STARPU_BUBBLE_FUNC : u32 = 6160384 ; pub const STARPU_BUBBLE_FUNC_ARG : u32 = 6291456 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC : u32 = 6422528 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC_ARG : u32 = 6553600 ; pub const STARPU_BUBBLE_PARENT : u32 = 6684672 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 6815744 ; 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_PARALLEL_WORKER_MIN_NB : u32 = 131072 ; pub const STARPU_PARALLEL_WORKER_MAX_NB : u32 = 262144 ; pub const STARPU_PARALLEL_WORKER_NB : u32 = 393216 ; pub const STARPU_PARALLEL_WORKER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_PARALLEL_WORKER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_PARALLEL_WORKER_POLICY_NAME : u32 = 786432 ; pub const STARPU_PARALLEL_WORKER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_PARALLEL_WORKER_TYPE : u32 = 1310720 ; pub const STARPU_PARALLEL_WORKER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_PARALLEL_WORKER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_PARALLEL_WORKER_NEW : u32 = 1703936 ; pub const STARPU_PARALLEL_WORKER_NCORES : u32 = 1835008 ; pub const STARPU_CLUSTER_MIN_NB : u32 = 131072 ; pub const STARPU_CLUSTER_MAX_NB : u32 = 262144 ; pub const STARPU_CLUSTER_NB : u32 = 393216 ; pub const STARPU_CLUSTER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_CLUSTER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_CLUSTER_POLICY_NAME : u32 = 786432 ; pub const STARPU_CLUSTER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_CLUSTER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_CLUSTER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_CLUSTER_TYPE : u32 = 1310720 ; pub const STARPU_CLUSTER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_CLUSTER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_CLUSTER_NEW : u32 = 1703936 ; pub const STARPU_CLUSTER_NCORES : u32 = 1835008 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of drand48_data"] [:: std :: mem :: size_of :: < drand48_data > () - 24usize] ; ["Alignment of drand48_data"] [:: std :: mem :: align_of :: < drand48_data > () - 8usize] ; ["Offset of field: drand48_data::__x"] [:: std :: mem :: offset_of ! (drand48_data , __x) - 0usize] ; ["Offset of field: drand48_data::__old_x"] [:: std :: mem :: offset_of ! (drand48_data , __old_x) - 6usize] ; ["Offset of field: drand48_data::__c"] [:: std :: mem :: offset_of ! (drand48_data , __c) - 12usize] ; ["Offset of field: drand48_data::__init"] [:: std :: mem :: offset_of ! (drand48_data , __init) - 14usize] ; ["Offset of field: drand48_data::__a"] [:: std :: mem :: offset_of ! (drand48_data , __a) - 16usize] ; } ; 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_opencl_program"] [:: std :: mem :: size_of :: < starpu_opencl_program > () - 64usize] ; ["Alignment of starpu_opencl_program"] [:: std :: mem :: align_of :: < starpu_opencl_program > () - 8usize] ; ["Offset of field: starpu_opencl_program::programs"] [:: std :: mem :: offset_of ! (starpu_opencl_program , programs) - 0usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current worker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as (size_t size_of_the_argument, cl_mem *\npointer_to_the_argument). 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\n\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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 share/starpu/opencl 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. See \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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$STARPU_HOME/.starpu/opencl/\\.\\.vendor_id_\\_device_id_\\.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a file.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a string.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Unload an OpenCL compiled code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe 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). See \\ref OpenCL-specificOptimizations for more details."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe 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 NULL, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not NULL, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns -EAGAIN if the asynchronous launch was\nsuccessful. It returns 0 if the synchronous copy was successful, or\nfails otherwise.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_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 ; unsafe extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe 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)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_pthread_spinlock_t"] [:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Alignment of starpu_pthread_spinlock_t"] [:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Offset of field: starpu_pthread_spinlock_t::taken"] [:: std :: mem :: offset_of ! (starpu_pthread_spinlock_t , taken) - 0usize] ; } ; unsafe 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 ; } unsafe extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; unsafe extern "C" { pub fn starpu_sem_trywait (sem : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sem_wait (sem : * 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. See \\ref DataInterface for more details."] 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\nNULL pointer, since the value\nof the provided buffer is simply\nignored for now.\n\nSee \\ref ScratchData for more details."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< Reduction mode.\nStarPU will allocate on the fly a per-worker\nbuffer, so that various tasks that access the\nsame data in ::STARPU_REDUX mode can execute\nin parallel. When a task accesses the\ndata without ::STARPU_REDUX, StarPU will\nautomatically reduce the different contributions.\n\nCodelets contributing to these reductions\nwith ::STARPU_REDUX must be registered with\n::STARPU_RW | ::STARPU_COMMUTE access modes.\n\nSee \\ref DataReduction for more details."] 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).\n\nSee \\ref DataCommute for more details."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_task_insert() 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.\n\nTODO add extended description in documentation."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Inter-node reduction only.\nThis is similar to ::STARPU_REDUX, except that\nStarPU will allocate a per-node buffer only,\ni.e. parallelism will be achieved between\nnodes, but not within each node. This is\nuseful when the per-worker buffers allocated\nwith ::STARPU_REDUX consume too much memory.\n\nSee \\ref MPIMpiRedux for more details."] pub const STARPU_MPI_REDUX : starpu_data_access_mode = 128 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning, only use internally by StarPU"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< Request unmapping the destination replicate, only use internally by StarPU"] pub const STARPU_UNMAP : starpu_data_access_mode = 512 ; # [doc = "< Ignore this data for the footprint computation. See \\ref ScratchData"] pub const STARPU_NOFOOTPRINT : starpu_data_access_mode = 1024 ; # [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 = 2048 ; # [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 ; unsafe extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] 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]) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] 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 ; } unsafe 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.\nSee \\ref TaskSubmission for more details."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref TemporaryData for more details."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks. See \\ref DataReduction for more details."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } unsafe 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) ; } unsafe 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\nexplicitly 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 -EDEADLK). Upon successful\ncompletion, this function returns 0. See \\ref DataAccess for more details."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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.\n\n\\p callback_acquired is called when the data is acquired in terms of semantic,\nbut the data is not fetched yet. It is given a pointer to the node, which it\ncan modify if it wishes so.\n\nThis is a very internal interface, subject to changes, do not use this."] 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_acquired : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , node : * mut :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) > , callback : :: std :: option :: Option < unsafe extern "C" fn (arg : * 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 , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb(). See \\ref DataAccess for more details."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Partly release the piece of data acquired by the application either by\nstarpu_data_acquire() or by starpu_data_acquire_cb(), switching the\nacquisition down to \\p down_to_mode. For now, only releasing from ::STARPU_RW\nor ::STARPU_W acquisition down to ::STARPU_R is supported, or down to the same\nacquisition. ::STARPU_NONE can also be passed as \\p down_to_mode, in which\ncase this is equivalent to calling starpu_data_release(). See \\ref DataAccess for more details."] pub fn starpu_data_release_to (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release_to(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_to_on_node (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode , 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 ; unsafe extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } unsafe extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter, see \\ref\nConcurrentDataAccess for the details."] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Destroy the \\p arbiter. This must only be called after all data\nassigned to it have been unregistered. See \\ref\nConcurrentDataAccess for the details."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A task really needs it now!"] pub const STARPU_FETCH : starpu_is_prefetch = 0 ; # [doc = " A task will need it soon"] pub const STARPU_TASK_PREFETCH : starpu_is_prefetch = 1 ; # [doc = " It is a good idea to have it asap"] pub const STARPU_PREFETCH : starpu_is_prefetch = 2 ; # [doc = " Get this here when you have time to"] pub const STARPU_IDLEFETCH : starpu_is_prefetch = 3 ; # [doc = " Get this here when you have time to"] pub const STARPU_NFETCH : starpu_is_prefetch = 4 ; # [doc = "Prefetch levels\n\nData requests are ordered by priorities, but also by prefetching level,\nbetween data that a task wants now, and data that we will probably want\n\"soon\"."] pub type starpu_is_prefetch = :: std :: os :: raw :: c_uint ; unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node (or a transfer request for getting so is ongoing). See \\ref SchedulingHelpers for more details."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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. See \\ref DataPrefetch for more details."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Advise StarPU to evict \\p handle from the memory node \\p node\nStarPU will thus write its value back to its home node, before evicting it.\nThis may however fail if e.g. some task is still working on it.\n\nIf the eviction was successful, 0 is returned ; -1 is returned otherwise.\n\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_evict_from_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 transferred into those memory nodes. For\ninstance a 1<<0 write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0). See \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } unsafe 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().\nSee \\ref SequentialConsistency and \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the default sequential consistency flag. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } unsafe 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(). See \\ref SequentialConsistency for more details."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1. See \\ref OOCDataRegistration for more details."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0). See \\ref OOCDataRegistration for more details."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node.\n\n\\p is_allocated tells whether memory was allocated there for the data.\n\\p is_valid tells whether the actual value is available there.\n\\p is_loading tells whether the actual value is getting loaded there.\n\\p is_requested tells whether the actual value is requested to be loaded\nthere by some fetch/prefetch/idlefetch request.\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_query_status2 (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_loading : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Same as starpu_data_query_status2(), but without the is_loading parameter. See \\ref DataPrefetch for more details."] 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) ; } unsafe 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 (which has to take one handle with ::STARPU_W), and\nreduction between per-worker buffers will be done with the codelet \\p\nredux_cl (which has to take a first accumulation handle with\n::STARPU_RW|::STARPU_COMMUTE, and a second contribution handle with ::STARPU_R).\nSee \\ref DataReduction and \\ref TemporaryData for more details."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Same as starpu_data_set_reduction_methods() but allows to pass\narguments to the reduction and init tasks"] pub fn starpu_data_set_reduction_methods_with_args (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , redux_cl_arg : * mut :: std :: os :: raw :: c_void , init_cl : * mut starpu_codelet , init_cl_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_data_test_if_mapped_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Set the field \\c sched_data for the \\p handle to \\p sched_data . It can\nthen be retrieved with starpu_data_get_sched_data(). \\p sched_data can be any\nscheduler-defined value.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_sched_data (handle : starpu_data_handle_t , sched_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c sched_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_sched_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Check whether data \\p handle can be evicted now from node \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_can_evict (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , is_prefetch : starpu_is_prefetch) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Retrieve the value of an environment variable.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the current date in micro-seconds. See \\ref Preparing for more details."] pub fn starpu_timing_now () -> f64 ; } unsafe 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Like starpu_data_cpy(), copy the content of \\p src_handle into \\p dst_handle,\nbut additionally take a \\p priority parameter to sort it among the whole task\ngraph.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_cpy_priority (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 , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Create a copy of \\p src_handle, and return a new handle in \\p dst_handle,\nwhich is to be used only for read accesses. This allows StarPU to optimize it\nby not actually copying the data whenever possible (e.g. it may possibly\nsimply return src_handle itself).\nThe parameter \\p asynchronous indicates whether the function should block\nor not. In the case of an asynchronous call, it is possible to synchronize\nwith the 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_dup_ro (dst_handle : * mut starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call hwloc-ps to display binding of each process and thread running on\nthe machine.
\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU.\nSee \\ref MiscellaneousAndDebug for more details."] pub fn starpu_display_bindings () ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a bitmap representing logical indexes of NUMA nodes where the buffer\ntargeted by \\p ptr is allocated. An error is notified by a negative result.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_memory_location_bitmap (ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_long ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate data on disk. See \\ref DiskFunctions for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 data 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 data, 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 data \\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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_disk_ops"] [:: std :: mem :: size_of :: < starpu_disk_ops > () - 152usize] ; ["Alignment of starpu_disk_ops"] [:: std :: mem :: align_of :: < starpu_disk_ops > () - 8usize] ; ["Offset of field: starpu_disk_ops::plug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , plug) - 0usize] ; ["Offset of field: starpu_disk_ops::unplug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , unplug) - 8usize] ; ["Offset of field: starpu_disk_ops::bandwidth"] [:: std :: mem :: offset_of ! (starpu_disk_ops , bandwidth) - 16usize] ; ["Offset of field: starpu_disk_ops::alloc"] [:: std :: mem :: offset_of ! (starpu_disk_ops , alloc) - 24usize] ; ["Offset of field: starpu_disk_ops::free"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free) - 32usize] ; ["Offset of field: starpu_disk_ops::open"] [:: std :: mem :: offset_of ! (starpu_disk_ops , open) - 40usize] ; ["Offset of field: starpu_disk_ops::close"] [:: std :: mem :: offset_of ! (starpu_disk_ops , close) - 48usize] ; ["Offset of field: starpu_disk_ops::read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , read) - 56usize] ; ["Offset of field: starpu_disk_ops::write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , write) - 64usize] ; ["Offset of field: starpu_disk_ops::full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_read) - 72usize] ; ["Offset of field: starpu_disk_ops::full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_write) - 80usize] ; ["Offset of field: starpu_disk_ops::async_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_write) - 88usize] ; ["Offset of field: starpu_disk_ops::async_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_read) - 96usize] ; ["Offset of field: starpu_disk_ops::async_full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_read) - 104usize] ; ["Offset of field: starpu_disk_ops::async_full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_write) - 112usize] ; ["Offset of field: starpu_disk_ops::copy"] [:: std :: mem :: offset_of ! (starpu_disk_ops , copy) - 120usize] ; ["Offset of field: starpu_disk_ops::wait_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , wait_request) - 128usize] ; ["Offset of field: starpu_disk_ops::test_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , test_request) - 136usize] ; ["Offset of field: starpu_disk_ops::free_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free_request) - 144usize] ; } ; unsafe extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\nWarning: It creates one file per allocation !\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the HDF5 library.\n\nIt doesn't support multiple opening from different processes. \n\nYou may only allow one process to write in the HDF5 file.\n\nIf HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. "] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\nWarning: It creates one file per allocation !"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\nWarning: It creates one file per allocation !\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Close an existing data opened with starpu_disk_open(). See \\ref OutOfCore_Introduction for more details."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe 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. See \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndata. 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
\nSUCCESS: return the disk node.
\nFAIL: return an error code.
\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size.\n\nSee \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe 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, HIP or OpenCL support.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 HIP node. Return 0 on success."] pub ram_to_hip : :: 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 FPGA node. Return 0 on success."] pub ram_to_max_fpga : :: 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 HIP node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub hip_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 HIP node to the \\p dst_interface interface on the \\p\ndst_node HIP node. Return 0 on success."] pub hip_to_hip : :: 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 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 FPGA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub max_fpga_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 > , 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 > , pub ram_to_hip_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_hip_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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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 FPGA node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_max_fpga_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 FPGA 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 -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub max_fpga_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 -EAGAIN if any of the starpu_interface_copy()\ncalls has returned -EAGAIN (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::peek_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 > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_copy_methods"] [:: std :: mem :: size_of :: < starpu_data_copy_methods > () - 200usize] ; ["Alignment of starpu_data_copy_methods"] [:: std :: mem :: align_of :: < starpu_data_copy_methods > () - 8usize] ; ["Offset of field: starpu_data_copy_methods::can_copy"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , can_copy) - 0usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_ram) - 8usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda) - 16usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip) - 24usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl) - 32usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga) - 40usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram) - 48usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda) - 56usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram) - 64usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip) - 72usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram) - 80usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl) - 88usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram) - 96usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda_async) - 104usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram_async) - 112usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda_async) - 120usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip_async) - 128usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram_async) - 136usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip_async) - 144usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl_async) - 152usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram_async) - 160usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl_async) - 168usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga_async) - 176usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram_async) - 184usize] ; ["Offset of field: starpu_data_copy_methods::any_to_any"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , any_to_any) - 192usize] ; } ; # [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 = "< Identifier for the tensor data interface"] pub const STARPU_TENSOR_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "< Identifier for the ndim array data interface"] pub const STARPU_NDIM_INTERFACE_ID : starpu_data_interface_id = 10 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 11 ; # [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)] 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 (if >= 0), 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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 = "Cache the buffers from the given node to a caching interface.\n\nThis method is optional, mostly useful when also making\nstarpu_data_interface_ops::unregister_data_handle check that pointers are NULL.\n\n\\p src_interface is an interface that already has buffers\nallocated, but which we don't need any more. \\p cached_interface\nis a new interface into which the buffer pointers should be\ntransferred, for later reuse when allocating data of the same kind.\n\nUsually we can just memcpy over the set of pointers and descriptions\n(this is what StarPU does when this method is not implemented), but\nif unregister_data_handle checks that pointers are NULL, we need to\nadditionally clear the pointers in \\p src_interface. Also,\nit is not useful to copy the whole interface, only the\npointers need to be copied (essentially the pointers that\nstarpu_data_interface_ops::reuse_data_on_node will then transfer into\na new handle interface), as well as the properties\nthat starpu_data_interface_ops::compare (or\nstarpu_data_interface_ops::alloc_compare if defined) needs for\ncomparing interfaces for caching compatibility.\n\nWhen this method is not defined, StarPU will just copy the \\p\ncached_interface into \\p src_interface.\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub cache_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (cached_interface : * mut :: std :: os :: raw :: c_void , src_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Reuse on the given node the buffers of the provided interface\n\nThis method is optional, mostly useful when also defining\nalloc_footprint to share tiles of the same allocation size but\ndifferent shapes, or when the interface contains pointers which\nare initialized at registration (e.g. nn array in the ndim interface)\n\n\\p cached_interface is an already-allocated buffer that we want to\nreuse, and \\p new_data_interface is an interface in which we want to\ninstall that already-allocated buffer. Usually we can just memcpy over\nthe set of pointers and descriptions. But e.g. with 2D tiles the ld\nvalue may not be correct, and memcpy would wrongly overwrite it in\nnew_data_interface, i.e. reusing a vertical tile allocation for a horizontal tile, or vice-versa.\n\nreuse_data_on_node should thus copy over pointers, and define fields\nthat are usually set by allocate_data_on_node (e.g. ld).\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub reuse_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (dst_data_interface : * mut :: std :: os :: raw :: c_void , cached_interface : * const :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Map data from a source to a destination.\nDefine function starpu_interface_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub map_data : :: 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 = "Unmap data from a source to a destination.\nDefine function starpu_interface_unmap() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub unmap_data : :: 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 = "Update map data from a source to a destination.\nDefine function starpu_interface_update_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub update_map : :: 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 = "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 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 the maximum size that the data may need to increase to. For\ninstance, in the case of compressed matrix tiles this is the size\nwhen the block is fully dense.\nThis is currently only used for feedback tools."] pub get_max_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.\nIf specified, alloc_compare should be set to provide the strict\ncomparison, and reuse_data_on_node should be set to provide correct buffer reuse."] 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 starpu_malloc_flags(ptr, size, 0) (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is NULL, 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 = "Read the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count."] pub peek_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 = "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 = "Pack the interface into a contiguous buffer and set the\nsize of the newly created buffer in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub pack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the interface from the given buffer and set the size\nof the unpacked data in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub unpack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Free the allocated memory by a previous call to unpack_meta()"] pub free_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_data_interface_ops > () - 264usize] ; ["Alignment of starpu_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_data_interface_ops::register_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , register_data_handle) - 0usize] ; ["Offset of field: starpu_data_interface_ops::unregister_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unregister_data_handle) - 8usize] ; ["Offset of field: starpu_data_interface_ops::allocate_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , allocate_data_on_node) - 16usize] ; ["Offset of field: starpu_data_interface_ops::free_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_data_on_node) - 24usize] ; ["Offset of field: starpu_data_interface_ops::cache_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , cache_data_on_node) - 32usize] ; ["Offset of field: starpu_data_interface_ops::reuse_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , reuse_data_on_node) - 40usize] ; ["Offset of field: starpu_data_interface_ops::map_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , map_data) - 48usize] ; ["Offset of field: starpu_data_interface_ops::unmap_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unmap_data) - 56usize] ; ["Offset of field: starpu_data_interface_ops::update_map"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , update_map) - 64usize] ; ["Offset of field: starpu_data_interface_ops::init"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , init) - 72usize] ; ["Offset of field: starpu_data_interface_ops::copy_methods"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , copy_methods) - 80usize] ; ["Offset of field: starpu_data_interface_ops::handle_to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , handle_to_pointer) - 88usize] ; ["Offset of field: starpu_data_interface_ops::to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , to_pointer) - 96usize] ; ["Offset of field: starpu_data_interface_ops::get_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_size) - 104usize] ; ["Offset of field: starpu_data_interface_ops::get_alloc_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_alloc_size) - 112usize] ; ["Offset of field: starpu_data_interface_ops::get_max_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_max_size) - 120usize] ; ["Offset of field: starpu_data_interface_ops::footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , footprint) - 128usize] ; ["Offset of field: starpu_data_interface_ops::alloc_footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_footprint) - 136usize] ; ["Offset of field: starpu_data_interface_ops::compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , compare) - 144usize] ; ["Offset of field: starpu_data_interface_ops::alloc_compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_compare) - 152usize] ; ["Offset of field: starpu_data_interface_ops::display"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , display) - 160usize] ; ["Offset of field: starpu_data_interface_ops::describe"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , describe) - 168usize] ; ["Offset of field: starpu_data_interface_ops::interfaceid"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interfaceid) - 176usize] ; ["Offset of field: starpu_data_interface_ops::interface_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interface_size) - 184usize] ; ["Offset of field: starpu_data_interface_ops::is_multiformat"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , is_multiformat) - 192usize] ; ["Offset of field: starpu_data_interface_ops::dontcache"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , dontcache) - 193usize] ; ["Offset of field: starpu_data_interface_ops::get_mf_ops"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_mf_ops) - 200usize] ; ["Offset of field: starpu_data_interface_ops::pack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_data) - 208usize] ; ["Offset of field: starpu_data_interface_ops::peek_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , peek_data) - 216usize] ; ["Offset of field: starpu_data_interface_ops::unpack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_data) - 224usize] ; ["Offset of field: starpu_data_interface_ops::pack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_meta) - 232usize] ; ["Offset of field: starpu_data_interface_ops::unpack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_meta) - 240usize] ; ["Offset of field: starpu_data_interface_ops::free_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_meta) - 248usize] ; ["Offset of field: starpu_data_interface_ops::name"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , name) - 256usize] ; } ; 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 () } } } unsafe 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()).\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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) ; } unsafe extern "C" { # [doc = "Register the given data interface operations. If the field\nstarpu_data_interface_ops::field is set to\n::STARPU_UNKNOWN_INTERFACE_ID, then a new identifier will be set by\ncalling starpu_data_interface_get_next_id().\nThe function is automatically called when registering a piece of\ndata with starpu_data_register(). It is only necessary to call it\nbeforehand for some specific cases (such as the usmaster slave mode)."] pub fn starpu_data_register_ops (ops : * mut starpu_data_interface_ops) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or NULL\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node.\nSee \\ref DataPointers for more details."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle or NULL if\n\\p handle’s interface does not have any data allocated locally.\nSee \\ref DataPointers for more details."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node.\nSee \\ref DefiningANewDataInterface_pack for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle.\nSee \\ref DefiningANewDataInterface_helpers for more details."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } unsafe 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 on node \\p node 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 NULL, 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_pack_node (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 ; } unsafe extern "C" { # [doc = "Like starpu_data_pack_node(), but for the local memory node.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Read in handle's \\p node replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek_node (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 ; } unsafe extern "C" { # [doc = "Read in handle's local replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count allocated\non node \\p node as described by the interface of the data. The interface\nregistered at \\p handle must define an unpacking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack_node (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 ; } unsafe 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).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the size of the data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the maximum size that the \\p handle data may need to increase to.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_max_size (handle : starpu_data_handle_t) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "See \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print basic information on \\p handle on \\p node.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_print (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , stream : * mut FILE) ; } unsafe 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 ; } unsafe 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 -EAGAIN if the\ntransfer is still ongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 4D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe extern "C" { # [doc = "Copy \\p nn[1] * \\p nn[2]...* \\p nn[ndim-1] blocks of \\p nn[0] * \\p elemsize 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 nn[i] blocks (i = 1, 2, ... ndim-1) whose start addresses are\nldn_src[i] * \\p elemsize (resp. ld1_dst[i] * \\p elemsize) bytes apart\nin the source (resp. destination) interface.\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 Ndim data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_copynd (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , elemsize : usize , ndim : usize , nn : * mut u32 , ldn_src : * mut u32 , ldn_dst : * mut u32 , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "When an asynchronous 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().\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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) ; } unsafe extern "C" { # [doc = "See starpu_interface_start_driver_copy_async().\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } unsafe extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node.\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node_flags().\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::map_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_map (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize , ret : * mut :: std :: os :: raw :: c_int) -> usize ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::unmap_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_unmap (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::update_map.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_update_map (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) -> :: std :: os :: raw :: c_int ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_matrix_interface"] [:: std :: mem :: size_of :: < starpu_matrix_interface > () - 64usize] ; ["Alignment of starpu_matrix_interface"] [:: std :: mem :: align_of :: < starpu_matrix_interface > () - 8usize] ; ["Offset of field: starpu_matrix_interface::id"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , id) - 0usize] ; ["Offset of field: starpu_matrix_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ptr) - 8usize] ; ["Offset of field: starpu_matrix_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_matrix_interface::offset"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , offset) - 24usize] ; ["Offset of field: starpu_matrix_interface::nx"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , nx) - 32usize] ; ["Offset of field: starpu_matrix_interface::ny"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ny) - 36usize] ; ["Offset of field: starpu_matrix_interface::ld"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ld) - 40usize] ; ["Offset of field: starpu_matrix_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , elemsize) - 48usize] ; ["Offset of field: starpu_matrix_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_coo_interface"] [:: std :: mem :: size_of :: < starpu_coo_interface > () - 56usize] ; ["Alignment of starpu_coo_interface"] [:: std :: mem :: align_of :: < starpu_coo_interface > () - 8usize] ; ["Offset of field: starpu_coo_interface::id"] [:: std :: mem :: offset_of ! (starpu_coo_interface , id) - 0usize] ; ["Offset of field: starpu_coo_interface::columns"] [:: std :: mem :: offset_of ! (starpu_coo_interface , columns) - 8usize] ; ["Offset of field: starpu_coo_interface::rows"] [:: std :: mem :: offset_of ! (starpu_coo_interface , rows) - 16usize] ; ["Offset of field: starpu_coo_interface::values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , values) - 24usize] ; ["Offset of field: starpu_coo_interface::nx"] [:: std :: mem :: offset_of ! (starpu_coo_interface , nx) - 32usize] ; ["Offset of field: starpu_coo_interface::ny"] [:: std :: mem :: offset_of ! (starpu_coo_interface , ny) - 36usize] ; ["Offset of field: starpu_coo_interface::n_values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , n_values) - 40usize] ; ["Offset of field: starpu_coo_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_coo_interface , elemsize) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref COODataInterface for more details."] 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) ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_block_interface"] [:: std :: mem :: size_of :: < starpu_block_interface > () - 64usize] ; ["Alignment of starpu_block_interface"] [:: std :: mem :: align_of :: < starpu_block_interface > () - 8usize] ; ["Offset of field: starpu_block_interface::id"] [:: std :: mem :: offset_of ! (starpu_block_interface , id) - 0usize] ; ["Offset of field: starpu_block_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_block_interface , ptr) - 8usize] ; ["Offset of field: starpu_block_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_block_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_block_interface::offset"] [:: std :: mem :: offset_of ! (starpu_block_interface , offset) - 24usize] ; ["Offset of field: starpu_block_interface::nx"] [:: std :: mem :: offset_of ! (starpu_block_interface , nx) - 32usize] ; ["Offset of field: starpu_block_interface::ny"] [:: std :: mem :: offset_of ! (starpu_block_interface , ny) - 36usize] ; ["Offset of field: starpu_block_interface::nz"] [:: std :: mem :: offset_of ! (starpu_block_interface , nz) - 40usize] ; ["Offset of field: starpu_block_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldy) - 44usize] ; ["Offset of field: starpu_block_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldz) - 48usize] ; ["Offset of field: starpu_block_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_block_interface , elemsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Tensor Data Interface\n@{"] pub static mut starpu_interface_tensor_ops : starpu_data_interface_ops ; } # [doc = "Tensor interface for 4D dense tensors"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_tensor_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the tensor"] pub ptr : usize , # [doc = "< device handle of the tensor."] pub dev_handle : usize , # [doc = "< offset in the tensor."] pub offset : usize , # [doc = "< number of elements on the x-axis of the tensor."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the tensor."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the tensor."] pub nz : u32 , # [doc = "< number of elements on the t-axis of the tensor."] pub nt : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< number of elements between two cubes"] pub ldt : u32 , # [doc = "< size of the elements of the tensor."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tensor_interface"] [:: std :: mem :: size_of :: < starpu_tensor_interface > () - 72usize] ; ["Alignment of starpu_tensor_interface"] [:: std :: mem :: align_of :: < starpu_tensor_interface > () - 8usize] ; ["Offset of field: starpu_tensor_interface::id"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , id) - 0usize] ; ["Offset of field: starpu_tensor_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ptr) - 8usize] ; ["Offset of field: starpu_tensor_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_tensor_interface::offset"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , offset) - 24usize] ; ["Offset of field: starpu_tensor_interface::nx"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nx) - 32usize] ; ["Offset of field: starpu_tensor_interface::ny"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ny) - 36usize] ; ["Offset of field: starpu_tensor_interface::nz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nz) - 40usize] ; ["Offset of field: starpu_tensor_interface::nt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nt) - 44usize] ; ["Offset of field: starpu_tensor_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldy) - 48usize] ; ["Offset of field: starpu_tensor_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldz) - 52usize] ; ["Offset of field: starpu_tensor_interface::ldt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldt) - 56usize] ; ["Offset of field: starpu_tensor_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , elemsize) - 64usize] ; } ; impl Default for starpu_tensor_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz x \\p nt 4D tensor of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy,\n\\p ldz, and \\p ldt specify the number of elements between rows, between z planes and between t cubes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *tensor;\nstarpu_data_handle_t tensor_handle;\ntensor = (float*)malloc(nx*ny*nz*nt*sizeof(float));\nstarpu_tensor_data_register(&tensor_handle, STARPU_MAIN_RAM, (uintptr_t)tensor, nx, nx*ny, nx*ny*nz, nx, ny, nz, nt, sizeof(float));\n\\endcode\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , ldt : u32 , nx : u32 , ny : u32 , nz : u32 , nt : u32 , elemsize : usize) ; } unsafe 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, and \\p ldt elements between t cubes."] pub fn starpu_tensor_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32 , ldt : u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on the x-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nx (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the y-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_ny (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the z-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the t-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each row of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each z plane of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each t cubes of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_tensor_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the tensor designated by\n\\p handle."] pub fn starpu_tensor_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Ndim Array Data Interface\n@{"] pub static mut starpu_interface_ndim_ops : starpu_data_interface_ops ; } # [doc = "ndim interface for ndim array"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_ndim_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the ndim"] pub ptr : usize , # [doc = "< device handle of the ndim."] pub dev_handle : usize , # [doc = "< offset in the ndim."] pub offset : usize , # [doc = "< size actually currently allocated."] pub allocsize : usize , # [doc = "< array of element number on each dimension"] pub nn : * mut u32 , # [doc = "< array of element number between two units on each dimension"] pub ldn : * mut u32 , # [doc = "< size of the dimension."] pub ndim : usize , # [doc = "< size of the elements of the ndim."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_ndim_interface"] [:: std :: mem :: size_of :: < starpu_ndim_interface > () - 72usize] ; ["Alignment of starpu_ndim_interface"] [:: std :: mem :: align_of :: < starpu_ndim_interface > () - 8usize] ; ["Offset of field: starpu_ndim_interface::id"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , id) - 0usize] ; ["Offset of field: starpu_ndim_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ptr) - 8usize] ; ["Offset of field: starpu_ndim_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_ndim_interface::offset"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , offset) - 24usize] ; ["Offset of field: starpu_ndim_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , allocsize) - 32usize] ; ["Offset of field: starpu_ndim_interface::nn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , nn) - 40usize] ; ["Offset of field: starpu_ndim_interface::ldn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ldn) - 48usize] ; ["Offset of field: starpu_ndim_interface::ndim"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ndim) - 56usize] ; ["Offset of field: starpu_ndim_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , elemsize) - 64usize] ; } ; impl Default for starpu_ndim_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nn[0] x \\p nn[1] x ... \\p ndim-dimension matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldn,\nspecifies the number of elements between two units on each dimension.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *ndim_arr;\nsize_t arrsize = 1;\nint i;\nfor (i = 0; i < ndim; i++)\narrsize = arrsize * nn[i];\nstarpu_data_handle_t ndim_handle;\nndim_arr = (float*)malloc(arrsize*sizeof(float));\nstarpu_ndim_data_register(&ndim_handle, STARPU_MAIN_RAM, (uintptr_t)ndim_arr, ldn, nn, ndim, sizeof(float));\n\\endcode\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldn : * mut u32 , nn : * mut u32 , ndim : usize , elemsize : usize) ; } unsafe 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 ldn elements between two units on each dimension."] pub fn starpu_ndim_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldn : * mut u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on each dimension of the ndim array\ndesignated by \\p handle."] pub fn starpu_ndim_get_nn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the i-axis of the ndim array\ndesignated by \\p handle. When i=0, it means x-axis,\nwhen i=1, it means y-axis, when i=2, it means z-axis, etc."] pub fn starpu_ndim_get_ni (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units on each dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units i-axis dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldi (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_ndim_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the dimension size."] pub fn starpu_ndim_get_ndim (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the ndim array designated by\n\\p handle."] pub fn starpu_ndim_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_vector_interface"] [:: std :: mem :: size_of :: < starpu_vector_interface > () - 64usize] ; ["Alignment of starpu_vector_interface"] [:: std :: mem :: align_of :: < starpu_vector_interface > () - 8usize] ; ["Offset of field: starpu_vector_interface::id"] [:: std :: mem :: offset_of ! (starpu_vector_interface , id) - 0usize] ; ["Offset of field: starpu_vector_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_vector_interface , ptr) - 8usize] ; ["Offset of field: starpu_vector_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_vector_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_vector_interface::offset"] [:: std :: mem :: offset_of ! (starpu_vector_interface , offset) - 24usize] ; ["Offset of field: starpu_vector_interface::nx"] [:: std :: mem :: offset_of ! (starpu_vector_interface , nx) - 32usize] ; ["Offset of field: starpu_vector_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , elemsize) - 40usize] ; ["Offset of field: starpu_vector_interface::slice_base"] [:: std :: mem :: offset_of ! (starpu_vector_interface , slice_base) - 48usize] ; ["Offset of field: starpu_vector_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_vector_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize.\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_variable_interface"] [:: std :: mem :: size_of :: < starpu_variable_interface > () - 40usize] ; ["Alignment of starpu_variable_interface"] [:: std :: mem :: align_of :: < starpu_variable_interface > () - 8usize] ; ["Offset of field: starpu_variable_interface::id"] [:: std :: mem :: offset_of ! (starpu_variable_interface , id) - 0usize] ; ["Offset of field: starpu_variable_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_variable_interface , ptr) - 8usize] ; ["Offset of field: starpu_variable_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_variable_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_variable_interface::offset"] [:: std :: mem :: offset_of ! (starpu_variable_interface , offset) - 24usize] ; ["Offset of field: starpu_variable_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_variable_interface , elemsize) - 32usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VariableDataInterface for more details."] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } unsafe 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 void\ndata in read-write concurrently.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } unsafe 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)] 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 = "< position of non-zero entries on the row (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitioning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_csr_interface"] [:: std :: mem :: size_of :: < starpu_csr_interface > () - 72usize] ; ["Alignment of starpu_csr_interface"] [:: std :: mem :: align_of :: < starpu_csr_interface > () - 8usize] ; ["Offset of field: starpu_csr_interface::id"] [:: std :: mem :: offset_of ! (starpu_csr_interface , id) - 0usize] ; ["Offset of field: starpu_csr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nnz) - 4usize] ; ["Offset of field: starpu_csr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nrow) - 8usize] ; ["Offset of field: starpu_csr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nzval) - 16usize] ; ["Offset of field: starpu_csr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , colind) - 24usize] ; ["Offset of field: starpu_csr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_csr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_csr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_csr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_csr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_csr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_csr_interface , elemsize) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix.\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 = "< array of nnz elements (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< array of nrow+1 elements (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitioning 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bcsr_interface"] [:: std :: mem :: size_of :: < starpu_bcsr_interface > () - 80usize] ; ["Alignment of starpu_bcsr_interface"] [:: std :: mem :: align_of :: < starpu_bcsr_interface > () - 8usize] ; ["Offset of field: starpu_bcsr_interface::id"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , id) - 0usize] ; ["Offset of field: starpu_bcsr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nnz) - 4usize] ; ["Offset of field: starpu_bcsr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nrow) - 8usize] ; ["Offset of field: starpu_bcsr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nzval) - 16usize] ; ["Offset of field: starpu_bcsr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , colind) - 24usize] ; ["Offset of field: starpu_bcsr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_bcsr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_bcsr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_bcsr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_bcsr_interface::r"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , r) - 60usize] ; ["Offset of field: starpu_bcsr_interface::c"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , c) - 64usize] ; ["Offset of field: starpu_bcsr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , elemsize) - 72usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () - 56usize] ; ["Alignment of starpu_multiformat_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_elemsize) - 0usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_elemsize) - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_opencl_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_opencl_cl) - 16usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_to_cpu_cl) - 24usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_elemsize) - 32usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_cuda_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_cuda_cl) - 40usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_to_cpu_cl) - 48usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 hip_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_interface"] [:: std :: mem :: size_of :: < starpu_multiformat_interface > () - 56usize] ; ["Alignment of starpu_multiformat_interface"] [:: std :: mem :: align_of :: < starpu_multiformat_interface > () - 8usize] ; ["Offset of field: starpu_multiformat_interface::id"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , id) - 0usize] ; ["Offset of field: starpu_multiformat_interface::cpu_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cpu_ptr) - 8usize] ; ["Offset of field: starpu_multiformat_interface::cuda_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cuda_ptr) - 16usize] ; ["Offset of field: starpu_multiformat_interface::hip_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , hip_ptr) - 24usize] ; ["Offset of field: starpu_multiformat_interface::opencl_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , opencl_ptr) - 32usize] ; ["Offset of field: starpu_multiformat_interface::nx"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , nx) - 40usize] ; ["Offset of field: starpu_multiformat_interface::ops"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , ops) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref TheMultiformatInterface for more details."] 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().\nSee \\ref DefiningANewDataFilter for more details."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n- id 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
\n- nx, ny 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).
\n- ld for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange.
\n- elemsize is usually just copied over.
\n- ptr, the pointer to the data, has to be\ncomputed according to \\p i and the father's ptr, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has ptr different\nfrom NULL: in the OpenCL case notably, the\ndev_handle and offset fields are used\ninstead.
\n- dev_handle should be just copied over from the\nparent.
\n- offset has to be computed according to \\p i and\nthe father's offset, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n
"] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_filter"] [:: std :: mem :: size_of :: < starpu_data_filter > () - 48usize] ; ["Alignment of starpu_data_filter"] [:: std :: mem :: align_of :: < starpu_data_filter > () - 8usize] ; ["Offset of field: starpu_data_filter::filter_func"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_func) - 0usize] ; ["Offset of field: starpu_data_filter::nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , nchildren) - 8usize] ; ["Offset of field: starpu_data_filter::get_nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_nchildren) - 16usize] ; ["Offset of field: starpu_data_filter::get_child_ops"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_child_ops) - 24usize] ; ["Offset of field: starpu_data_filter::filter_arg"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg) - 32usize] ; ["Offset of field: starpu_data_filter::filter_arg_ptr"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg_ptr) - 40usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitioned beforehand.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list.\nSee \\ref PartitioningData for more details."] 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 ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The pointer of the filter list \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_parray (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut * mut starpu_data_filter) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The list of filter \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_array (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_readonly_submit(), but allow to\nspecify the coherency to be used for the main data \\p initial_handle.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\nin read-write mode through starpu_data_partition_submit(), and will downgrade\nthat partitioning into read-only mode for the \\p children, fetching data back to the \\p\ninitial_handle, and adding the necessary dependencies.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_downgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_clean() but the root data will be\ngathered on the given node.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean_node (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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().\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] 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 ; } unsafe 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.\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices.\n\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a matrix along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_vector.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_vector_y().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a matrix. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_variable.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_variable().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr, thus getting a vector\nof size (n-2*shadow)/nparts+2*shadow. The starpu_data_filter::filter_arg_ptr field\nof \\p f must be the shadow size casted into \\c void*.\n\nIMPORTANT: 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in 2 chunks of\nequal size, ignoring nparts. Thus, \\p id must be 0 or 1.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a vector. The starting\nposition is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_vector_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fvector_pick_variable.c\n\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_vector_filter_pick_variable().\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_matrix_z()\nand starpu_block_filter_pick_matrix_y().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a block. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_variable.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_variable().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, thus getting\n(x/\\p nparts ,y,z,t) tensors. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z,t) tensors. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, thus getting\n(x,y/\\p nparts ,z,t) tensors. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z,t) tensors. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, thus getting\n(x,y,z/\\p nparts,t) tensors. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow,t) tensors. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, thus getting\n(x,y,z,t/\\p nparts) tensors. If \\p nparts does not divide t, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,z,(t-2*shadow)/\\p nparts +2*shadow) tensors. If \\p nparts does not\ndivide t, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe T dimension. The starting position on T-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_t (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_block_t(),\nstarpu_tensor_filter_pick_block_z() and starpu_tensor_filter_pick_block_y().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a tensor. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_variable.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_variable().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg, with a shadow border\nstarpu_data_filter::filter_arg_ptr. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a 4-dim array into \\p nparts tensors along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_to_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor (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) ; } unsafe extern "C" { # [doc = "Partition a 3-dim array into \\p nparts blocks along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_block_child_ops(). A usage example is\navailable in examples/filters/fndim_to_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_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) ; } unsafe extern "C" { # [doc = "Partition a 2-dim array into \\p nparts matrices along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_to_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix (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) ; } unsafe extern "C" { # [doc = "Partition a 1-dim array into \\p nparts vectors.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_to_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector (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) ; } unsafe extern "C" { # [doc = "Transfer a 0-dim array to a variable.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_to_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous (n-1)dim arrays from a ndim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nA usage example is available in examples/filters/fndim_pick_ndim.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_ndim (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous tensors from a 5-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_5d_pick_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_5d_pick_tensor (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a 4-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/fndim_4d_pick_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_4d_pick_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a 3-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_3d_pick_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_3d_pick_matrix (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a 2-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_2d_pick_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_2d_pick_vector (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a 1-dim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_1d_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_1d_pick_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a ndim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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 blocksize, which is most often 1.\nSee \\ref DefiningANewDataFilter for more details."] 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 , blocksize : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_align (align : usize) ; } unsafe 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_noflag() function.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "@deprecated\nFree memory which has previously been allocated with\nstarpu_malloc(). This function is deprecated, one should use\nstarpu_free_noflag().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe extern "C" { # [doc = "Free memory by specifying its size. Should be used for memory\nallocated with starpu_malloc().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free_noflag (A : * mut :: std :: os :: raw :: c_void , dim : usize) -> :: 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 > ; unsafe 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().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on the node.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used (node : :: std :: os :: raw :: c_uint) -> usize ; } unsafe extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref DataManagementAllocation)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nDataManagementAllocation)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on all memory nodes.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used_all_nodes () -> usize ; } unsafe 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 -ENOMEM 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_sec seconds. Similar to calling Unix' \\c\nsleep function, except that it takes a float to allow sub-second\nsleeping, and when StarPU is compiled in SimGrid mode it does not\nreally sleep but just makes SimGrid record that the thread has\ntaken some time to sleep.\nSee \\ref Helpers for more details."] pub fn starpu_sleep (nb_sec : f32) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_micro_sec micro-seconds.\nIn simgrid mode, this only sleeps within virtual time.\nSee \\ref Helpers for more details."] pub fn starpu_usleep (nb_micro_sec : f32) ; } unsafe extern "C" { # [doc = "Account for \\p joules J being used.\nThis is support in simgrid mode, to record how much energy was used, and will\nshow up in further call to starpu_energy_used().\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_use (joules : f32) ; } unsafe extern "C" { # [doc = "Return the amount of energy having been used in J.\nThis account the amounts passed to starpu_energy_use(), but also the static\nenergy use set by the \\ref STARPU_IDLE_POWER environment variable.\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_used () -> f64 ; } # [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 ; unsafe 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) ; } unsafe 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 -EPERM, if\n\\p task was already submitted it returns -EINVAL."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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-ENOENT."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] 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]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\nNULL 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifier. It is possible to associate a task\nwith a unique tag 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 ; unsafe 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\nWARNING! Use with caution. 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\n0x200000003 instead of 0x2 and 0x3 when\ncalling starpu_tag_declare_deps(0x1, 2, 0x2, 0x3). 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } unsafe 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 structure starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled).\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Clear the already notified 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } unsafe 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().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } unsafe extern "C" { # [doc = "Return the task associated to the tag \\p id.\nSee \\ref TasksAndTagsDependencies for more details."] 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 submitted, 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 ; # [doc = "todo"] 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 = "HIP implementation of a codelet."] pub type starpu_hip_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 = "Maxeler FPGA implementation of a codelet."] pub type starpu_max_fpga_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 = "@ingroup API_Bubble Hierarchical Dags\nBubble decision function"] pub type starpu_bubble_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = "@ingroup API_Bubble Hierarchical Dags\nBubble DAG generation function"] pub type starpu_bubble_gen_dag_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_trs_epoch { _unused : [u8 ; 0] , } pub type starpu_trs_epoch_t = * mut _starpu_trs_epoch ; # [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.\n\nNote that the codelet structure needs to exist until the task is\nterminated. If dynamic codelet allocation is desired, release should be done\nno sooner than the starpu_task::callback_func callback time.\n\nIf the application wants to make the structure constant, it needs to be\nfilled exactly as StarPU expects:\n\n- starpu_codelet::cpu_funcs, starpu_codelet::cuda_funcs, etc. must be used instead\nof the deprecated starpu_codelet::cpu_func, starpu_codelet::cuda_func, etc.\n\n- the starpu_codelet::where field must be set.\n\nand additionally, starpu_codelet::checked must be set to 1 to tell StarPU\nthat the conditions above are properly met. Also, the \\ref\nSTARPU_CODELET_PROFILING environment variable must be set to 0.\nAn example is provided in tests/main/const_codelet.c"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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_HIP, ::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-NULL 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-NULL 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 HIP\nimplementations of the codelet. The functions must be\nhost-functions written in the HIP runtime API. Their\nprototype must be:\n\\code{.c}\nvoid hip_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::hip_funcs is ignored if ::STARPU_HIP does\nnot appear in the field starpu_codelet::where, it must be\nnon-NULL otherwise."] pub hip_funcs : [starpu_hip_func_t ; 4usize] , # [doc = "Optional array of flags for HIP execution. They specify\nsome semantic details about HIP kernel execution, such as\nasynchronous execution."] pub hip_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-NULL 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 the Maxeler FPGA\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid fpga_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 starpu_codelet::max_fpga_funcs is ignored if\n::STARPU_MAX_FPGA does not appear in the field\nstarpu_codelet::where, it must be non-NULL otherwise."] pub max_fpga_funcs : [starpu_max_fpga_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\nMPI MS devices for StarPU to simply look\nup the MPI MS function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional function to decide if the task is to be\ntransformed into a bubble"] pub bubble_func : starpu_bubble_func_t , # [doc = "Optional function to transform the task into a new graph"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\nvoid *buffers[] 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 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,\nand should not exceed \\ref STARPU_NMAXBUFS. If\ninsufficient, 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\ndata 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 data 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 NULL 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 (in J). This optional field is\nignored when set to NULL 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 ; 48usize] , # [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. Value 0 acts like if this field wasn't specified.\nColor representation is hex triplet (for example: 0xff0000 is red,\n0x0000ff is blue, 0xffa500 is orange, ...)."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL."] 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 , pub perf_counter_sample : * mut starpu_perf_counter_sample , pub perf_counter_values : * mut starpu_perf_counter_sample_cl_values , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet"] [:: std :: mem :: size_of :: < starpu_codelet > () - 832usize] ; ["Alignment of starpu_codelet"] [:: std :: mem :: align_of :: < starpu_codelet > () - 8usize] ; ["Offset of field: starpu_codelet::where_"] [:: std :: mem :: offset_of ! (starpu_codelet , where_) - 0usize] ; ["Offset of field: starpu_codelet::can_execute"] [:: std :: mem :: offset_of ! (starpu_codelet , can_execute) - 8usize] ; ["Offset of field: starpu_codelet::type_"] [:: std :: mem :: offset_of ! (starpu_codelet , type_) - 16usize] ; ["Offset of field: starpu_codelet::max_parallelism"] [:: std :: mem :: offset_of ! (starpu_codelet , max_parallelism) - 20usize] ; ["Offset of field: starpu_codelet::cpu_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_func) - 24usize] ; ["Offset of field: starpu_codelet::cuda_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_func) - 32usize] ; ["Offset of field: starpu_codelet::opencl_func"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_func) - 40usize] ; ["Offset of field: starpu_codelet::cpu_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs) - 48usize] ; ["Offset of field: starpu_codelet::cuda_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_funcs) - 80usize] ; ["Offset of field: starpu_codelet::cuda_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_flags) - 112usize] ; ["Offset of field: starpu_codelet::hip_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_funcs) - 120usize] ; ["Offset of field: starpu_codelet::hip_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_flags) - 152usize] ; ["Offset of field: starpu_codelet::opencl_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_funcs) - 160usize] ; ["Offset of field: starpu_codelet::opencl_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_flags) - 192usize] ; ["Offset of field: starpu_codelet::max_fpga_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , max_fpga_funcs) - 200usize] ; ["Offset of field: starpu_codelet::cpu_funcs_name"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs_name) - 232usize] ; ["Offset of field: starpu_codelet::bubble_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_func) - 264usize] ; ["Offset of field: starpu_codelet::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_gen_dag_func) - 272usize] ; ["Offset of field: starpu_codelet::nbuffers"] [:: std :: mem :: offset_of ! (starpu_codelet , nbuffers) - 280usize] ; ["Offset of field: starpu_codelet::modes"] [:: std :: mem :: offset_of ! (starpu_codelet , modes) - 284usize] ; ["Offset of field: starpu_codelet::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_modes) - 320usize] ; ["Offset of field: starpu_codelet::specific_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , specific_nodes) - 328usize] ; ["Offset of field: starpu_codelet::nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , nodes) - 332usize] ; ["Offset of field: starpu_codelet::dyn_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_nodes) - 368usize] ; ["Offset of field: starpu_codelet::model"] [:: std :: mem :: offset_of ! (starpu_codelet , model) - 376usize] ; ["Offset of field: starpu_codelet::energy_model"] [:: std :: mem :: offset_of ! (starpu_codelet , energy_model) - 384usize] ; ["Offset of field: starpu_codelet::per_worker_stats"] [:: std :: mem :: offset_of ! (starpu_codelet , per_worker_stats) - 392usize] ; ["Offset of field: starpu_codelet::name"] [:: std :: mem :: offset_of ! (starpu_codelet , name) - 776usize] ; ["Offset of field: starpu_codelet::color"] [:: std :: mem :: offset_of ! (starpu_codelet , color) - 784usize] ; ["Offset of field: starpu_codelet::callback_func"] [:: std :: mem :: offset_of ! (starpu_codelet , callback_func) - 792usize] ; ["Offset of field: starpu_codelet::flags"] [:: std :: mem :: offset_of ! (starpu_codelet , flags) - 800usize] ; ["Offset of field: starpu_codelet::perf_counter_sample"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_sample) - 808usize] ; ["Offset of field: starpu_codelet::perf_counter_values"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_values) - 816usize] ; ["Offset of field: starpu_codelet::checked"] [:: std :: mem :: offset_of ! (starpu_codelet , checked) - 824usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Codelet with empty function defined for all drivers"] pub static mut starpu_codelet_nop : starpu_codelet ; } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_descr"] [:: std :: mem :: size_of :: < starpu_data_descr > () - 16usize] ; ["Alignment of starpu_data_descr"] [:: std :: mem :: align_of :: < starpu_data_descr > () - 8usize] ; ["Offset of field: starpu_data_descr::handle"] [:: std :: mem :: offset_of ! (starpu_data_descr , handle) - 0usize] ; ["Offset of field: starpu_data_descr::mode"] [:: std :: mem :: offset_of ! (starpu_data_descr , mode) - 8usize] ; } ; 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)] 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 = "Optional file name where the task was submitted. This can be useful\nfor debugging purposes."] pub file : * const :: std :: os :: raw :: c_char , # [doc = "Optional line number where the task was submitted. This can be useful\nfor debugging purposes."] pub line : :: std :: os :: raw :: c_int , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to NULL,\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 data 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\ndata 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 insufficient, 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 needed 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 insufficient,\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 NULL. 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 pointer which points to the return value of submitted task.\nThe default value is NULL. starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be used to respectively\npack and unpack the return value into and form it. starpu_task::cl_ret\ncan be used for MPI support. The only requirement is that\nthe size of the return value must be set in starpu_task::cl_ret_size ."] pub cl_ret : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. The buffer of starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be allocated with\nthe starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret.\nstarpu_task::cl_ret_size can be used for MPI support."] pub cl_ret_size : usize , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *) which\nspecifies a possible callback. If this pointer is non-NULL,\nthe callback function is executed on the host after the execution of\nthe task. Contrary to starpu_task::callback_func, it is called\nbefore releasing tasks which depend on this task, so those cannot be\nalready executing. The callback is passed\nthe value contained in the starpu_task::epilogue_callback_arg field.\nNo callback is executed if the field is set to NULL.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EPILOGUE_CALLBACK followed by the function pointer."] pub epilogue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is NULL. This is\nthe pointer passed to the epilogue callback function. This field is\nignored if the field starpu_task::epilogue_callback_func is set to\nNULL."] pub epilogue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, the callback function is executed on the\nhost after the execution of the task. Contrary to\nstarpu_task::epilogue_callback, it is called after releasing\ntasks which depend on this task, so those\nmight 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 NULL.\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 NULL. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\nNULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void*)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 = "Transaction to which the task belongs, if any"] pub transaction : * mut starpu_transaction , # [doc = "Transaction epoch to which the task belongs, if any"] pub trs_epoch : starpu_trs_epoch_t , # [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 this task has failed and will thus have to be retried\n\nSet by StarPU."] pub failed : :: 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\nCall starpu_task_status_get_as_string() to get the status as a string.\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 NULL."] 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 starpu_perfmodel_plot, 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 in microseconds. 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 = "When using hierarchical dags, the job identifier of the\nbubble task which created the current task"] pub bubble_parent : :: std :: os :: raw :: c_ulong , # [doc = "When using hierarchical dags, a pointer to the bubble\ndecision function"] pub bubble_func : starpu_bubble_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble decision function"] pub bubble_func_arg : * mut :: std :: os :: raw :: c_void , # [doc = "When using hierarchical dags, a pointer to the bubble\nDAG generation function"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble DAG generation function"] pub bubble_gen_dag_func_arg : * mut :: std :: os :: raw :: c_void , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task"] [:: std :: mem :: size_of :: < starpu_task > () - 552usize] ; ["Alignment of starpu_task"] [:: std :: mem :: align_of :: < starpu_task > () - 8usize] ; ["Offset of field: starpu_task::name"] [:: std :: mem :: offset_of ! (starpu_task , name) - 0usize] ; ["Offset of field: starpu_task::file"] [:: std :: mem :: offset_of ! (starpu_task , file) - 8usize] ; ["Offset of field: starpu_task::line"] [:: std :: mem :: offset_of ! (starpu_task , line) - 16usize] ; ["Offset of field: starpu_task::cl"] [:: std :: mem :: offset_of ! (starpu_task , cl) - 24usize] ; ["Offset of field: starpu_task::where_"] [:: std :: mem :: offset_of ! (starpu_task , where_) - 32usize] ; ["Offset of field: starpu_task::nbuffers"] [:: std :: mem :: offset_of ! (starpu_task , nbuffers) - 36usize] ; ["Offset of field: starpu_task::dyn_handles"] [:: std :: mem :: offset_of ! (starpu_task , dyn_handles) - 40usize] ; ["Offset of field: starpu_task::dyn_interfaces"] [:: std :: mem :: offset_of ! (starpu_task , dyn_interfaces) - 48usize] ; ["Offset of field: starpu_task::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_task , dyn_modes) - 56usize] ; ["Offset of field: starpu_task::handles"] [:: std :: mem :: offset_of ! (starpu_task , handles) - 64usize] ; ["Offset of field: starpu_task::interfaces"] [:: std :: mem :: offset_of ! (starpu_task , interfaces) - 128usize] ; ["Offset of field: starpu_task::modes"] [:: std :: mem :: offset_of ! (starpu_task , modes) - 192usize] ; ["Offset of field: starpu_task::handles_sequential_consistency"] [:: std :: mem :: offset_of ! (starpu_task , handles_sequential_consistency) - 224usize] ; ["Offset of field: starpu_task::cl_arg"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg) - 232usize] ; ["Offset of field: starpu_task::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg_size) - 240usize] ; ["Offset of field: starpu_task::cl_ret"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret) - 248usize] ; ["Offset of field: starpu_task::cl_ret_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret_size) - 256usize] ; ["Offset of field: starpu_task::epilogue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_func) - 264usize] ; ["Offset of field: starpu_task::epilogue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_arg) - 272usize] ; ["Offset of field: starpu_task::callback_func"] [:: std :: mem :: offset_of ! (starpu_task , callback_func) - 280usize] ; ["Offset of field: starpu_task::callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , callback_arg) - 288usize] ; ["Offset of field: starpu_task::prologue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_func) - 296usize] ; ["Offset of field: starpu_task::prologue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_arg) - 304usize] ; ["Offset of field: starpu_task::prologue_callback_pop_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_func) - 312usize] ; ["Offset of field: starpu_task::prologue_callback_pop_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_arg) - 320usize] ; ["Offset of field: starpu_task::transaction"] [:: std :: mem :: offset_of ! (starpu_task , transaction) - 328usize] ; ["Offset of field: starpu_task::trs_epoch"] [:: std :: mem :: offset_of ! (starpu_task , trs_epoch) - 336usize] ; ["Offset of field: starpu_task::tag_id"] [:: std :: mem :: offset_of ! (starpu_task , tag_id) - 344usize] ; ["Offset of field: starpu_task::mf_skip"] [:: std :: mem :: offset_of ! (starpu_task , mf_skip) - 354usize] ; ["Offset of field: starpu_task::failed"] [:: std :: mem :: offset_of ! (starpu_task , failed) - 355usize] ; ["Offset of field: starpu_task::scheduled"] [:: std :: mem :: offset_of ! (starpu_task , scheduled) - 356usize] ; ["Offset of field: starpu_task::prefetched"] [:: std :: mem :: offset_of ! (starpu_task , prefetched) - 357usize] ; ["Offset of field: starpu_task::workerid"] [:: std :: mem :: offset_of ! (starpu_task , workerid) - 360usize] ; ["Offset of field: starpu_task::workerorder"] [:: std :: mem :: offset_of ! (starpu_task , workerorder) - 364usize] ; ["Offset of field: starpu_task::workerids"] [:: std :: mem :: offset_of ! (starpu_task , workerids) - 368usize] ; ["Offset of field: starpu_task::workerids_len"] [:: std :: mem :: offset_of ! (starpu_task , workerids_len) - 376usize] ; ["Offset of field: starpu_task::priority"] [:: std :: mem :: offset_of ! (starpu_task , priority) - 380usize] ; ["Offset of field: starpu_task::status"] [:: std :: mem :: offset_of ! (starpu_task , status) - 384usize] ; ["Offset of field: starpu_task::magic"] [:: std :: mem :: offset_of ! (starpu_task , magic) - 388usize] ; ["Offset of field: starpu_task::type_"] [:: std :: mem :: offset_of ! (starpu_task , type_) - 392usize] ; ["Offset of field: starpu_task::color"] [:: std :: mem :: offset_of ! (starpu_task , color) - 396usize] ; ["Offset of field: starpu_task::sched_ctx"] [:: std :: mem :: offset_of ! (starpu_task , sched_ctx) - 400usize] ; ["Offset of field: starpu_task::hypervisor_tag"] [:: std :: mem :: offset_of ! (starpu_task , hypervisor_tag) - 404usize] ; ["Offset of field: starpu_task::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_task , possibly_parallel) - 408usize] ; ["Offset of field: starpu_task::bundle"] [:: std :: mem :: offset_of ! (starpu_task , bundle) - 416usize] ; ["Offset of field: starpu_task::profiling_info"] [:: std :: mem :: offset_of ! (starpu_task , profiling_info) - 424usize] ; ["Offset of field: starpu_task::flops"] [:: std :: mem :: offset_of ! (starpu_task , flops) - 432usize] ; ["Offset of field: starpu_task::predicted"] [:: std :: mem :: offset_of ! (starpu_task , predicted) - 440usize] ; ["Offset of field: starpu_task::predicted_transfer"] [:: std :: mem :: offset_of ! (starpu_task , predicted_transfer) - 448usize] ; ["Offset of field: starpu_task::predicted_start"] [:: std :: mem :: offset_of ! (starpu_task , predicted_start) - 456usize] ; ["Offset of field: starpu_task::prev"] [:: std :: mem :: offset_of ! (starpu_task , prev) - 464usize] ; ["Offset of field: starpu_task::next"] [:: std :: mem :: offset_of ! (starpu_task , next) - 472usize] ; ["Offset of field: starpu_task::starpu_private"] [:: std :: mem :: offset_of ! (starpu_task , starpu_private) - 480usize] ; ["Offset of field: starpu_task::omp_task"] [:: std :: mem :: offset_of ! (starpu_task , omp_task) - 488usize] ; ["Offset of field: starpu_task::bubble_parent"] [:: std :: mem :: offset_of ! (starpu_task , bubble_parent) - 496usize] ; ["Offset of field: starpu_task::bubble_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func) - 504usize] ; ["Offset of field: starpu_task::bubble_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func_arg) - 512usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func) - 520usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func_arg) - 528usize] ; ["Offset of field: starpu_task::nb_termination_call_required"] [:: std :: mem :: offset_of ! (starpu_task , nb_termination_call_required) - 536usize] ; ["Offset of field: starpu_task::sched_data"] [:: std :: mem :: offset_of ! (starpu_task , sched_data) - 544usize] ; } ; 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 unsafe fn cl_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn cl_ret_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_cl_ret_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 unsafe fn cl_ret_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_ret_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn 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_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 unsafe fn callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn epilogue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_epilogue_callback_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 unsafe fn epilogue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_epilogue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 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 (4usize , 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 (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 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 (5usize , 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 (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_pop_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_pop_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 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 (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_tag_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_tag_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 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 (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn sequential_consistency_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_sequential_consistency_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 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 (8usize , 1u8 , val as u64) } } # [inline] pub unsafe fn synchronous_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 8usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_synchronous_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 8usize , 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 (9usize , 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 (9usize , 1u8 , val as u64) } } # [inline] pub unsafe fn execute_on_a_specific_worker_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 9usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_execute_on_a_specific_worker_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 9usize , 1u8 , val as u64 ,) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 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 (10usize , 1u8 , val as u64) } } # [inline] pub unsafe fn detach_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 10usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_detach_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 10usize , 1u8 , val as u64 ,) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 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 (11usize , 1u8 , val as u64) } } # [inline] pub unsafe fn destroy_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 11usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_destroy_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 11usize , 1u8 , val as u64 ,) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (12usize , 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 (12usize , 1u8 , val as u64) } } # [inline] pub unsafe fn regenerate_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 12usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_regenerate_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 12usize , 1u8 , val as u64 ,) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (13usize , 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 (13usize , 1u8 , val as u64) } } # [inline] pub unsafe fn no_submitorder_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 13usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_no_submitorder_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 13usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , cl_ret_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , epilogue_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 cl_ret_free : u32 = unsafe { :: std :: mem :: transmute (cl_ret_free) } ; cl_ret_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let epilogue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (epilogue_callback_arg_free) } ; epilogue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 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 (5usize , 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 (6usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (9usize , 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 (10usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (12usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (13usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } unsafe 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.\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_init (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_clean (task : * mut starpu_task) ; } unsafe 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().\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_create () -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Allocate a task structure that does nothing but accesses data \\p handle\nwith mode \\p mode. This allows to synchronize with the task graph, according\nto the sequential consistency, against tasks submitted before or after\nsubmitting this task. One can then use starpu_task_declare_deps_array() or\nstarpu_task_end_dep_add() / starpu_task_end_dep_release() to add dependencies\nagainst this task before submitting it.\nSee \\ref SynchronizationTasks for more details."] pub fn starpu_task_create_sync (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> * mut starpu_task ; } unsafe 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.\nSee \\ref Per-taskFeedback and \\ref PerformanceModelExample for more details."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Tell StarPU to free the resources associated with \\p task when the task is\nover. This is equivalent to having set task->destroy = 1 before submission,\nthe difference is that this can be called after submission and properly deals\nwith concurrency with the task execution.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_set_destroy (task : * mut starpu_task) ; } unsafe 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-ENODEV 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Submit \\p task to StarPU with dependency bypass.\n\nThis can only be called on behalf of another task which has already taken the\nproper dependencies, e.g. this task is just an attempt of doing the actual\ncomputation of that task.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_submit_nodeps (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingTasksToAContext for more details."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if \\p task is terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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, -EINVAL indicates that the\nspecified task was either synchronous or detached.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, -EINVAL indicates that\none of the tasks was either synchronous or detached.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowtoReuseMemory for more details."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] 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 ; } unsafe extern "C" { # [doc = "Wait until there is no more ready task.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_pop () ; } unsafe extern "C" { # [doc = "See \\ref GraphScheduling for more details."] pub fn starpu_do_schedule () ; } unsafe 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++.\nSee \\ref DefiningACodelet for more details."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl.\nSee \\ref Per-codeletFeedback for more details."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Return the task currently executed by the worker, or NULL 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.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_task_get_current () -> * mut starpu_task ; } unsafe 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.\n\nSee \\ref SpecifyingATargetNode for more details."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the name of the performance model of \\p task.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref TraceTaskDetails for more details."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Create and submit an empty task with the given callback.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Function to be used as a prologue callback to enable fault tolerance for the\ntask. This prologue will create a try-task, i.e a duplicate of the task,\nwhich will to the actual computation.\n\nThe prologue argument can be set to a check_ft function that will be\ncalled on termination of the duplicate, which can check the result of the\ntask, and either confirm success, or resubmit another attempt.\nIf it is not set, the default implementation is to just resubmit a new\ntry-task.\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_prologue (check_ft : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Create a try-task for a \\p meta_task, given a \\p template_task task\ntemplate. The meta task can be passed as template on the first call, but\nsince it is mangled by starpu_task_ft_create_retry(), further calls\n(typically made by the check_ft callback) need to be passed the previous\ntry-task as template task.\n\n\\p check_ft is similar to the prologue argument of\nstarpu_task_ft_prologue(), and is typically set to the very function calling\nstarpu_task_ft_create_retry().\n\nThe try-task is returned, and can be modified (e.g. to change scheduling\nparameters) before being submitted with starpu_task_submit_nodeps().\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_create_retry (meta_task : * const starpu_task , template_task : * const starpu_task , check_ft : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Record that this task failed, and should thus be retried.\nThis is usually called from the task codelet function itself, after checking\nthe result and noticing that the computation went wrong, and thus the task\nshould be retried. The performance of this task execution will not be\nrecorded for performance models.\n\nThis can only be called for a task whose data access modes are either\n::STARPU_R and ::STARPU_W."] pub fn starpu_task_ft_failed (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Notify that the try-task was successful and thus the meta-task was\nsuccessful.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_success (meta_task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for \\ref STARPU_WATCHDOG_TIMEOUT seconds.\nSee \\ref WatchdogSupport for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the given status as a string"] pub fn starpu_task_status_get_as_string (status : starpu_task_status) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Specify a minimum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MIN_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_min_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Specify a maximum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MAX_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_max_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Function to open a new transaction object and start the first transaction epoch.\n\n@return A pointer to an initializes struct starpu_transaction\nor \\c NULL if submitting the transaction begin task failed with \\c ENODEV.\nSee \\ref TransactionsCreation for more details."] pub fn starpu_transaction_open (do_start_func : :: std :: option :: Option < unsafe extern "C" fn (buffer : * mut :: std :: os :: raw :: c_void , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , do_start_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_transaction ; } unsafe extern "C" { # [doc = "Function to mark the end of the current transaction epoch and start a new epoch.\nSee \\ref TransactionsEpochNext for more details."] pub fn starpu_transaction_next_epoch (p_trs : * mut starpu_transaction , do_start_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Function to mark the end of the last transaction epoch and free the transaction object.\nSee \\ref TransactionsClosing for more details."] pub fn starpu_transaction_close (p_trs : * mut starpu_transaction) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; # [doc = "< CPU core"] pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; # [doc = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_RAM : starpu_node_kind = 4 ; # [doc = "< Disk memory"] pub const STARPU_DISK_RAM : starpu_node_kind = 5 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_RAM : starpu_node_kind = 7 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_RAM : starpu_node_kind = 8 ; # [doc = "< Maximum value of memory types"] pub const STARPU_MAX_RAM : starpu_node_kind = 8 ; # [doc = "< Number of memory types"] pub const STARPU_NRAM : starpu_node_kind = 9 ; # [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 = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_WORKER : starpu_worker_archtype = 4 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_WORKER : starpu_worker_archtype = 6 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_WORKER : starpu_worker_archtype = 7 ; # [doc = "< Number of arch types"] pub const STARPU_NARCH : starpu_worker_archtype = 8 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 255 ; # [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)] 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 ; 48usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_ctx_iterator"] [:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () - 80usize] ; ["Alignment of starpu_sched_ctx_iterator"] [:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::cursor"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , cursor) - 0usize] ; ["Offset of field: starpu_sched_ctx_iterator::value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , value) - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::possible_value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possible_value) - 16usize] ; ["Offset of field: starpu_sched_ctx_iterator::visited"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , visited) - 24usize] ; ["Offset of field: starpu_sched_ctx_iterator::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possibly_parallel) - 72usize] ; } ; 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)] 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 ; 48usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 48usize] , pub is_master : [:: std :: os :: raw :: c_char ; 48usize] , # [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 collection"] 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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_worker_collection"] [:: std :: mem :: size_of :: < starpu_worker_collection > () - 264usize] ; ["Alignment of starpu_worker_collection"] [:: std :: mem :: align_of :: < starpu_worker_collection > () - 8usize] ; ["Offset of field: starpu_worker_collection::workerids"] [:: std :: mem :: offset_of ! (starpu_worker_collection , workerids) - 0usize] ; ["Offset of field: starpu_worker_collection::collection_private"] [:: std :: mem :: offset_of ! (starpu_worker_collection , collection_private) - 8usize] ; ["Offset of field: starpu_worker_collection::nworkers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nworkers) - 16usize] ; ["Offset of field: starpu_worker_collection::unblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , unblocked_workers) - 24usize] ; ["Offset of field: starpu_worker_collection::nunblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nunblocked_workers) - 32usize] ; ["Offset of field: starpu_worker_collection::masters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , masters) - 40usize] ; ["Offset of field: starpu_worker_collection::nmasters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nmasters) - 48usize] ; ["Offset of field: starpu_worker_collection::present"] [:: std :: mem :: offset_of ! (starpu_worker_collection , present) - 52usize] ; ["Offset of field: starpu_worker_collection::is_unblocked"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_unblocked) - 100usize] ; ["Offset of field: starpu_worker_collection::is_master"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_master) - 148usize] ; ["Offset of field: starpu_worker_collection::type_"] [:: std :: mem :: offset_of ! (starpu_worker_collection , type_) - 196usize] ; ["Offset of field: starpu_worker_collection::has_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , has_next) - 200usize] ; ["Offset of field: starpu_worker_collection::get_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , get_next) - 208usize] ; ["Offset of field: starpu_worker_collection::add"] [:: std :: mem :: offset_of ! (starpu_worker_collection , add) - 216usize] ; ["Offset of field: starpu_worker_collection::remove"] [:: std :: mem :: offset_of ! (starpu_worker_collection , remove) - 224usize] ; ["Offset of field: starpu_worker_collection::init"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init) - 232usize] ; ["Offset of field: starpu_worker_collection::deinit"] [:: std :: mem :: offset_of ! (starpu_worker_collection , deinit) - 240usize] ; ["Offset of field: starpu_worker_collection::init_iterator"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator) - 248usize] ; ["Offset of field: starpu_worker_collection::init_iterator_for_parallel_tasks"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator_for_parallel_tasks) - 256usize] ; } ; 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 () } } } unsafe extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } unsafe extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } unsafe extern "C" { # [doc = "Wait for all workers to be initialised. Calling this function is\nnormally not necessary. It is called for example in\ntools/starpu_machine_display to make sure all workers\ninformation are correctly set before printing their information.\nSee \\ref PauseResume for more details."] pub fn starpu_worker_wait_for_initialisation () ; } unsafe extern "C" { # [doc = "Return true if type matches one of StarPU's defined worker architectures.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_archtype_is_valid (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Convert a mask of architectures to a worker archtype.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_arch_mask_to_worker_archtype (mask : :: std :: os :: raw :: c_uint) -> starpu_worker_archtype ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of HIP devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXHIPDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_hip_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of TCPIP Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_tcpip_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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).\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_sched_find_all_worker_combinations () ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\nNULL) value is returned in case of success, -EINVAL\nindicates that \\p type is not valid otherwise.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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-ERANGE 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return true if worker type can execute this task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_type_can_execute_task (worker_type : starpu_worker_archtype , task : * const starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all workers.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_all (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe extern "C" { # [doc = "Display on \\p output the number of workers of the given \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_count (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe 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 hwloc in case it is available.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devnum (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_subworkerid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return when the current task is expected to be finished.\n\nNote: the returned date should be used with caution since the task might very\nwell end just after this function returns.\n\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_worker_get_current_task_exp_end (workerid : :: std :: os :: raw :: c_uint , date : * mut timespec) ; } unsafe extern "C" { # [doc = "Return whether worker \\p workerid is currently blocked in a parallel task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return worker \\p type from a string.\nReturns STARPU_UNKNOWN_WORKER if the string doesn't match a worker type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_from_string (type_ : * const :: std :: os :: raw :: c_char) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string suitable for environment variable names (CPU, CUDA, etc.).\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_env_var (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe 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().\nSee \\ref InteroperabilityHWLOC for more details."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } unsafe extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to the worker \\p workerid.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } unsafe extern "C" { # [doc = "See \\ref TopologyMemory for more details."] pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the memory node associated to the current worker.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes of a given \\p kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count_by_kind (kind : starpu_node_kind) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Get the list of memory nodes of kind \\p kind.\nFill the array \\p memory_nodes_ids with the memory nodes numbers.\nThe argument \\p maxsize indicates the size of the array\n\\p memory_nodes_ids. The return value gives the number of node numbers\nthat were put in the array. -ERANGE is returned if \\p maxsize\nis lower than the number of memory nodes with the appropriate kind: in that\ncase, the array is filled with the \\p maxsize first elements. To avoid such\noverflows, the value of maxsize can be chosen by the means of function\nstarpu_memory_nodes_get_count_by_kind(), or by passing a value greater or\nequal to \\ref STARPU_MAXNODES.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_ids_by_type (kind : starpu_node_kind , memory_nodes_ids : * mut :: std :: os :: raw :: c_uint , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } unsafe extern "C" { # [doc = "Return the type of worker which operates on memory node kind \\p node_kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_worker_archtype (node_kind : starpu_node_kind) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the type of memory node that arch type \\p type operates on.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node_kind (type_ : starpu_worker_archtype) -> starpu_node_kind ; } unsafe 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 ; } unsafe 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 UINT_MAX-1 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_on () ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_off () ; } unsafe extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Acquire the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock_self () ; } unsafe extern "C" { # [doc = "Release the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock_self () ; } unsafe extern "C" { # [doc = "Return the number of different combined workers.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the current combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref Fork-modeParallelTasks and \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Register a new combined worker and get its identifier.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Get the description of a combined worker.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } unsafe 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).\nSee \\ref SchedulingHelpers for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_device"] [:: std :: mem :: size_of :: < starpu_perfmodel_device > () - 12usize] ; ["Alignment of starpu_perfmodel_device"] [:: std :: mem :: align_of :: < starpu_perfmodel_device > () - 4usize] ; ["Offset of field: starpu_perfmodel_device::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , type_) - 0usize] ; ["Offset of field: starpu_perfmodel_device::devid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , devid) - 4usize] ; ["Offset of field: starpu_perfmodel_device::ncores"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , ncores) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_arch > () - 16usize] ; ["Alignment of starpu_perfmodel_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_arch::ndevices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , ndevices) - 0usize] ; ["Offset of field: starpu_perfmodel_arch::devices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , devices) - 8usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_entry"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () - 88usize] ; ["Alignment of starpu_perfmodel_history_entry"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::mean"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , mean) - 0usize] ; ["Offset of field: starpu_perfmodel_history_entry::deviation"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , deviation) - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum) - 16usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum2) - 24usize] ; ["Offset of field: starpu_perfmodel_history_entry::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nsample) - 32usize] ; ["Offset of field: starpu_perfmodel_history_entry::nerror"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nerror) - 36usize] ; ["Offset of field: starpu_perfmodel_history_entry::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel_history_entry::size"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , size) - 48usize] ; ["Offset of field: starpu_perfmodel_history_entry::flops"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , flops) - 56usize] ; ["Offset of field: starpu_perfmodel_history_entry::duration"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , duration) - 64usize] ; ["Offset of field: starpu_perfmodel_history_entry::tag"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , tag) - 72usize] ; ["Offset of field: starpu_perfmodel_history_entry::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , parameters) - 80usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_list"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () - 16usize] ; ["Alignment of starpu_perfmodel_history_list"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_list::next"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , next) - 0usize] ; ["Offset of field: starpu_perfmodel_history_list::entry"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , entry) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_regression_model"] [:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () - 120usize] ; ["Alignment of starpu_perfmodel_regression_model"] [:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlny) - 0usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx) - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx2) - 16usize] ; ["Offset of field: starpu_perfmodel_regression_model::minx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , minx) - 24usize] ; ["Offset of field: starpu_perfmodel_regression_model::maxx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , maxx) - 32usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnxlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnxlny) - 40usize] ; ["Offset of field: starpu_perfmodel_regression_model::alpha"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , alpha) - 48usize] ; ["Offset of field: starpu_perfmodel_regression_model::beta"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , beta) - 56usize] ; ["Offset of field: starpu_perfmodel_regression_model::valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , valid) - 64usize] ; ["Offset of field: starpu_perfmodel_regression_model::a"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , a) - 72usize] ; ["Offset of field: starpu_perfmodel_regression_model::b"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , b) - 80usize] ; ["Offset of field: starpu_perfmodel_regression_model::c"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , c) - 88usize] ; ["Offset of field: starpu_perfmodel_regression_model::nl_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nl_valid) - 96usize] ; ["Offset of field: starpu_perfmodel_regression_model::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nsample) - 100usize] ; ["Offset of field: starpu_perfmodel_regression_model::coeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , coeff) - 104usize] ; ["Offset of field: starpu_perfmodel_regression_model::ncoeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , ncoeff) - 112usize] ; ["Offset of field: starpu_perfmodel_regression_model::multi_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , multi_valid) - 116usize] ; } ; 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)] 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_per_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () - 408usize] ; ["Alignment of starpu_perfmodel_per_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , cost_function) - 0usize] ; ["Offset of field: starpu_perfmodel_per_arch::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , size_base) - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::history"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , history) - 16usize] ; ["Offset of field: starpu_perfmodel_per_arch::list"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , list) - 24usize] ; ["Offset of field: starpu_perfmodel_per_arch::regression"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , regression) - 32usize] ; ["Offset of field: starpu_perfmodel_per_arch::debug_path"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , debug_path) - 152usize] ; } ; 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-worker cost model function"] pub const STARPU_PER_WORKER : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 2 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 3 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic linear regression-based cost model (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 7 ; # [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)] pub struct starpu_perfmodel { # [doc = "type of performance model\n\n- \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
\n- \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
\n- \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
\n- \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
\n
"] 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_PER_ARCH. 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_PER_WORKER. Take a task, a worker id and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that worker."] pub worker_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not NULL, 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 NULL, 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 = "name of the file storing the performance model. It is non\nNULL if the model has been loaded or stored in a file."] pub path : * mut :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel"] [:: std :: mem :: size_of :: < starpu_perfmodel > () - 128usize] ; ["Alignment of starpu_perfmodel"] [:: std :: mem :: align_of :: < starpu_perfmodel > () - 8usize] ; ["Offset of field: starpu_perfmodel::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel , type_) - 0usize] ; ["Offset of field: starpu_perfmodel::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , cost_function) - 8usize] ; ["Offset of field: starpu_perfmodel::arch_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , arch_cost_function) - 16usize] ; ["Offset of field: starpu_perfmodel::worker_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , worker_cost_function) - 24usize] ; ["Offset of field: starpu_perfmodel::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel , size_base) - 32usize] ; ["Offset of field: starpu_perfmodel::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel::symbol"] [:: std :: mem :: offset_of ! (starpu_perfmodel , symbol) - 48usize] ; ["Offset of field: starpu_perfmodel::path"] [:: std :: mem :: offset_of ! (starpu_perfmodel , path) - 56usize] ; ["Offset of field: starpu_perfmodel::is_loaded"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_loaded) - 64usize] ; ["Offset of field: starpu_perfmodel::benchmarking"] [:: std :: mem :: offset_of ! (starpu_perfmodel , benchmarking) - 68usize] ; ["Offset of field: starpu_perfmodel::is_init"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_init) - 72usize] ; ["Offset of field: starpu_perfmodel::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters) - 80usize] ; ["Offset of field: starpu_perfmodel::parameters_names"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters_names) - 88usize] ; ["Offset of field: starpu_perfmodel::nparameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , nparameters) - 96usize] ; ["Offset of field: starpu_perfmodel::combinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , combinations) - 104usize] ; ["Offset of field: starpu_perfmodel::ncombinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , ncombinations) - 112usize] ; ["Offset of field: starpu_perfmodel::state"] [:: std :: mem :: offset_of ! (starpu_perfmodel , state) - 120usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = "Deinitialize the \\p model performance model structure. You need to call this\nbefore deallocating the structure. You will probably want to call\nstarpu_perfmodel_unload_model() before calling this function, to save the perfmodel."] pub fn starpu_perfmodel_deinit (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_start - start counting hardware events in an event set\n\n- \\p workerid is the worker on which calibration is to be performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration will be run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_start (workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_stop - stop counting hardware events in an event set\n\n- \\p model is the energy performance model to be filled with the result\n- \\p task is a task specimen, so the performance model folds the result according to the parameter sizes of the task.\n- \\p nimpl is the implementation number run during calibration\n- \\p ntasks is the number of tasks run during calibration\n- \\p workerid is the worker on which calibration was performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration was run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_stop (model : * mut starpu_perfmodel , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint , ntasks : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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$STARPU_HOME/.starpu. 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Save the performance model in its file."] pub fn starpu_save_history_based_model (model : * mut starpu_perfmodel) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } unsafe 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 tools/starpu_perfmodel_display.c."] pub fn starpu_perfmodel_free_sampling () ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the estimated time in µs 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 ; } unsafe 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 () ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with one explicit\nmeasurement (in µs or J), 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.\n\nNote that this records only one measurement, and StarPU would ignore\nthe first measurement (since it is usually disturbed by library loading\netc.). Make sure to call this function several times to record all your\nmeasurements.\n\nYou can also call starpu_perfmodel_update_history_n() to directly provide an\naverage performed on several tasks.\n\nSee \\ref PerformanceModelCalibration for more details."] 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) ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with an explicit average measurement (in µs or J).\n\nThis is similar to starpu_perfmodel_update_history(), but records a batch of\n\\p number measurements provided as the average of the measurements \\p average_measured."] pub fn starpu_perfmodel_update_history_n (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 , average_measured : f64 , number : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the latency of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task_list"] [:: std :: mem :: size_of :: < starpu_task_list > () - 16usize] ; ["Alignment of starpu_task_list"] [:: std :: mem :: align_of :: < starpu_task_list > () - 8usize] ; ["Offset of field: starpu_task_list::head"] [:: std :: mem :: offset_of ! (starpu_task_list , head) - 0usize] ; ["Offset of field: starpu_task_list::tail"] [:: std :: mem :: offset_of ! (starpu_task_list , tail) - 8usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize a list structure.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } unsafe extern "C" { # [doc = "Push \\p task at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Push \\p task at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Get the front of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the back of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test if \\p list is empty.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Remove \\p task from \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Remove the element at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Remove the element at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the first task of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the end of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Move list from one head \\p lsrc to another \\p ldst.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } unsafe 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\n- ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n
- ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n
- ::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
- ::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
- 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
\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.\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Identical to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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\ntask->dyn_handles array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating task->dyn_handles 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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().\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [doc = "Structure to be used for starpu_codelet_pack_arg_init() & co, and\nstarpu_codelet_unpack_arg_init() & co. The contents is public,\nhowever users should not directly access it, but only use as a\nparameter to the appropriate functions."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub arg_buffer_used : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet_pack_arg_data"] [:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () - 40usize] ; ["Alignment of starpu_codelet_pack_arg_data"] [:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer) - 0usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_size"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_size) - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_used"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_used) - 16usize] ; ["Offset of field: starpu_codelet_pack_arg_data::current_offset"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , current_offset) - 24usize] ; ["Offset of field: starpu_codelet_pack_arg_data::nargs"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , nargs) - 32usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } unsafe extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times.\nSee \\ref InsertTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } unsafe extern "C" { # [doc = "Initialize \\p state with \\p cl_arg and \\p cl_arg_size. This has to\nbe called before calling starpu_codelet_unpack_arg().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_init (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut :: std :: os :: raw :: c_void , cl_arg_size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of size \\p size from \\p state into \\p ptr with a copy.\n\\p state has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr\nwith a copy. \\p ptr is allocated before copying in it the value of\nthe argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_dup_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr.\n\\p ptr will be a pointer to the memory of the argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pick_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Finish unpacking data, after calling starpu_codelet_unpack_arg_init()\nonce and starpu_codelet_unpack_arg() or starpu_codelet_dup_arg() or\nstarpu_codelet_pick_arg() several times.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_fini (state : * mut starpu_codelet_pack_arg_data) ; } unsafe extern "C" { # [doc = "Call this function during unpacking to skip saving the argument in ptr.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_discard_arg (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] 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\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here given the task
\n- starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here gives back the task to the core. It must not\naccess this task any more
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- 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.
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n\nNote: to get an estimation of the task duration, \\p perf_workerid\nneeds to be used rather than \\p workerid, for the case of parallel\ntasks."] 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 NULL, 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 = "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 = " Whether this scheduling policy does data prefetching, and thus the\ncore should not try to do it opportunistically."] pub prefetches : :: std :: os :: raw :: c_int , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_policy"] [:: std :: mem :: size_of :: < starpu_sched_policy > () - 128usize] ; ["Alignment of starpu_sched_policy"] [:: std :: mem :: align_of :: < starpu_sched_policy > () - 8usize] ; ["Offset of field: starpu_sched_policy::init_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , init_sched) - 0usize] ; ["Offset of field: starpu_sched_policy::deinit_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , deinit_sched) - 8usize] ; ["Offset of field: starpu_sched_policy::push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task) - 16usize] ; ["Offset of field: starpu_sched_policy::simulate_push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , simulate_push_task) - 24usize] ; ["Offset of field: starpu_sched_policy::push_task_notify"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task_notify) - 32usize] ; ["Offset of field: starpu_sched_policy::pop_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pop_task) - 40usize] ; ["Offset of field: starpu_sched_policy::submit_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , submit_hook) - 48usize] ; ["Offset of field: starpu_sched_policy::pre_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pre_exec_hook) - 56usize] ; ["Offset of field: starpu_sched_policy::post_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , post_exec_hook) - 64usize] ; ["Offset of field: starpu_sched_policy::do_schedule"] [:: std :: mem :: offset_of ! (starpu_sched_policy , do_schedule) - 72usize] ; ["Offset of field: starpu_sched_policy::add_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , add_workers) - 80usize] ; ["Offset of field: starpu_sched_policy::remove_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , remove_workers) - 88usize] ; ["Offset of field: starpu_sched_policy::prefetches"] [:: std :: mem :: offset_of ! (starpu_sched_policy , prefetches) - 96usize] ; ["Offset of field: starpu_sched_policy::policy_name"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_name) - 104usize] ; ["Offset of field: starpu_sched_policy::policy_description"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_description) - 112usize] ; ["Offset of field: starpu_sched_policy::worker_type"] [:: std :: mem :: offset_of ! (starpu_sched_policy , worker_type) - 120usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Return an NULL-terminated array of all the predefined\nscheduling policies.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a scheduling policy to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policy (name : * const :: std :: os :: raw :: c_char) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a list of scheduling policies to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the default context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the given context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy () -> * mut starpu_sched_policy ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the job identifier associated with the task.\nSee \\ref TraceSchedTaskDetails for more details."] pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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 impl_mask == NULL to check for at\nleast one implementation without determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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\nimpl_mask == NULL to check for at least one implementation\nwithout determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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. \\p back is ignored: the task priority is\nused to order tasks in this queue.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions.\nSee \\ref PerformanceModelExample for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions).\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds on a given architecture \\p arch using given implementation \\p nimpl.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_length() but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_length (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the durations using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the durations.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } unsafe extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return expected energy use in J.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_energy but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_energy (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task energy use in J, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the energy uses using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the energy uses.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only).\nSee \\ref SchedulingHelpers for more details."] 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) > ; unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "The scheduling policy should call this when it makes a scheduling decision\nfor a task. This will possibly stop execution at this point, and then the\nprogrammer can inspect local variables etc. to determine why this scheduling\ndecision was done.\n\nSee \\ref STARPU_TASK_BREAK_ON_SCHED\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_task_break (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n- ::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
\n- ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n
\n- ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n
\n- ::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
\n
\nSee \\ref CreatingAContext for more details."] 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto.\nSee \\ref SubmittingTasksToAContext and \\ref TmpCTXS for more details."] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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.\nSee \\ref EmptyingAContext for more details."] pub fn starpu_sched_ctx_stop_task_submission () ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the function associated with the scheduler context \\p\nsched_ctx_id which was given through the field\nstarpu_conf::sched_policy_callback"] pub fn starpu_sched_ctx_get_sched_policy_callback (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; unsafe extern "C" { # [doc = "Initialize HIPBLAS on every HIPdevice. The\nHIPBLAS library must be initialized prior to any HIPBLAS call. Calling\nstarpu_hipblas_init() will initialize HIPBLAS on every HIP device\ncontrolled by StarPU. This call blocks until HIPBLAS has been properly\ninitialized on every device."] pub fn starpu_hipblas_init () ; } pub type hipblasHandle_t = * mut :: std :: os :: raw :: c_void ; unsafe extern "C" { # [doc = "Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It\nis properly initialized and configured for multistream by\nstarpu_hipblas_init()."] pub fn starpu_hipblas_get_local_handle () -> hipblasHandle_t ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the HIPBLAS library on\nevery HIP device."] pub fn starpu_hipblas_shutdown () ; } unsafe 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. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_init () ; } unsafe 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().\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_set_stream () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device.\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_shutdown () ; } unsafe extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_init () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_shutdown () ; } unsafe extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Stop recording tasks\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_stop () ; } unsafe extern "C" { # [doc = "Emit the DAG that was recorded on \\p output.\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } unsafe 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. \\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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_lp (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_mps (output : * mut FILE) ; } unsafe 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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a pointer value seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_ptr (input : * mut :: std :: os :: raw :: c_void , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc current\nstate. The return value should be considered as the new current\nstate for future CRC computation. This is used for computing data\nsize footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] 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 , # [doc = " PAPI Events"] pub papi_values : [:: std :: os :: raw :: c_longlong ; 15usize] , pub papi_event_set : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_task_info"] [:: std :: mem :: size_of :: < starpu_profiling_task_info > () - 368usize] ; ["Alignment of starpu_profiling_task_info"] [:: std :: mem :: align_of :: < starpu_profiling_task_info > () - 8usize] ; ["Offset of field: starpu_profiling_task_info::submit_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , submit_time) - 0usize] ; ["Offset of field: starpu_profiling_task_info::push_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_start_time) - 16usize] ; ["Offset of field: starpu_profiling_task_info::push_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_end_time) - 32usize] ; ["Offset of field: starpu_profiling_task_info::pop_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_start_time) - 48usize] ; ["Offset of field: starpu_profiling_task_info::pop_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_end_time) - 64usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_start_time) - 80usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_end_time) - 96usize] ; ["Offset of field: starpu_profiling_task_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , start_time) - 112usize] ; ["Offset of field: starpu_profiling_task_info::end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , end_time) - 128usize] ; ["Offset of field: starpu_profiling_task_info::release_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_start_time) - 144usize] ; ["Offset of field: starpu_profiling_task_info::release_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_end_time) - 160usize] ; ["Offset of field: starpu_profiling_task_info::callback_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_start_time) - 176usize] ; ["Offset of field: starpu_profiling_task_info::callback_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_end_time) - 192usize] ; ["Offset of field: starpu_profiling_task_info::workerid"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , workerid) - 208usize] ; ["Offset of field: starpu_profiling_task_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , used_cycles) - 216usize] ; ["Offset of field: starpu_profiling_task_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , stall_cycles) - 224usize] ; ["Offset of field: starpu_profiling_task_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , energy_consumed) - 232usize] ; ["Offset of field: starpu_profiling_task_info::papi_values"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_values) - 240usize] ; ["Offset of field: starpu_profiling_task_info::papi_event_set"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_event_set) - 360usize] ; } ; 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: {:?}, papi_values: {:?}, papi_event_set: {:?} }}" , self . workerid , self . energy_consumed , self . papi_values , self . papi_event_set) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info().\n\nThe executing_time, callback_time, waiting_time, sleeping_time, and\nscheduling_time are exclusive to each other, i.e. they can be added up, their\nsum is smaller than total_time. The difference between total_time and the sum\nis the uncategorized runtime overhead."] # [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 by the worker to execute callbacks, while not executing a\n task, during the profiling measurement interval."] pub callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish,\n while not executing a task or a callback, during the profiling\n measurement interval."] pub waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available, and\n not executing a task or a callback or waiting for a data transfer to\n finish, during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks, while not executing a\n task or a callback or waiting for a data transfer to finish, and there\n are tasks to be scheduled, during the profiling measurement interval."] pub scheduling_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval.\n Normally always equal to executing_time."] pub all_executing_time : timespec , # [doc = " Time spent by the worker to execute callbacks during the profiling measurement interval.\n Normally always greater than callback_time."] pub all_callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval.\n Normally always greater than waiting_time."] pub all_waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available during the profiling measurement interval.\n Normally always greater than sleeping_time."] pub all_sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks during the profiling measurement interval.\n Normally always greater than scheduling_time."] pub all_scheduling_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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_worker_info"] [:: std :: mem :: size_of :: < starpu_profiling_worker_info > () - 232usize] ; ["Alignment of starpu_profiling_worker_info"] [:: std :: mem :: align_of :: < starpu_profiling_worker_info > () - 8usize] ; ["Offset of field: starpu_profiling_worker_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_worker_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_worker_info::executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executing_time) - 32usize] ; ["Offset of field: starpu_profiling_worker_info::callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , callback_time) - 48usize] ; ["Offset of field: starpu_profiling_worker_info::waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , waiting_time) - 64usize] ; ["Offset of field: starpu_profiling_worker_info::sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , sleeping_time) - 80usize] ; ["Offset of field: starpu_profiling_worker_info::scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , scheduling_time) - 96usize] ; ["Offset of field: starpu_profiling_worker_info::all_executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_executing_time) - 112usize] ; ["Offset of field: starpu_profiling_worker_info::all_callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_callback_time) - 128usize] ; ["Offset of field: starpu_profiling_worker_info::all_waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_waiting_time) - 144usize] ; ["Offset of field: starpu_profiling_worker_info::all_sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_sleeping_time) - 160usize] ; ["Offset of field: starpu_profiling_worker_info::all_scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_scheduling_time) - 176usize] ; ["Offset of field: starpu_profiling_worker_info::executed_tasks"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executed_tasks) - 192usize] ; ["Offset of field: starpu_profiling_worker_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , used_cycles) - 200usize] ; ["Offset of field: starpu_profiling_worker_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , stall_cycles) - 208usize] ; ["Offset of field: starpu_profiling_worker_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , energy_consumed) - 216usize] ; ["Offset of field: starpu_profiling_worker_info::flops"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , flops) - 224usize] ; } ; 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) } } # [doc = "todo"] # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_bus_info"] [:: std :: mem :: size_of :: < starpu_profiling_bus_info > () - 48usize] ; ["Alignment of starpu_profiling_bus_info"] [:: std :: mem :: align_of :: < starpu_profiling_bus_info > () - 8usize] ; ["Offset of field: starpu_profiling_bus_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_bus_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_bus_info::transferred_bytes"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transferred_bytes) - 32usize] ; ["Offset of field: starpu_profiling_bus_info::transfer_count"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transfer_count) - 40usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_init () ; } unsafe extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init().\nSee \\ref TraceMpi for more details."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } unsafe 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 NULL, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned.\nSee \\ref Per-workerFeedback for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of buses in the machine.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the source point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the destination point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref FeedBackFigures for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } unsafe extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_bus_helper_display_summary () ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_worker_helper_display_summary () ; } unsafe 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).\nSee \\ref MemoryFeedback for more details."] pub fn starpu_data_display_memory_stats () ; } pub const starpu_prof_tool_event_none : starpu_prof_tool_event = 0 ; pub const starpu_prof_tool_event_init : starpu_prof_tool_event = 1 ; pub const starpu_prof_tool_event_terminate : starpu_prof_tool_event = 2 ; pub const starpu_prof_tool_event_init_begin : starpu_prof_tool_event = 3 ; pub const starpu_prof_tool_event_init_end : starpu_prof_tool_event = 4 ; pub const starpu_prof_tool_event_driver_init : starpu_prof_tool_event = 5 ; pub const starpu_prof_tool_event_driver_deinit : starpu_prof_tool_event = 6 ; pub const starpu_prof_tool_event_driver_init_start : starpu_prof_tool_event = 7 ; pub const starpu_prof_tool_event_driver_init_end : starpu_prof_tool_event = 8 ; pub const starpu_prof_tool_event_start_cpu_exec : starpu_prof_tool_event = 9 ; pub const starpu_prof_tool_event_end_cpu_exec : starpu_prof_tool_event = 10 ; pub const starpu_prof_tool_event_start_gpu_exec : starpu_prof_tool_event = 11 ; pub const starpu_prof_tool_event_end_gpu_exec : starpu_prof_tool_event = 12 ; pub const starpu_prof_tool_event_start_transfer : starpu_prof_tool_event = 13 ; pub const starpu_prof_tool_event_end_transfer : starpu_prof_tool_event = 14 ; pub const starpu_prof_tool_event_user_start : starpu_prof_tool_event = 15 ; pub const starpu_prof_tool_event_user_end : starpu_prof_tool_event = 16 ; # [doc = "Event type"] pub type starpu_prof_tool_event = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_driver_cpu : starpu_prof_tool_driver_type = 0 ; pub const starpu_prof_tool_driver_gpu : starpu_prof_tool_driver_type = 1 ; pub const starpu_prof_tool_driver_hip : starpu_prof_tool_driver_type = 2 ; pub const starpu_prof_tool_driver_ocl : starpu_prof_tool_driver_type = 3 ; # [doc = "todo"] pub type starpu_prof_tool_driver_type = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_command_reg : starpu_prof_tool_command = 0 ; pub const starpu_prof_tool_command_toggle : starpu_prof_tool_command = 1 ; pub const starpu_prof_tool_command_toggle_per_thread : starpu_prof_tool_command = 2 ; # [doc = "todo"] pub type starpu_prof_tool_command = :: std :: os :: raw :: c_uint ; # [doc = "General information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_prof_tool_info { pub conf : * mut starpu_conf , pub event_type : starpu_prof_tool_event , pub starpu_version : [:: std :: os :: raw :: c_uint ; 3usize] , pub thread_id : :: std :: os :: raw :: c_int , pub worker_id : :: std :: os :: raw :: c_int , pub device_number : :: std :: os :: raw :: c_int , pub driver_type : starpu_prof_tool_driver_type , pub memnode : :: std :: os :: raw :: c_uint , pub bytes_to_transfer : :: std :: os :: raw :: c_uint , pub bytes_transfered : :: std :: os :: raw :: c_uint , pub fun_ptr : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_info > () - 64usize] ; ["Alignment of starpu_prof_tool_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_info > () - 8usize] ; ["Offset of field: starpu_prof_tool_info::conf"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , conf) - 0usize] ; ["Offset of field: starpu_prof_tool_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , event_type) - 8usize] ; ["Offset of field: starpu_prof_tool_info::starpu_version"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , starpu_version) - 12usize] ; ["Offset of field: starpu_prof_tool_info::thread_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , thread_id) - 24usize] ; ["Offset of field: starpu_prof_tool_info::worker_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , worker_id) - 28usize] ; ["Offset of field: starpu_prof_tool_info::device_number"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , device_number) - 32usize] ; ["Offset of field: starpu_prof_tool_info::driver_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , driver_type) - 36usize] ; ["Offset of field: starpu_prof_tool_info::memnode"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , memnode) - 40usize] ; ["Offset of field: starpu_prof_tool_info::bytes_to_transfer"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_to_transfer) - 44usize] ; ["Offset of field: starpu_prof_tool_info::bytes_transfered"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_transfered) - 48usize] ; ["Offset of field: starpu_prof_tool_info::fun_ptr"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , fun_ptr) - 56usize] ; } ; impl Default for starpu_prof_tool_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 () } } } # [doc = "Event info"] # [repr (C)] # [derive (Copy , Clone)] pub union starpu_prof_tool_event_info { pub event_type : starpu_prof_tool_event , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_event_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Alignment of starpu_prof_tool_event_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Offset of field: starpu_prof_tool_event_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_event_info , event_type) - 0usize] ; } ; impl Default for starpu_prof_tool_event_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_prof_tool_event_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_prof_tool_event_info {{ union }}") } } # [doc = "API info"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_prof_tool_api_info { } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_api_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_api_info > () - 0usize] ; ["Alignment of starpu_prof_tool_api_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_api_info > () - 1usize] ; } ; pub type starpu_prof_tool_cb_func = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_prof_tool_info , arg2 : * mut starpu_prof_tool_event_info , arg3 : * mut starpu_prof_tool_api_info) > ; # [doc = "Register / unregister events"] pub type starpu_prof_tool_entry_register_func = :: std :: option :: Option < unsafe extern "C" fn (event_type : starpu_prof_tool_event , cb : starpu_prof_tool_cb_func , info : starpu_prof_tool_command) > ; # [doc = "A function with this signature must be implemented by external tools that want to use the callbacks"] pub type starpu_prof_tool_entry_func = :: std :: option :: Option < unsafe extern "C" fn (reg : starpu_prof_tool_entry_register_func , unreg : starpu_prof_tool_entry_register_func) > ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 2048usize] , 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_codelet_event"] [:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () - 2328usize] ; ["Alignment of starpu_fxt_codelet_event"] [:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () - 8usize] ; ["Offset of field: starpu_fxt_codelet_event::symbol"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , symbol) - 0usize] ; ["Offset of field: starpu_fxt_codelet_event::workerid"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , workerid) - 2048usize] ; ["Offset of field: starpu_fxt_codelet_event::perfmodel_archname"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , perfmodel_archname) - 2052usize] ; ["Offset of field: starpu_fxt_codelet_event::hash"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , hash) - 2308usize] ; ["Offset of field: starpu_fxt_codelet_event::size"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , size) - 2312usize] ; ["Offset of field: starpu_fxt_codelet_event::time"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , time) - 2320usize] ; } ; 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 () } } } # [doc = "Store information related to clock synchronizations: mainly the offset to apply to each time."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_fxt_mpi_offset { # [doc = "< node time for the barrier at the beginning of the program"] pub local_time_start : u64 , # [doc = "< offset to apply to node time, computed at the beginning of the program"] pub offset_start : i64 , # [doc = "< node time for the barrier at the end of the program (optional)"] pub local_time_end : u64 , # [doc = "< offset to apply to node time, computed at the end of the program (optional)"] pub offset_end : i64 , # [doc = "< number of barriers to synchronize clocks during the execution of the program\n(can be 0, 1 or 2)"] pub nb_barriers : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_mpi_offset"] [:: std :: mem :: size_of :: < starpu_fxt_mpi_offset > () - 40usize] ; ["Alignment of starpu_fxt_mpi_offset"] [:: std :: mem :: align_of :: < starpu_fxt_mpi_offset > () - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_start) - 0usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_start) - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_end) - 16usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_end) - 24usize] ; ["Offset of field: starpu_fxt_mpi_offset::nb_barriers"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , nb_barriers) - 32usize] ; } ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 sched_tasks_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 papi_path : * mut :: std :: os :: raw :: c_char , pub comms_path : * mut :: std :: os :: raw :: c_char , pub number_events_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 , pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 48usize] , pub nworkers : :: std :: os :: raw :: c_int , pub worker_archtypes : [starpu_perfmodel_arch ; 48usize] , # [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 synchronize clocks and apply an offset."] pub file_offset : starpu_fxt_mpi_offset , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), this variable stores the MPI rank of the trace file."] pub file_rank : :: 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, number\nof dumped codelets."] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_options"] [:: std :: mem :: size_of :: < starpu_fxt_options > () - 13800usize] ; ["Alignment of starpu_fxt_options"] [:: std :: mem :: align_of :: < starpu_fxt_options > () - 8usize] ; ["Offset of field: starpu_fxt_options::per_task_colour"] [:: std :: mem :: offset_of ! (starpu_fxt_options , per_task_colour) - 0usize] ; ["Offset of field: starpu_fxt_options::no_events"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_events) - 4usize] ; ["Offset of field: starpu_fxt_options::no_counter"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_counter) - 8usize] ; ["Offset of field: starpu_fxt_options::no_bus"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_bus) - 12usize] ; ["Offset of field: starpu_fxt_options::no_flops"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_flops) - 16usize] ; ["Offset of field: starpu_fxt_options::ninputfiles"] [:: std :: mem :: offset_of ! (starpu_fxt_options , ninputfiles) - 20usize] ; ["Offset of field: starpu_fxt_options::no_smooth"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_smooth) - 24usize] ; ["Offset of field: starpu_fxt_options::no_acquire"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_acquire) - 28usize] ; ["Offset of field: starpu_fxt_options::memory_states"] [:: std :: mem :: offset_of ! (starpu_fxt_options , memory_states) - 32usize] ; ["Offset of field: starpu_fxt_options::internal"] [:: std :: mem :: offset_of ! (starpu_fxt_options , internal) - 36usize] ; ["Offset of field: starpu_fxt_options::label_deps"] [:: std :: mem :: offset_of ! (starpu_fxt_options , label_deps) - 40usize] ; ["Offset of field: starpu_fxt_options::filenames"] [:: std :: mem :: offset_of ! (starpu_fxt_options , filenames) - 48usize] ; ["Offset of field: starpu_fxt_options::out_paje_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , out_paje_path) - 560usize] ; ["Offset of field: starpu_fxt_options::distrib_time_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , distrib_time_path) - 568usize] ; ["Offset of field: starpu_fxt_options::activity_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , activity_path) - 576usize] ; ["Offset of field: starpu_fxt_options::sched_tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , sched_tasks_path) - 584usize] ; ["Offset of field: starpu_fxt_options::dag_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dag_path) - 592usize] ; ["Offset of field: starpu_fxt_options::tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , tasks_path) - 600usize] ; ["Offset of field: starpu_fxt_options::data_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , data_path) - 608usize] ; ["Offset of field: starpu_fxt_options::papi_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , papi_path) - 616usize] ; ["Offset of field: starpu_fxt_options::comms_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , comms_path) - 624usize] ; ["Offset of field: starpu_fxt_options::number_events_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , number_events_path) - 632usize] ; ["Offset of field: starpu_fxt_options::anim_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , anim_path) - 640usize] ; ["Offset of field: starpu_fxt_options::states_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , states_path) - 648usize] ; ["Offset of field: starpu_fxt_options::dir"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dir) - 656usize] ; ["Offset of field: starpu_fxt_options::worker_names"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_names) - 664usize] ; ["Offset of field: starpu_fxt_options::nworkers"] [:: std :: mem :: offset_of ! (starpu_fxt_options , nworkers) - 12952usize] ; ["Offset of field: starpu_fxt_options::worker_archtypes"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_archtypes) - 12960usize] ; ["Offset of field: starpu_fxt_options::file_prefix"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_prefix) - 13728usize] ; ["Offset of field: starpu_fxt_options::file_offset"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_offset) - 13736usize] ; ["Offset of field: starpu_fxt_options::file_rank"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_rank) - 13776usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets) - 13784usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets_count"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets_count) - 13792usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } unsafe 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.\nThis function has to be called before starpu_init().\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_start_profiling () ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_stop_profiling () ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace_in_dir (filename_in : * mut :: std :: os :: raw :: c_char , dir : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } unsafe extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Pre-initialize drivers\nSo as to register information on device types, memory types, etc.\nOnly use internally by StarPU."] pub fn starpu_drivers_preinit () ; } # [doc = "structure for designating a given driver. See \\ref UsingTheDriverAPI for more details."] # [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 hip_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver__bindgen_ty_1"] [:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Alignment of starpu_driver__bindgen_ty_1"] [:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cpu_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cpu_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cuda_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cuda_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::hip_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , hip_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::opencl_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , opencl_id) - 0usize] ; } ; 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 }}") } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver"] [:: std :: mem :: size_of :: < starpu_driver > () - 16usize] ; ["Alignment of starpu_driver"] [:: std :: mem :: align_of :: < starpu_driver > () - 8usize] ; ["Offset of field: starpu_driver::type_"] [:: std :: mem :: offset_of ! (starpu_driver , type_) - 0usize] ; ["Offset of field: starpu_driver::id"] [:: std :: mem :: offset_of ! (starpu_driver , id) - 8usize] ; } ; 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) } } unsafe 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-EINVAL 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().\n\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Notify all running drivers that they should terminate.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_drivers_request_termination () ; } unsafe extern "C" { # [doc = "Initialize the given driver. Return 0 on success, -EINVAL\nif starpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Run the driver once, then return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tree"] [:: std :: mem :: size_of :: < starpu_tree > () - 32usize] ; ["Alignment of starpu_tree"] [:: std :: mem :: align_of :: < starpu_tree > () - 8usize] ; ["Offset of field: starpu_tree::nodes"] [:: std :: mem :: offset_of ! (starpu_tree , nodes) - 0usize] ; ["Offset of field: starpu_tree::father"] [:: std :: mem :: offset_of ! (starpu_tree , father) - 8usize] ; ["Offset of field: starpu_tree::arity"] [:: std :: mem :: offset_of ! (starpu_tree , arity) - 16usize] ; ["Offset of field: starpu_tree::id"] [:: std :: mem :: offset_of ! (starpu_tree , id) - 20usize] ; ["Offset of field: starpu_tree::level"] [:: std :: mem :: offset_of ! (starpu_tree , level) - 24usize] ; ["Offset of field: starpu_tree::is_pu"] [:: std :: mem :: offset_of ! (starpu_tree , is_pu) - 28usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } unsafe 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 ; } unsafe 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)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_lock_t > () - 8usize] ; ["Alignment of starpu_omp_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_lock_t , internal) - 0usize] ; } ; 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)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_nest_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Alignment of starpu_omp_nest_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_nest_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_nest_lock_t , internal) - 0usize] ; } ; 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 chosen 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)] 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 pragma omp parallel 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_parallel_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () - 872usize] ; ["Alignment of starpu_omp_parallel_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_parallel_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_parallel_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , if_clause) - 860usize] ; ["Offset of field: starpu_omp_parallel_region_attr::num_threads"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , num_threads) - 864usize] ; } ; 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)] 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 pragma omp task is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding pragma omp task is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding pragma omp task is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding pragma omp task 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_task_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () - 936usize] ; ["Alignment of starpu_omp_task_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_task_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_task_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_task_region_attr::priority"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , priority) - 860usize] ; ["Offset of field: starpu_omp_task_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , if_clause) - 864usize] ; ["Offset of field: starpu_omp_task_region_attr::final_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , final_clause) - 868usize] ; ["Offset of field: starpu_omp_task_region_attr::untied_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , untied_clause) - 872usize] ; ["Offset of field: starpu_omp_task_region_attr::mergeable_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , mergeable_clause) - 876usize] ; ["Offset of field: starpu_omp_task_region_attr::is_loop"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , is_loop) - 880usize] ; ["Offset of field: starpu_omp_task_region_attr::nogroup_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nogroup_clause) - 884usize] ; ["Offset of field: starpu_omp_task_region_attr::collapse"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , collapse) - 888usize] ; ["Offset of field: starpu_omp_task_region_attr::num_tasks"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , num_tasks) - 892usize] ; ["Offset of field: starpu_omp_task_region_attr::nb_iterations"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nb_iterations) - 896usize] ; ["Offset of field: starpu_omp_task_region_attr::grainsize"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , grainsize) - 904usize] ; ["Offset of field: starpu_omp_task_region_attr::begin_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , begin_i) - 912usize] ; ["Offset of field: starpu_omp_task_region_attr::end_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , end_i) - 920usize] ; ["Offset of field: starpu_omp_task_region_attr::chunk"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , chunk) - 928usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_shutdown () ; } unsafe 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 \\#pragma omp parallel.\nSee \\ref OMPParallel for more details."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } unsafe 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 \\#pragma omp master.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp master without code\noutlining.\n\\return !0 if called by the region's master thread.\n\\return 0 if not called by the region's master thread.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp barrier.\nSee \\ref OMPBarrier for more details."] pub fn starpu_omp_barrier () ; } unsafe 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 name == NULL, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement \\#pragma omp\ncritical.\n\nSee \\ref OMPCritical for more details."] 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) ; } unsafe 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 name == NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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\nname==NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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(nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp single.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single without code\noutlining.\n\\return !0 if the calling thread has won the election.\n\\return 0 if the calling thread has lost the election.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp single 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\n\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and NULL for\nthe task that won the election. This function can be used to implement\n\\#pragma omp single with a copyprivate clause without code outlining.\n\nReturn the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\nReturn NULL 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\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_end () ; } unsafe 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 \\#pragma omp for 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(ordered==!0) or not (ordered==0). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(nowait==0) or not (nowait==!0).\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 \\#pragma omp for.\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for.\n\n\\sa starpu_omp_for\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp ordered.\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_begin () ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_end () ; } unsafe 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 (nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp sections and \\#pragma omp section.\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp sections and \\#pragma omp section.\n\n\\sa starpu_omp_sections\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp task.\n\nSee \\ref OMPTaskExplicit for more details."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } unsafe 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 \\#pragma omp taskwait.\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskwait () ; } unsafe 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 \\#pragma omp taskgroup.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] 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) ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_begin () ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_end () ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return !0 if called from a parallel region scope.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return !0 if dynamic thread number adjustment is enabled.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_dynamic\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return !0 if nested parallel sections are enabled.\n\\return 0 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the state of the cancel ICVS var.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } unsafe 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 information such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } unsafe 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 1 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return !0 if called from a final task.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } unsafe extern "C" { # [doc = "Return the number of places available to the execution environment in the place list.\n\n\\return the number of places available to the execution environment in the place list.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of processors available to the execution environment in the specified place.\n\n\\return the number of processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the numerical identifiers of the processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the place number of the place to which the encountering thread is bound.\n\n\\return the place number of the place to which the encountering thread is bound.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of places in the place partition of the innermost implicit task.\n\n\\return the number of places in the place partition of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current device is the initial device or not.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a device number that represents the host device.\n\n\\return a device number that represents the host device.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return !0 if called from the host device.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } unsafe extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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 !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 () ; } unsafe 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 () ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtime () -> f64 ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtick () -> f64 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Only use internally by StarPU."] pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } unsafe extern "C" { # [doc = "Register a handle for ptr->handle data lookup.\n\n\\sa starpu_omp_handle_unregister\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_register (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Unregister a handle from ptr->handle data lookup.\n\n\\sa starpu_omp_handle_register\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_unregister (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer.\n\n\\return the handle or \\c NULL if not found.\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_bitmap { pub bits : [:: std :: os :: raw :: c_ulong ; 1usize] , pub cardinal : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bitmap"] [:: std :: mem :: size_of :: < starpu_bitmap > () - 16usize] ; ["Alignment of starpu_bitmap"] [:: std :: mem :: align_of :: < starpu_bitmap > () - 8usize] ; ["Offset of field: starpu_bitmap::bits"] [:: std :: mem :: offset_of ! (starpu_bitmap , bits) - 0usize] ; ["Offset of field: starpu_bitmap::cardinal"] [:: std :: mem :: offset_of ! (starpu_bitmap , cardinal) - 8usize] ; } ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_OPENMP : starpu_parallel_worker_types = 0 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_INTEL_OPENMP_MKL : starpu_parallel_worker_types = 1 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_GNU_OPENMP_MKL : starpu_parallel_worker_types = 2 ; # [doc = "These represent the default available functions to enforce parallel_worker\nuse by the sub-runtime"] pub type starpu_parallel_worker_types = :: std :: os :: raw :: c_uint ; # [doc = "Parallel_Worker configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_parallel_worker_config { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Create parallel_workers on the machine with the given parameters.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_init (parallel_worker_level : hwloc_obj_type_t , ...) -> * mut starpu_parallel_worker_config ; } unsafe extern "C" { # [doc = "Delete the given parallel_workers configuration"] pub fn starpu_parallel_worker_shutdown (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print the given parallel_workers configuration.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_print (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " Prologue functions"] pub fn starpu_parallel_worker_openmp_prologue (arg1 : * mut :: std :: os :: raw :: c_void) ; } # [doc = "< deprecated"] pub const STARPU_CLUSTER_OPENMP : starpu_cluster_types = 0 ; # [doc = "< deprecated"] pub const STARPU_CLUSTER_INTEL_OPENMP_MKL : starpu_cluster_types = 1 ; # [doc = "@deprecated Use ::starpu_parallel_worker_types"] pub type starpu_cluster_types = :: std :: os :: raw :: c_uint ; # [doc = " @deprecated Use starpu_parallel_worker_config"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_cluster_machine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_init()"] pub fn starpu_cluster_machine (cluster_level : hwloc_obj_type_t , ...) -> * mut starpu_cluster_machine ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_shutdown()"] pub fn starpu_uncluster_machine (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_print()"] pub fn starpu_cluster_print (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } # [doc = "< undefined scope"] pub const starpu_perf_counter_scope_undefined : starpu_perf_counter_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_counter_scope_global : starpu_perf_counter_scope = 2 ; # [doc = "< per-worker scope"] pub const starpu_perf_counter_scope_per_worker : starpu_perf_counter_scope = 4 ; # [doc = "< per-codelet scope"] pub const starpu_perf_counter_scope_per_codelet : starpu_perf_counter_scope = 6 ; # [doc = "Enum of all possible performance counter scopes."] pub type starpu_perf_counter_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_counter_type_undefined : starpu_perf_counter_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_counter_type_int32 : starpu_perf_counter_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_counter_type_int64 : starpu_perf_counter_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_counter_type_float : starpu_perf_counter_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_counter_type_double : starpu_perf_counter_type = 4 ; # [doc = "Enum of all possible performance counter value type."] pub type starpu_perf_counter_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_listener { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_sample { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_set { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Start collecting performance counter values."] pub fn starpu_perf_counter_collection_start () ; } unsafe extern "C" { # [doc = "Stop collecting performance counter values."] pub fn starpu_perf_counter_collection_stop () ; } unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_counter_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_counter_scope_id_to_name (scope : starpu_perf_counter_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_counter_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_counter_type_id_to_name (type_ : starpu_perf_counter_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance counters for the given scope."] pub fn starpu_perf_counter_nb (scope : starpu_perf_counter_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter name to its id."] pub fn starpu_perf_counter_name_to_id (scope : starpu_perf_counter_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter rank in its scope to its counter id."] pub fn starpu_perf_counter_nth_to_id (scope : starpu_perf_counter_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a counter id to its name constant string."] pub fn starpu_perf_counter_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the counter's type id."] pub fn starpu_perf_counter_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the counter's help string."] pub fn starpu_perf_counter_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of counters defined in the given scope."] pub fn starpu_perf_counter_list_avail (scope : starpu_perf_counter_scope) ; } unsafe extern "C" { # [doc = "Display the list of counters defined in all scopes."] pub fn starpu_perf_counter_list_all_avail () ; } unsafe extern "C" { # [doc = "Allocate a new performance counter set."] pub fn starpu_perf_counter_set_alloc (scope : starpu_perf_counter_scope) -> * mut starpu_perf_counter_set ; } unsafe extern "C" { # [doc = "Free a performance counter set."] pub fn starpu_perf_counter_set_free (set : * mut starpu_perf_counter_set) ; } unsafe extern "C" { # [doc = "Enable a given counter in the set."] pub fn starpu_perf_counter_set_enable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Disable a given counter in the set."] pub fn starpu_perf_counter_set_disable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Initialize a new performance counter listener."] pub fn starpu_perf_counter_listener_init (set : * mut starpu_perf_counter_set , callback : :: std :: option :: Option < unsafe extern "C" fn (listener : * mut starpu_perf_counter_listener , sample : * mut starpu_perf_counter_sample , context : * mut :: std :: os :: raw :: c_void) > , user_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_perf_counter_listener ; } unsafe extern "C" { # [doc = "End a performance counter listener."] pub fn starpu_perf_counter_listener_exit (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the global scope."] pub fn starpu_perf_counter_set_global_listener (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the per_worker scope on a given worker."] pub fn starpu_perf_counter_set_per_worker_listener (workerid : :: std :: os :: raw :: c_uint , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a common listener for all workers."] pub fn starpu_perf_counter_set_all_per_worker_listeners (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a per_codelet listener for a codelet."] pub fn starpu_perf_counter_set_per_codelet_listener (cl : * mut starpu_codelet , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Unset the global listener."] pub fn starpu_perf_counter_unset_global_listener () ; } unsafe extern "C" { # [doc = "Unset the per_worker listener."] pub fn starpu_perf_counter_unset_per_worker_listener (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Unset all per_worker listeners."] pub fn starpu_perf_counter_unset_all_per_worker_listeners () ; } unsafe extern "C" { # [doc = "Unset a per_codelet listener."] pub fn starpu_perf_counter_unset_per_codelet_listener (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Read an int32 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int32_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Read an int64 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int64_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Read a float counter value from a sample."] pub fn starpu_perf_counter_sample_get_float_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Read a double counter value from a sample."] pub fn starpu_perf_counter_sample_get_double_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f64 ; } # [doc = "< undefined scope"] pub const starpu_perf_knob_scope_undefined : starpu_perf_knob_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_knob_scope_global : starpu_perf_knob_scope = 1 ; # [doc = "< per-worker scope"] pub const starpu_perf_knob_scope_per_worker : starpu_perf_knob_scope = 3 ; # [doc = "< per-scheduler scope"] pub const starpu_perf_knob_scope_per_scheduler : starpu_perf_knob_scope = 5 ; # [doc = "Enum of all possible performance knob scopes."] pub type starpu_perf_knob_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_knob_type_undefined : starpu_perf_knob_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_knob_type_int32 : starpu_perf_knob_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_knob_type_int64 : starpu_perf_knob_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_knob_type_float : starpu_perf_knob_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_knob_type_double : starpu_perf_knob_type = 4 ; # [doc = "Enum of all possible performance knob value type."] pub type starpu_perf_knob_type = :: std :: os :: raw :: c_uint ; unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_knob_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_knob_scope_id_to_name (scope : starpu_perf_knob_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_knob_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_knob_type_id_to_name (type_ : starpu_perf_knob_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance steering knobs for the given scope."] pub fn starpu_perf_knob_nb (scope : starpu_perf_knob_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_name_to_id (scope : starpu_perf_knob_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_nth_to_id (scope : starpu_perf_knob_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob rank in its scope to its knob id."] pub fn starpu_perf_knob_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate a knob id to its name constant string."] pub fn starpu_perf_knob_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the knob's help string."] pub fn starpu_perf_knob_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in the given scope."] pub fn starpu_perf_knob_list_avail (scope : starpu_perf_knob_scope) ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in all scopes."] pub fn starpu_perf_knob_list_all_avail () ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int32_value (knob_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int64_value (knob_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_float_value (knob_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_double_value (knob_id : :: std :: os :: raw :: c_int) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int32_value (knob_id : :: std :: os :: raw :: c_int , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int64_value (knob_id : :: std :: os :: raw :: c_int , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float knob value for Global scope."] pub fn starpu_perf_knob_set_global_float_value (knob_id : :: std :: os :: raw :: c_int , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double knob value for Global scope."] pub fn starpu_perf_knob_set_global_double_value (knob_id : :: std :: os :: raw :: c_int , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f64) ; } # [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 unless\nstarpu_conf::precedence_over_environment_variables is set."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 =\nNULL)."] 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 = NULL)"] pub sched_policy : * mut starpu_sched_policy , # [doc = "Callback function that can later be used by the scheduler.\nThe scheduler can retrieve this function by calling\nstarpu_sched_ctx_get_sched_policy_callback()"] pub sched_policy_callback : :: 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 = \\c -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 = \\c -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of HIP devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NHIP.\n(default = \\c -1)"] pub nhip : :: 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 = \\c -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of Maxeler FPGA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NMAX_FPGA.\n(default = -1)"] pub nmax_fpga : :: 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 = \\c -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "Number of TCP/IP Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NTCPIP_MS.\n(default = \\c -1)"] pub ntcpip_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 = \\c 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 \\c hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the HIP workers will be attached to\nthe HIP devices specified in the\nstarpu_conf::workers_hip_gpuid array. Otherwise, StarPU\naffects the HIP devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_HIPID.\n(default = \\c 0)"] pub use_explicit_workers_hip_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_hip_gpuid flag is\nset, this array contains the logical identifiers of the\nHIP devices (as used by \\c hipGetDevice())."] pub workers_hip_gpuid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the Maxeler FPGA workers will be attached to\nthe Maxeler FPGA devices specified in the\nstarpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU\naffects the Maxeler FPGA devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_MAX_FPGAID.\n(default = 0)"] pub use_explicit_workers_max_fpga_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag\nis set, this array contains the logical identifiers of the\nMaxeler FPGA devices to be used."] pub workers_max_fpga_deviceid : [:: std :: os :: raw :: c_uint ; 48usize] , pub max_fpga_load : * mut :: std :: os :: raw :: c_void , # [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 = \\c 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 ; 48usize] , # [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 = \\c 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 = \\c 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to enforce data locality when\nchoosing a worker to execute a task.\nThis can also be specified with the environment variable\n\\ref STARPU_DATA_LOCALITY_ENFORCE.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\nenable-data-locality-enforce \"--enable-data-locality-enforce\".\n(default = \\c 0)"] pub data_locality_enforce : :: 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 = \\c 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [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 = \\c 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 = \\c 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 HIP accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-hip-copy\n\"--disable-asynchronous-hip-copy\".\n(default = \\c 0)"] pub disable_asynchronous_hip_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 = \\c 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 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 = \\c 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and TCP/IP Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-tcpip-master-slave-copy\n\"--disable-asynchronous-tcpip-master-slave-copy\".\n(default = \\c 0)."] pub disable_asynchronous_tcpip_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and Maxeler FPGA devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-fpga-copy\n\"--disable-asynchronous-fpga-copy\".\n(default = 0)."] pub disable_asynchronous_max_fpga_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable memory mapping\nsupport between memory nodes. This can also be specified\nwith the environment variable \\ref STARPU_ENABLE_MAP."] pub enable_map : :: 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 = NULL)"] 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 = NULL)"] 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 = \\c 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 , # [doc = "Set the minimum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MIN_PRIO"] pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , # [doc = "Set the maximum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MAX_PRIO"] pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch \\c SIGINT, \\c SIGSEGV and \\c 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 caught. 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 = "Specify whether StarPU should automatically start to collect\nperformance counters after initialization"] pub start_perf_counter_collection : :: std :: os :: raw :: c_uint , # [doc = "Minimum spinning backoff of drivers (default = \\c 1)"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. (default = \\c 32)"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , # [doc = "Specify if CUDA workers should do only fast allocations\nwhen running the datawizard progress of\nother memory nodes. This will pass the interval value\n_STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.\nDefault value is 0, allowing CUDA workers to do slow\nallocations.\nThis can also be specified with the environment variable\n\\ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES."] pub cuda_only_fast_alloc_other_memnodes : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_conf"] [:: std :: mem :: size_of :: < starpu_conf > () - 1376usize] ; ["Alignment of starpu_conf"] [:: std :: mem :: align_of :: < starpu_conf > () - 8usize] ; ["Offset of field: starpu_conf::magic"] [:: std :: mem :: offset_of ! (starpu_conf , magic) - 0usize] ; ["Offset of field: starpu_conf::will_use_mpi"] [:: std :: mem :: offset_of ! (starpu_conf , will_use_mpi) - 4usize] ; ["Offset of field: starpu_conf::sched_policy_name"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_name) - 8usize] ; ["Offset of field: starpu_conf::sched_policy"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy) - 16usize] ; ["Offset of field: starpu_conf::sched_policy_callback"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_callback) - 24usize] ; ["Offset of field: starpu_conf::precedence_over_environment_variables"] [:: std :: mem :: offset_of ! (starpu_conf , precedence_over_environment_variables) - 32usize] ; ["Offset of field: starpu_conf::ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , ncpus) - 36usize] ; ["Offset of field: starpu_conf::reserve_ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , reserve_ncpus) - 40usize] ; ["Offset of field: starpu_conf::ncuda"] [:: std :: mem :: offset_of ! (starpu_conf , ncuda) - 44usize] ; ["Offset of field: starpu_conf::nhip"] [:: std :: mem :: offset_of ! (starpu_conf , nhip) - 48usize] ; ["Offset of field: starpu_conf::nopencl"] [:: std :: mem :: offset_of ! (starpu_conf , nopencl) - 52usize] ; ["Offset of field: starpu_conf::nmax_fpga"] [:: std :: mem :: offset_of ! (starpu_conf , nmax_fpga) - 56usize] ; ["Offset of field: starpu_conf::nmpi_ms"] [:: std :: mem :: offset_of ! (starpu_conf , nmpi_ms) - 60usize] ; ["Offset of field: starpu_conf::ntcpip_ms"] [:: std :: mem :: offset_of ! (starpu_conf , ntcpip_ms) - 64usize] ; ["Offset of field: starpu_conf::use_explicit_workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_bindid) - 68usize] ; ["Offset of field: starpu_conf::workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_bindid) - 72usize] ; ["Offset of field: starpu_conf::use_explicit_workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_cuda_gpuid) - 264usize] ; ["Offset of field: starpu_conf::workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_cuda_gpuid) - 268usize] ; ["Offset of field: starpu_conf::use_explicit_workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_hip_gpuid) - 460usize] ; ["Offset of field: starpu_conf::workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_hip_gpuid) - 464usize] ; ["Offset of field: starpu_conf::use_explicit_workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_opencl_gpuid) - 656usize] ; ["Offset of field: starpu_conf::workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_opencl_gpuid) - 660usize] ; ["Offset of field: starpu_conf::use_explicit_workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_max_fpga_deviceid) - 852usize] ; ["Offset of field: starpu_conf::workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_max_fpga_deviceid) - 856usize] ; ["Offset of field: starpu_conf::max_fpga_load"] [:: std :: mem :: offset_of ! (starpu_conf , max_fpga_load) - 1048usize] ; ["Offset of field: starpu_conf::use_explicit_workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_mpi_ms_deviceid) - 1056usize] ; ["Offset of field: starpu_conf::workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_mpi_ms_deviceid) - 1060usize] ; ["Offset of field: starpu_conf::bus_calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , bus_calibrate) - 1252usize] ; ["Offset of field: starpu_conf::calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , calibrate) - 1256usize] ; ["Offset of field: starpu_conf::data_locality_enforce"] [:: std :: mem :: offset_of ! (starpu_conf , data_locality_enforce) - 1260usize] ; ["Offset of field: starpu_conf::single_combined_worker"] [:: std :: mem :: offset_of ! (starpu_conf , single_combined_worker) - 1264usize] ; ["Offset of field: starpu_conf::disable_asynchronous_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_copy) - 1268usize] ; ["Offset of field: starpu_conf::disable_asynchronous_cuda_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_cuda_copy) - 1272usize] ; ["Offset of field: starpu_conf::disable_asynchronous_hip_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_hip_copy) - 1276usize] ; ["Offset of field: starpu_conf::disable_asynchronous_opencl_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_opencl_copy) - 1280usize] ; ["Offset of field: starpu_conf::disable_asynchronous_mpi_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_mpi_ms_copy) - 1284usize] ; ["Offset of field: starpu_conf::disable_asynchronous_tcpip_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_tcpip_ms_copy) - 1288usize] ; ["Offset of field: starpu_conf::disable_asynchronous_max_fpga_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_max_fpga_copy) - 1292usize] ; ["Offset of field: starpu_conf::enable_map"] [:: std :: mem :: offset_of ! (starpu_conf , enable_map) - 1296usize] ; ["Offset of field: starpu_conf::cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_opengl_interoperability) - 1304usize] ; ["Offset of field: starpu_conf::n_cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , n_cuda_opengl_interoperability) - 1312usize] ; ["Offset of field: starpu_conf::not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , not_launched_drivers) - 1320usize] ; ["Offset of field: starpu_conf::n_not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , n_not_launched_drivers) - 1328usize] ; ["Offset of field: starpu_conf::trace_buffer_size"] [:: std :: mem :: offset_of ! (starpu_conf , trace_buffer_size) - 1336usize] ; ["Offset of field: starpu_conf::global_sched_ctx_min_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_min_priority) - 1344usize] ; ["Offset of field: starpu_conf::global_sched_ctx_max_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_max_priority) - 1348usize] ; ["Offset of field: starpu_conf::catch_signals"] [:: std :: mem :: offset_of ! (starpu_conf , catch_signals) - 1352usize] ; ["Offset of field: starpu_conf::start_perf_counter_collection"] [:: std :: mem :: offset_of ! (starpu_conf , start_perf_counter_collection) - 1356usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_min"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_min) - 1360usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_max"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_max) - 1364usize] ; ["Offset of field: starpu_conf::cuda_only_fast_alloc_other_memnodes"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_only_fast_alloc_other_memnodes) - 1368usize] ; } ; 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 () } } } unsafe 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-EINVAL indicates that the argument was NULL."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Set fields of \\p conf so that no worker is enabled, i.e. set\nstarpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.\n\nThis allows to portably enable only a given type of worker:\n
\n\nstarpu_conf_noworker(&conf);
\nconf.ncpus = -1;\n\n\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_conf_noworker (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe 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-NULL \\p conf. Default configuration is used if \\p conf\nis NULL. Upon successful completion, this function returns\n0. Otherwise, -ENODEV indicates that no worker was available\n(and thus StarPU was not initialized). See \\ref SubmittingATask for more details."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application, which is necessary when running in\nSimgrid mode or MPI Master Slave mode.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram. See \\ref SubmittingATask for more details."] 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 ; } unsafe extern "C" { # [doc = "Return 1 if StarPU is already initialized. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait for starpu_init() call to finish. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_wait_initialized () ; } unsafe 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. See \\ref SubmittingATask for more details."] pub fn starpu_shutdown () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_pause () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_resume () ; } unsafe extern "C" { # [doc = "Return !0 if task processing by workers is currently paused, 0 otherwise.\nSee \\ref StarPUEatsCPUs for more details."] pub fn starpu_is_paused () -> :: std :: os :: raw :: c_int ; } unsafe 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\n::STARPU_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.\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe 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 \\p cpuid does not produce a warning.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Bind the calling thread on the cores corresponding to the \\p workerid .\n\n\\p workerid can be a basic worker or a combined worker.\n\nThis can be used e.g. before initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_worker (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Bind the calling thread back to the core reserved for the main thread.\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_main () ; } unsafe extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_cpu (cpuid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the OS number of a given \\p cpuid\n\nStarPU uses logical numbering (as define by hwloc) all along, but in case\ninteraction is needed with another binding tool that uses numbering as\ndefined by the OS, we need to convert from hwloc logical numbering to hwloc\nphysical numbering."] pub fn starpu_cpu_os_index (cpuid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print a description of the topology on \\p f.\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_topology_print (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled.\nSee \\ref Basic for more details."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled.\nSee \\ref cudaWorkers for more details."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and HIP\naccelerators are disabled.\nSee \\ref hipWorkers for more details."] pub fn starpu_asynchronous_hip_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled.\nSee \\ref openclWorkers for more details."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and Maxeler FPGA\ndevices are disabled.\nSee \\ref maxfpgaWorkers for more details."] pub fn starpu_asynchronous_max_fpga_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled.\nSee \\ref mpimsWorkers for more details."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and TCP/IP Slave\ndevices are disabled.\nSee \\ref tcpipmsWorkers for more details."] pub fn starpu_asynchronous_tcpip_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers with a given kind of memory\nare disabled."] pub fn starpu_asynchronous_copy_disabled_for (kind : starpu_node_kind) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if memory mapping support between memory nodes is\nenabled.\nSee \\ref Basic for more details."] pub fn starpu_map_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call starpu_profiling_bus_helper_display_summary() and\nstarpu_profiling_worker_helper_display_summary().\nSee \\ref DataStatistics for more details."] pub fn starpu_display_stats () ; } unsafe extern "C" { # [doc = "Return as 3 integers the version of StarPU used when running the\napplication.\nSee \\ref ConfigurationAndInitialization for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_perf_counter_sample_cl_values { pub _address : u8 , } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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] fn extract_bit (byte : u8 , index : usize) -> bool { 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 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] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { 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 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] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [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 unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , 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) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; 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 } ; unsafe { Self :: raw_set_bit (this , 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 = 4 ; pub const STARPU_RELEASE_VERSION : u32 = 3 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_USE_TCPIP_MASTER_SLAVE : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_PARALLEL_WORKER : 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_CBLAS_H : 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_PAPI : 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_BOOL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : 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_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_MAXCPUS : u32 = 32 ; pub const STARPU_MAXNUMANODES : u32 = 4 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMAXFPGADEVS : u32 = 12 ; pub const STARPU_MAXHIPDEVS : u32 = 8 ; pub const STARPU_NMAXWORKERS : u32 = 48 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; 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_HAVE_MPI_COMM_CREATE_GROUP : u32 = 1 ; pub const STARPU_USE_FXT : 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_PTHREAD_MUTEX_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_COND_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO : 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 STARPU_PYTHON_HAVE_NUMPY : u32 = 1 ; pub const STARPU_PROF_TOOL : 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_MALLOC_SIMULATION_UNIQUE : u32 = 128 ; pub const STARPU_NOWHERE : u32 = 1 ; 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_HIP_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_SPECIFIC_NODE_LOCAL_OR_CPU : i32 = - 5 ; pub const STARPU_SPECIFIC_NODE_NONE : i32 = - 6 ; 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_TRANSACTION : u32 = 5505024 ; pub const STARPU_TASK_FILE : u32 = 5636096 ; pub const STARPU_TASK_LINE : u32 = 5767168 ; pub const STARPU_EPILOGUE_CALLBACK : u32 = 5898240 ; pub const STARPU_EPILOGUE_CALLBACK_ARG : u32 = 6029312 ; pub const STARPU_BUBBLE_FUNC : u32 = 6160384 ; pub const STARPU_BUBBLE_FUNC_ARG : u32 = 6291456 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC : u32 = 6422528 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC_ARG : u32 = 6553600 ; pub const STARPU_BUBBLE_PARENT : u32 = 6684672 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 6815744 ; 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_PARALLEL_WORKER_MIN_NB : u32 = 131072 ; pub const STARPU_PARALLEL_WORKER_MAX_NB : u32 = 262144 ; pub const STARPU_PARALLEL_WORKER_NB : u32 = 393216 ; pub const STARPU_PARALLEL_WORKER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_PARALLEL_WORKER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_PARALLEL_WORKER_POLICY_NAME : u32 = 786432 ; pub const STARPU_PARALLEL_WORKER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_PARALLEL_WORKER_TYPE : u32 = 1310720 ; pub const STARPU_PARALLEL_WORKER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_PARALLEL_WORKER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_PARALLEL_WORKER_NEW : u32 = 1703936 ; pub const STARPU_PARALLEL_WORKER_NCORES : u32 = 1835008 ; pub const STARPU_CLUSTER_MIN_NB : u32 = 131072 ; pub const STARPU_CLUSTER_MAX_NB : u32 = 262144 ; pub const STARPU_CLUSTER_NB : u32 = 393216 ; pub const STARPU_CLUSTER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_CLUSTER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_CLUSTER_POLICY_NAME : u32 = 786432 ; pub const STARPU_CLUSTER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_CLUSTER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_CLUSTER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_CLUSTER_TYPE : u32 = 1310720 ; pub const STARPU_CLUSTER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_CLUSTER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_CLUSTER_NEW : u32 = 1703936 ; pub const STARPU_CLUSTER_NCORES : u32 = 1835008 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of drand48_data"] [:: std :: mem :: size_of :: < drand48_data > () - 24usize] ; ["Alignment of drand48_data"] [:: std :: mem :: align_of :: < drand48_data > () - 8usize] ; ["Offset of field: drand48_data::__x"] [:: std :: mem :: offset_of ! (drand48_data , __x) - 0usize] ; ["Offset of field: drand48_data::__old_x"] [:: std :: mem :: offset_of ! (drand48_data , __old_x) - 6usize] ; ["Offset of field: drand48_data::__c"] [:: std :: mem :: offset_of ! (drand48_data , __c) - 12usize] ; ["Offset of field: drand48_data::__init"] [:: std :: mem :: offset_of ! (drand48_data , __init) - 14usize] ; ["Offset of field: drand48_data::__a"] [:: std :: mem :: offset_of ! (drand48_data , __a) - 16usize] ; } ; 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_opencl_program"] [:: std :: mem :: size_of :: < starpu_opencl_program > () - 64usize] ; ["Alignment of starpu_opencl_program"] [:: std :: mem :: align_of :: < starpu_opencl_program > () - 8usize] ; ["Offset of field: starpu_opencl_program::programs"] [:: std :: mem :: offset_of ! (starpu_opencl_program , programs) - 0usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current worker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as (size_t size_of_the_argument, cl_mem *\npointer_to_the_argument). 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\n\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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 share/starpu/opencl 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. See \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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$STARPU_HOME/.starpu/opencl/\\.\\.vendor_id_\\_device_id_\\.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a file.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a string.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Unload an OpenCL compiled code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe 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). See \\ref OpenCL-specificOptimizations for more details."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe 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 NULL, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not NULL, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns -EAGAIN if the asynchronous launch was\nsuccessful. It returns 0 if the synchronous copy was successful, or\nfails otherwise.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_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 ; unsafe extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe 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)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_pthread_spinlock_t"] [:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Alignment of starpu_pthread_spinlock_t"] [:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Offset of field: starpu_pthread_spinlock_t::taken"] [:: std :: mem :: offset_of ! (starpu_pthread_spinlock_t , taken) - 0usize] ; } ; unsafe 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 ; } unsafe extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; unsafe extern "C" { pub fn starpu_sem_trywait (sem : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sem_wait (sem : * 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. See \\ref DataInterface for more details."] 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\nNULL pointer, since the value\nof the provided buffer is simply\nignored for now.\n\nSee \\ref ScratchData for more details."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< Reduction mode.\nStarPU will allocate on the fly a per-worker\nbuffer, so that various tasks that access the\nsame data in ::STARPU_REDUX mode can execute\nin parallel. When a task accesses the\ndata without ::STARPU_REDUX, StarPU will\nautomatically reduce the different contributions.\n\nCodelets contributing to these reductions\nwith ::STARPU_REDUX must be registered with\n::STARPU_RW | ::STARPU_COMMUTE access modes.\n\nSee \\ref DataReduction for more details."] 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).\n\nSee \\ref DataCommute for more details."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_task_insert() 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.\n\nTODO add extended description in documentation."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Inter-node reduction only.\nThis is similar to ::STARPU_REDUX, except that\nStarPU will allocate a per-node buffer only,\ni.e. parallelism will be achieved between\nnodes, but not within each node. This is\nuseful when the per-worker buffers allocated\nwith ::STARPU_REDUX consume too much memory.\n\nSee \\ref MPIMpiRedux for more details."] pub const STARPU_MPI_REDUX : starpu_data_access_mode = 128 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning, only use internally by StarPU"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< Request unmapping the destination replicate, only use internally by StarPU"] pub const STARPU_UNMAP : starpu_data_access_mode = 512 ; # [doc = "< Ignore this data for the footprint computation. See \\ref ScratchData"] pub const STARPU_NOFOOTPRINT : starpu_data_access_mode = 1024 ; # [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 = 2048 ; # [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 ; unsafe extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] 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]) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] 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 ; } unsafe 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.\nSee \\ref TaskSubmission for more details."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref TemporaryData for more details."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks. See \\ref DataReduction for more details."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } unsafe 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) ; } unsafe 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\nexplicitly 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 -EDEADLK). Upon successful\ncompletion, this function returns 0. See \\ref DataAccess for more details."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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.\n\n\\p callback_acquired is called when the data is acquired in terms of semantic,\nbut the data is not fetched yet. It is given a pointer to the node, which it\ncan modify if it wishes so.\n\nThis is a very internal interface, subject to changes, do not use this."] 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_acquired : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , node : * mut :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) > , callback : :: std :: option :: Option < unsafe extern "C" fn (arg : * 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 , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb(). See \\ref DataAccess for more details."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Partly release the piece of data acquired by the application either by\nstarpu_data_acquire() or by starpu_data_acquire_cb(), switching the\nacquisition down to \\p down_to_mode. For now, only releasing from ::STARPU_RW\nor ::STARPU_W acquisition down to ::STARPU_R is supported, or down to the same\nacquisition. ::STARPU_NONE can also be passed as \\p down_to_mode, in which\ncase this is equivalent to calling starpu_data_release(). See \\ref DataAccess for more details."] pub fn starpu_data_release_to (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release_to(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_to_on_node (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode , 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 ; unsafe extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } unsafe extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter, see \\ref\nConcurrentDataAccess for the details."] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Destroy the \\p arbiter. This must only be called after all data\nassigned to it have been unregistered. See \\ref\nConcurrentDataAccess for the details."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A task really needs it now!"] pub const STARPU_FETCH : starpu_is_prefetch = 0 ; # [doc = " A task will need it soon"] pub const STARPU_TASK_PREFETCH : starpu_is_prefetch = 1 ; # [doc = " It is a good idea to have it asap"] pub const STARPU_PREFETCH : starpu_is_prefetch = 2 ; # [doc = " Get this here when you have time to"] pub const STARPU_IDLEFETCH : starpu_is_prefetch = 3 ; # [doc = " Get this here when you have time to"] pub const STARPU_NFETCH : starpu_is_prefetch = 4 ; # [doc = "Prefetch levels\n\nData requests are ordered by priorities, but also by prefetching level,\nbetween data that a task wants now, and data that we will probably want\n\"soon\"."] pub type starpu_is_prefetch = :: std :: os :: raw :: c_uint ; unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node (or a transfer request for getting so is ongoing). See \\ref SchedulingHelpers for more details."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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. See \\ref DataPrefetch for more details."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Advise StarPU to evict \\p handle from the memory node \\p node\nStarPU will thus write its value back to its home node, before evicting it.\nThis may however fail if e.g. some task is still working on it.\n\nIf the eviction was successful, 0 is returned ; -1 is returned otherwise.\n\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_evict_from_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 transferred into those memory nodes. For\ninstance a 1<<0 write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0). See \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } unsafe 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().\nSee \\ref SequentialConsistency and \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the default sequential consistency flag. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } unsafe 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(). See \\ref SequentialConsistency for more details."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1. See \\ref OOCDataRegistration for more details."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0). See \\ref OOCDataRegistration for more details."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node.\n\n\\p is_allocated tells whether memory was allocated there for the data.\n\\p is_valid tells whether the actual value is available there.\n\\p is_loading tells whether the actual value is getting loaded there.\n\\p is_requested tells whether the actual value is requested to be loaded\nthere by some fetch/prefetch/idlefetch request.\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_query_status2 (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_loading : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Same as starpu_data_query_status2(), but without the is_loading parameter. See \\ref DataPrefetch for more details."] 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) ; } unsafe 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 (which has to take one handle with ::STARPU_W), and\nreduction between per-worker buffers will be done with the codelet \\p\nredux_cl (which has to take a first accumulation handle with\n::STARPU_RW|::STARPU_COMMUTE, and a second contribution handle with ::STARPU_R).\nSee \\ref DataReduction and \\ref TemporaryData for more details."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Same as starpu_data_set_reduction_methods() but allows to pass\narguments to the reduction and init tasks"] pub fn starpu_data_set_reduction_methods_with_args (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , redux_cl_arg : * mut :: std :: os :: raw :: c_void , init_cl : * mut starpu_codelet , init_cl_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_data_test_if_mapped_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Set the field \\c sched_data for the \\p handle to \\p sched_data . It can\nthen be retrieved with starpu_data_get_sched_data(). \\p sched_data can be any\nscheduler-defined value.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_sched_data (handle : starpu_data_handle_t , sched_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c sched_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_sched_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Check whether data \\p handle can be evicted now from node \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_can_evict (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , is_prefetch : starpu_is_prefetch) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Retrieve the value of an environment variable.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the current date in micro-seconds. See \\ref Preparing for more details."] pub fn starpu_timing_now () -> f64 ; } unsafe 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Like starpu_data_cpy(), copy the content of \\p src_handle into \\p dst_handle,\nbut additionally take a \\p priority parameter to sort it among the whole task\ngraph.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_cpy_priority (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 , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Create a copy of \\p src_handle, and return a new handle in \\p dst_handle,\nwhich is to be used only for read accesses. This allows StarPU to optimize it\nby not actually copying the data whenever possible (e.g. it may possibly\nsimply return src_handle itself).\nThe parameter \\p asynchronous indicates whether the function should block\nor not. In the case of an asynchronous call, it is possible to synchronize\nwith the 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_dup_ro (dst_handle : * mut starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call hwloc-ps to display binding of each process and thread running on\nthe machine.
\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU.\nSee \\ref MiscellaneousAndDebug for more details."] pub fn starpu_display_bindings () ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a bitmap representing logical indexes of NUMA nodes where the buffer\ntargeted by \\p ptr is allocated. An error is notified by a negative result.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_memory_location_bitmap (ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_long ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate data on disk. See \\ref DiskFunctions for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 data 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 data, 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 data \\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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_disk_ops"] [:: std :: mem :: size_of :: < starpu_disk_ops > () - 152usize] ; ["Alignment of starpu_disk_ops"] [:: std :: mem :: align_of :: < starpu_disk_ops > () - 8usize] ; ["Offset of field: starpu_disk_ops::plug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , plug) - 0usize] ; ["Offset of field: starpu_disk_ops::unplug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , unplug) - 8usize] ; ["Offset of field: starpu_disk_ops::bandwidth"] [:: std :: mem :: offset_of ! (starpu_disk_ops , bandwidth) - 16usize] ; ["Offset of field: starpu_disk_ops::alloc"] [:: std :: mem :: offset_of ! (starpu_disk_ops , alloc) - 24usize] ; ["Offset of field: starpu_disk_ops::free"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free) - 32usize] ; ["Offset of field: starpu_disk_ops::open"] [:: std :: mem :: offset_of ! (starpu_disk_ops , open) - 40usize] ; ["Offset of field: starpu_disk_ops::close"] [:: std :: mem :: offset_of ! (starpu_disk_ops , close) - 48usize] ; ["Offset of field: starpu_disk_ops::read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , read) - 56usize] ; ["Offset of field: starpu_disk_ops::write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , write) - 64usize] ; ["Offset of field: starpu_disk_ops::full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_read) - 72usize] ; ["Offset of field: starpu_disk_ops::full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_write) - 80usize] ; ["Offset of field: starpu_disk_ops::async_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_write) - 88usize] ; ["Offset of field: starpu_disk_ops::async_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_read) - 96usize] ; ["Offset of field: starpu_disk_ops::async_full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_read) - 104usize] ; ["Offset of field: starpu_disk_ops::async_full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_write) - 112usize] ; ["Offset of field: starpu_disk_ops::copy"] [:: std :: mem :: offset_of ! (starpu_disk_ops , copy) - 120usize] ; ["Offset of field: starpu_disk_ops::wait_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , wait_request) - 128usize] ; ["Offset of field: starpu_disk_ops::test_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , test_request) - 136usize] ; ["Offset of field: starpu_disk_ops::free_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free_request) - 144usize] ; } ; unsafe extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\nWarning: It creates one file per allocation !\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the HDF5 library.\n\nIt doesn't support multiple opening from different processes. \n\nYou may only allow one process to write in the HDF5 file.\n\nIf HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. "] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\nWarning: It creates one file per allocation !"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\nWarning: It creates one file per allocation !\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Close an existing data opened with starpu_disk_open(). See \\ref OutOfCore_Introduction for more details."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe 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. See \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndata. 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
\nSUCCESS: return the disk node.
\nFAIL: return an error code.
\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size.\n\nSee \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe 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, HIP or OpenCL support.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 HIP node. Return 0 on success."] pub ram_to_hip : :: 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 FPGA node. Return 0 on success."] pub ram_to_max_fpga : :: 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 HIP node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub hip_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 HIP node to the \\p dst_interface interface on the \\p\ndst_node HIP node. Return 0 on success."] pub hip_to_hip : :: 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 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 FPGA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub max_fpga_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 > , 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 > , pub ram_to_hip_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_hip_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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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 FPGA node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_max_fpga_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 FPGA 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 -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub max_fpga_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 -EAGAIN if any of the starpu_interface_copy()\ncalls has returned -EAGAIN (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::peek_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 > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_copy_methods"] [:: std :: mem :: size_of :: < starpu_data_copy_methods > () - 200usize] ; ["Alignment of starpu_data_copy_methods"] [:: std :: mem :: align_of :: < starpu_data_copy_methods > () - 8usize] ; ["Offset of field: starpu_data_copy_methods::can_copy"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , can_copy) - 0usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_ram) - 8usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda) - 16usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip) - 24usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl) - 32usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga) - 40usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram) - 48usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda) - 56usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram) - 64usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip) - 72usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram) - 80usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl) - 88usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram) - 96usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda_async) - 104usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram_async) - 112usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda_async) - 120usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip_async) - 128usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram_async) - 136usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip_async) - 144usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl_async) - 152usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram_async) - 160usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl_async) - 168usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga_async) - 176usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram_async) - 184usize] ; ["Offset of field: starpu_data_copy_methods::any_to_any"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , any_to_any) - 192usize] ; } ; # [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 = "< Identifier for the tensor data interface"] pub const STARPU_TENSOR_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "< Identifier for the ndim array data interface"] pub const STARPU_NDIM_INTERFACE_ID : starpu_data_interface_id = 10 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 11 ; # [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)] 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 (if >= 0), 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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 = "Cache the buffers from the given node to a caching interface.\n\nThis method is optional, mostly useful when also making\nstarpu_data_interface_ops::unregister_data_handle check that pointers are NULL.\n\n\\p src_interface is an interface that already has buffers\nallocated, but which we don't need any more. \\p cached_interface\nis a new interface into which the buffer pointers should be\ntransferred, for later reuse when allocating data of the same kind.\n\nUsually we can just memcpy over the set of pointers and descriptions\n(this is what StarPU does when this method is not implemented), but\nif unregister_data_handle checks that pointers are NULL, we need to\nadditionally clear the pointers in \\p src_interface. Also,\nit is not useful to copy the whole interface, only the\npointers need to be copied (essentially the pointers that\nstarpu_data_interface_ops::reuse_data_on_node will then transfer into\na new handle interface), as well as the properties\nthat starpu_data_interface_ops::compare (or\nstarpu_data_interface_ops::alloc_compare if defined) needs for\ncomparing interfaces for caching compatibility.\n\nWhen this method is not defined, StarPU will just copy the \\p\ncached_interface into \\p src_interface.\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub cache_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (cached_interface : * mut :: std :: os :: raw :: c_void , src_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Reuse on the given node the buffers of the provided interface\n\nThis method is optional, mostly useful when also defining\nalloc_footprint to share tiles of the same allocation size but\ndifferent shapes, or when the interface contains pointers which\nare initialized at registration (e.g. nn array in the ndim interface)\n\n\\p cached_interface is an already-allocated buffer that we want to\nreuse, and \\p new_data_interface is an interface in which we want to\ninstall that already-allocated buffer. Usually we can just memcpy over\nthe set of pointers and descriptions. But e.g. with 2D tiles the ld\nvalue may not be correct, and memcpy would wrongly overwrite it in\nnew_data_interface, i.e. reusing a vertical tile allocation for a horizontal tile, or vice-versa.\n\nreuse_data_on_node should thus copy over pointers, and define fields\nthat are usually set by allocate_data_on_node (e.g. ld).\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub reuse_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (dst_data_interface : * mut :: std :: os :: raw :: c_void , cached_interface : * const :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Map data from a source to a destination.\nDefine function starpu_interface_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub map_data : :: 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 = "Unmap data from a source to a destination.\nDefine function starpu_interface_unmap() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub unmap_data : :: 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 = "Update map data from a source to a destination.\nDefine function starpu_interface_update_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub update_map : :: 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 = "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 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 the maximum size that the data may need to increase to. For\ninstance, in the case of compressed matrix tiles this is the size\nwhen the block is fully dense.\nThis is currently only used for feedback tools."] pub get_max_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.\nIf specified, alloc_compare should be set to provide the strict\ncomparison, and reuse_data_on_node should be set to provide correct buffer reuse."] 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 starpu_malloc_flags(ptr, size, 0) (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is NULL, 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 = "Read the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count."] pub peek_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 = "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 = "Pack the interface into a contiguous buffer and set the\nsize of the newly created buffer in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub pack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the interface from the given buffer and set the size\nof the unpacked data in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub unpack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Free the allocated memory by a previous call to unpack_meta()"] pub free_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_data_interface_ops > () - 264usize] ; ["Alignment of starpu_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_data_interface_ops::register_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , register_data_handle) - 0usize] ; ["Offset of field: starpu_data_interface_ops::unregister_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unregister_data_handle) - 8usize] ; ["Offset of field: starpu_data_interface_ops::allocate_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , allocate_data_on_node) - 16usize] ; ["Offset of field: starpu_data_interface_ops::free_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_data_on_node) - 24usize] ; ["Offset of field: starpu_data_interface_ops::cache_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , cache_data_on_node) - 32usize] ; ["Offset of field: starpu_data_interface_ops::reuse_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , reuse_data_on_node) - 40usize] ; ["Offset of field: starpu_data_interface_ops::map_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , map_data) - 48usize] ; ["Offset of field: starpu_data_interface_ops::unmap_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unmap_data) - 56usize] ; ["Offset of field: starpu_data_interface_ops::update_map"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , update_map) - 64usize] ; ["Offset of field: starpu_data_interface_ops::init"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , init) - 72usize] ; ["Offset of field: starpu_data_interface_ops::copy_methods"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , copy_methods) - 80usize] ; ["Offset of field: starpu_data_interface_ops::handle_to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , handle_to_pointer) - 88usize] ; ["Offset of field: starpu_data_interface_ops::to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , to_pointer) - 96usize] ; ["Offset of field: starpu_data_interface_ops::get_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_size) - 104usize] ; ["Offset of field: starpu_data_interface_ops::get_alloc_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_alloc_size) - 112usize] ; ["Offset of field: starpu_data_interface_ops::get_max_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_max_size) - 120usize] ; ["Offset of field: starpu_data_interface_ops::footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , footprint) - 128usize] ; ["Offset of field: starpu_data_interface_ops::alloc_footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_footprint) - 136usize] ; ["Offset of field: starpu_data_interface_ops::compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , compare) - 144usize] ; ["Offset of field: starpu_data_interface_ops::alloc_compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_compare) - 152usize] ; ["Offset of field: starpu_data_interface_ops::display"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , display) - 160usize] ; ["Offset of field: starpu_data_interface_ops::describe"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , describe) - 168usize] ; ["Offset of field: starpu_data_interface_ops::interfaceid"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interfaceid) - 176usize] ; ["Offset of field: starpu_data_interface_ops::interface_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interface_size) - 184usize] ; ["Offset of field: starpu_data_interface_ops::is_multiformat"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , is_multiformat) - 192usize] ; ["Offset of field: starpu_data_interface_ops::dontcache"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , dontcache) - 193usize] ; ["Offset of field: starpu_data_interface_ops::get_mf_ops"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_mf_ops) - 200usize] ; ["Offset of field: starpu_data_interface_ops::pack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_data) - 208usize] ; ["Offset of field: starpu_data_interface_ops::peek_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , peek_data) - 216usize] ; ["Offset of field: starpu_data_interface_ops::unpack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_data) - 224usize] ; ["Offset of field: starpu_data_interface_ops::pack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_meta) - 232usize] ; ["Offset of field: starpu_data_interface_ops::unpack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_meta) - 240usize] ; ["Offset of field: starpu_data_interface_ops::free_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_meta) - 248usize] ; ["Offset of field: starpu_data_interface_ops::name"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , name) - 256usize] ; } ; 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 () } } } unsafe 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()).\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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) ; } unsafe extern "C" { # [doc = "Register the given data interface operations. If the field\nstarpu_data_interface_ops::field is set to\n::STARPU_UNKNOWN_INTERFACE_ID, then a new identifier will be set by\ncalling starpu_data_interface_get_next_id().\nThe function is automatically called when registering a piece of\ndata with starpu_data_register(). It is only necessary to call it\nbeforehand for some specific cases (such as the usmaster slave mode)."] pub fn starpu_data_register_ops (ops : * mut starpu_data_interface_ops) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or NULL\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node.\nSee \\ref DataPointers for more details."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle or NULL if\n\\p handle’s interface does not have any data allocated locally.\nSee \\ref DataPointers for more details."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node.\nSee \\ref DefiningANewDataInterface_pack for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle.\nSee \\ref DefiningANewDataInterface_helpers for more details."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } unsafe 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 on node \\p node 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 NULL, 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_pack_node (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 ; } unsafe extern "C" { # [doc = "Like starpu_data_pack_node(), but for the local memory node.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Read in handle's \\p node replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek_node (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 ; } unsafe extern "C" { # [doc = "Read in handle's local replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count allocated\non node \\p node as described by the interface of the data. The interface\nregistered at \\p handle must define an unpacking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack_node (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 ; } unsafe 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).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the size of the data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the maximum size that the \\p handle data may need to increase to.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_max_size (handle : starpu_data_handle_t) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "See \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print basic information on \\p handle on \\p node.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_print (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , stream : * mut FILE) ; } unsafe 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 ; } unsafe 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 -EAGAIN if the\ntransfer is still ongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 4D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe extern "C" { # [doc = "Copy \\p nn[1] * \\p nn[2]...* \\p nn[ndim-1] blocks of \\p nn[0] * \\p elemsize 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 nn[i] blocks (i = 1, 2, ... ndim-1) whose start addresses are\nldn_src[i] * \\p elemsize (resp. ld1_dst[i] * \\p elemsize) bytes apart\nin the source (resp. destination) interface.\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 Ndim data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_copynd (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , elemsize : usize , ndim : usize , nn : * mut u32 , ldn_src : * mut u32 , ldn_dst : * mut u32 , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "When an asynchronous 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().\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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) ; } unsafe extern "C" { # [doc = "See starpu_interface_start_driver_copy_async().\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } unsafe extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node.\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node_flags().\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::map_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_map (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize , ret : * mut :: std :: os :: raw :: c_int) -> usize ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::unmap_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_unmap (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::update_map.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_update_map (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) -> :: std :: os :: raw :: c_int ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_matrix_interface"] [:: std :: mem :: size_of :: < starpu_matrix_interface > () - 64usize] ; ["Alignment of starpu_matrix_interface"] [:: std :: mem :: align_of :: < starpu_matrix_interface > () - 8usize] ; ["Offset of field: starpu_matrix_interface::id"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , id) - 0usize] ; ["Offset of field: starpu_matrix_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ptr) - 8usize] ; ["Offset of field: starpu_matrix_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_matrix_interface::offset"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , offset) - 24usize] ; ["Offset of field: starpu_matrix_interface::nx"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , nx) - 32usize] ; ["Offset of field: starpu_matrix_interface::ny"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ny) - 36usize] ; ["Offset of field: starpu_matrix_interface::ld"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ld) - 40usize] ; ["Offset of field: starpu_matrix_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , elemsize) - 48usize] ; ["Offset of field: starpu_matrix_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_coo_interface"] [:: std :: mem :: size_of :: < starpu_coo_interface > () - 56usize] ; ["Alignment of starpu_coo_interface"] [:: std :: mem :: align_of :: < starpu_coo_interface > () - 8usize] ; ["Offset of field: starpu_coo_interface::id"] [:: std :: mem :: offset_of ! (starpu_coo_interface , id) - 0usize] ; ["Offset of field: starpu_coo_interface::columns"] [:: std :: mem :: offset_of ! (starpu_coo_interface , columns) - 8usize] ; ["Offset of field: starpu_coo_interface::rows"] [:: std :: mem :: offset_of ! (starpu_coo_interface , rows) - 16usize] ; ["Offset of field: starpu_coo_interface::values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , values) - 24usize] ; ["Offset of field: starpu_coo_interface::nx"] [:: std :: mem :: offset_of ! (starpu_coo_interface , nx) - 32usize] ; ["Offset of field: starpu_coo_interface::ny"] [:: std :: mem :: offset_of ! (starpu_coo_interface , ny) - 36usize] ; ["Offset of field: starpu_coo_interface::n_values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , n_values) - 40usize] ; ["Offset of field: starpu_coo_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_coo_interface , elemsize) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref COODataInterface for more details."] 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) ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_block_interface"] [:: std :: mem :: size_of :: < starpu_block_interface > () - 64usize] ; ["Alignment of starpu_block_interface"] [:: std :: mem :: align_of :: < starpu_block_interface > () - 8usize] ; ["Offset of field: starpu_block_interface::id"] [:: std :: mem :: offset_of ! (starpu_block_interface , id) - 0usize] ; ["Offset of field: starpu_block_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_block_interface , ptr) - 8usize] ; ["Offset of field: starpu_block_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_block_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_block_interface::offset"] [:: std :: mem :: offset_of ! (starpu_block_interface , offset) - 24usize] ; ["Offset of field: starpu_block_interface::nx"] [:: std :: mem :: offset_of ! (starpu_block_interface , nx) - 32usize] ; ["Offset of field: starpu_block_interface::ny"] [:: std :: mem :: offset_of ! (starpu_block_interface , ny) - 36usize] ; ["Offset of field: starpu_block_interface::nz"] [:: std :: mem :: offset_of ! (starpu_block_interface , nz) - 40usize] ; ["Offset of field: starpu_block_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldy) - 44usize] ; ["Offset of field: starpu_block_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldz) - 48usize] ; ["Offset of field: starpu_block_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_block_interface , elemsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Tensor Data Interface\n@{"] pub static mut starpu_interface_tensor_ops : starpu_data_interface_ops ; } # [doc = "Tensor interface for 4D dense tensors"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_tensor_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the tensor"] pub ptr : usize , # [doc = "< device handle of the tensor."] pub dev_handle : usize , # [doc = "< offset in the tensor."] pub offset : usize , # [doc = "< number of elements on the x-axis of the tensor."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the tensor."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the tensor."] pub nz : u32 , # [doc = "< number of elements on the t-axis of the tensor."] pub nt : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< number of elements between two cubes"] pub ldt : u32 , # [doc = "< size of the elements of the tensor."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tensor_interface"] [:: std :: mem :: size_of :: < starpu_tensor_interface > () - 72usize] ; ["Alignment of starpu_tensor_interface"] [:: std :: mem :: align_of :: < starpu_tensor_interface > () - 8usize] ; ["Offset of field: starpu_tensor_interface::id"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , id) - 0usize] ; ["Offset of field: starpu_tensor_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ptr) - 8usize] ; ["Offset of field: starpu_tensor_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_tensor_interface::offset"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , offset) - 24usize] ; ["Offset of field: starpu_tensor_interface::nx"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nx) - 32usize] ; ["Offset of field: starpu_tensor_interface::ny"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ny) - 36usize] ; ["Offset of field: starpu_tensor_interface::nz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nz) - 40usize] ; ["Offset of field: starpu_tensor_interface::nt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nt) - 44usize] ; ["Offset of field: starpu_tensor_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldy) - 48usize] ; ["Offset of field: starpu_tensor_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldz) - 52usize] ; ["Offset of field: starpu_tensor_interface::ldt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldt) - 56usize] ; ["Offset of field: starpu_tensor_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , elemsize) - 64usize] ; } ; impl Default for starpu_tensor_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz x \\p nt 4D tensor of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy,\n\\p ldz, and \\p ldt specify the number of elements between rows, between z planes and between t cubes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *tensor;\nstarpu_data_handle_t tensor_handle;\ntensor = (float*)malloc(nx*ny*nz*nt*sizeof(float));\nstarpu_tensor_data_register(&tensor_handle, STARPU_MAIN_RAM, (uintptr_t)tensor, nx, nx*ny, nx*ny*nz, nx, ny, nz, nt, sizeof(float));\n\\endcode\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , ldt : u32 , nx : u32 , ny : u32 , nz : u32 , nt : u32 , elemsize : usize) ; } unsafe 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, and \\p ldt elements between t cubes."] pub fn starpu_tensor_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32 , ldt : u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on the x-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nx (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the y-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_ny (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the z-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the t-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each row of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each z plane of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each t cubes of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_tensor_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the tensor designated by\n\\p handle."] pub fn starpu_tensor_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Ndim Array Data Interface\n@{"] pub static mut starpu_interface_ndim_ops : starpu_data_interface_ops ; } # [doc = "ndim interface for ndim array"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_ndim_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the ndim"] pub ptr : usize , # [doc = "< device handle of the ndim."] pub dev_handle : usize , # [doc = "< offset in the ndim."] pub offset : usize , # [doc = "< size actually currently allocated."] pub allocsize : usize , # [doc = "< array of element number on each dimension"] pub nn : * mut u32 , # [doc = "< array of element number between two units on each dimension"] pub ldn : * mut u32 , # [doc = "< size of the dimension."] pub ndim : usize , # [doc = "< size of the elements of the ndim."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_ndim_interface"] [:: std :: mem :: size_of :: < starpu_ndim_interface > () - 72usize] ; ["Alignment of starpu_ndim_interface"] [:: std :: mem :: align_of :: < starpu_ndim_interface > () - 8usize] ; ["Offset of field: starpu_ndim_interface::id"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , id) - 0usize] ; ["Offset of field: starpu_ndim_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ptr) - 8usize] ; ["Offset of field: starpu_ndim_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_ndim_interface::offset"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , offset) - 24usize] ; ["Offset of field: starpu_ndim_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , allocsize) - 32usize] ; ["Offset of field: starpu_ndim_interface::nn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , nn) - 40usize] ; ["Offset of field: starpu_ndim_interface::ldn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ldn) - 48usize] ; ["Offset of field: starpu_ndim_interface::ndim"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ndim) - 56usize] ; ["Offset of field: starpu_ndim_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , elemsize) - 64usize] ; } ; impl Default for starpu_ndim_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nn[0] x \\p nn[1] x ... \\p ndim-dimension matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldn,\nspecifies the number of elements between two units on each dimension.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *ndim_arr;\nsize_t arrsize = 1;\nint i;\nfor (i = 0; i < ndim; i++)\narrsize = arrsize * nn[i];\nstarpu_data_handle_t ndim_handle;\nndim_arr = (float*)malloc(arrsize*sizeof(float));\nstarpu_ndim_data_register(&ndim_handle, STARPU_MAIN_RAM, (uintptr_t)ndim_arr, ldn, nn, ndim, sizeof(float));\n\\endcode\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldn : * mut u32 , nn : * mut u32 , ndim : usize , elemsize : usize) ; } unsafe 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 ldn elements between two units on each dimension."] pub fn starpu_ndim_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldn : * mut u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on each dimension of the ndim array\ndesignated by \\p handle."] pub fn starpu_ndim_get_nn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the i-axis of the ndim array\ndesignated by \\p handle. When i=0, it means x-axis,\nwhen i=1, it means y-axis, when i=2, it means z-axis, etc."] pub fn starpu_ndim_get_ni (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units on each dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units i-axis dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldi (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_ndim_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the dimension size."] pub fn starpu_ndim_get_ndim (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the ndim array designated by\n\\p handle."] pub fn starpu_ndim_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_vector_interface"] [:: std :: mem :: size_of :: < starpu_vector_interface > () - 64usize] ; ["Alignment of starpu_vector_interface"] [:: std :: mem :: align_of :: < starpu_vector_interface > () - 8usize] ; ["Offset of field: starpu_vector_interface::id"] [:: std :: mem :: offset_of ! (starpu_vector_interface , id) - 0usize] ; ["Offset of field: starpu_vector_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_vector_interface , ptr) - 8usize] ; ["Offset of field: starpu_vector_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_vector_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_vector_interface::offset"] [:: std :: mem :: offset_of ! (starpu_vector_interface , offset) - 24usize] ; ["Offset of field: starpu_vector_interface::nx"] [:: std :: mem :: offset_of ! (starpu_vector_interface , nx) - 32usize] ; ["Offset of field: starpu_vector_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , elemsize) - 40usize] ; ["Offset of field: starpu_vector_interface::slice_base"] [:: std :: mem :: offset_of ! (starpu_vector_interface , slice_base) - 48usize] ; ["Offset of field: starpu_vector_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_vector_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize.\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_variable_interface"] [:: std :: mem :: size_of :: < starpu_variable_interface > () - 40usize] ; ["Alignment of starpu_variable_interface"] [:: std :: mem :: align_of :: < starpu_variable_interface > () - 8usize] ; ["Offset of field: starpu_variable_interface::id"] [:: std :: mem :: offset_of ! (starpu_variable_interface , id) - 0usize] ; ["Offset of field: starpu_variable_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_variable_interface , ptr) - 8usize] ; ["Offset of field: starpu_variable_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_variable_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_variable_interface::offset"] [:: std :: mem :: offset_of ! (starpu_variable_interface , offset) - 24usize] ; ["Offset of field: starpu_variable_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_variable_interface , elemsize) - 32usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VariableDataInterface for more details."] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } unsafe 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 void\ndata in read-write concurrently.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } unsafe 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)] 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 = "< position of non-zero entries on the row (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitioning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_csr_interface"] [:: std :: mem :: size_of :: < starpu_csr_interface > () - 72usize] ; ["Alignment of starpu_csr_interface"] [:: std :: mem :: align_of :: < starpu_csr_interface > () - 8usize] ; ["Offset of field: starpu_csr_interface::id"] [:: std :: mem :: offset_of ! (starpu_csr_interface , id) - 0usize] ; ["Offset of field: starpu_csr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nnz) - 4usize] ; ["Offset of field: starpu_csr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nrow) - 8usize] ; ["Offset of field: starpu_csr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nzval) - 16usize] ; ["Offset of field: starpu_csr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , colind) - 24usize] ; ["Offset of field: starpu_csr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_csr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_csr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_csr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_csr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_csr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_csr_interface , elemsize) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix.\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 = "< array of nnz elements (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< array of nrow+1 elements (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitioning 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bcsr_interface"] [:: std :: mem :: size_of :: < starpu_bcsr_interface > () - 80usize] ; ["Alignment of starpu_bcsr_interface"] [:: std :: mem :: align_of :: < starpu_bcsr_interface > () - 8usize] ; ["Offset of field: starpu_bcsr_interface::id"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , id) - 0usize] ; ["Offset of field: starpu_bcsr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nnz) - 4usize] ; ["Offset of field: starpu_bcsr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nrow) - 8usize] ; ["Offset of field: starpu_bcsr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nzval) - 16usize] ; ["Offset of field: starpu_bcsr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , colind) - 24usize] ; ["Offset of field: starpu_bcsr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_bcsr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_bcsr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_bcsr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_bcsr_interface::r"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , r) - 60usize] ; ["Offset of field: starpu_bcsr_interface::c"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , c) - 64usize] ; ["Offset of field: starpu_bcsr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , elemsize) - 72usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () - 56usize] ; ["Alignment of starpu_multiformat_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_elemsize) - 0usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_elemsize) - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_opencl_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_opencl_cl) - 16usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_to_cpu_cl) - 24usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_elemsize) - 32usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_cuda_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_cuda_cl) - 40usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_to_cpu_cl) - 48usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 hip_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_interface"] [:: std :: mem :: size_of :: < starpu_multiformat_interface > () - 56usize] ; ["Alignment of starpu_multiformat_interface"] [:: std :: mem :: align_of :: < starpu_multiformat_interface > () - 8usize] ; ["Offset of field: starpu_multiformat_interface::id"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , id) - 0usize] ; ["Offset of field: starpu_multiformat_interface::cpu_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cpu_ptr) - 8usize] ; ["Offset of field: starpu_multiformat_interface::cuda_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cuda_ptr) - 16usize] ; ["Offset of field: starpu_multiformat_interface::hip_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , hip_ptr) - 24usize] ; ["Offset of field: starpu_multiformat_interface::opencl_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , opencl_ptr) - 32usize] ; ["Offset of field: starpu_multiformat_interface::nx"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , nx) - 40usize] ; ["Offset of field: starpu_multiformat_interface::ops"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , ops) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref TheMultiformatInterface for more details."] 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().\nSee \\ref DefiningANewDataFilter for more details."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n- id 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
\n- nx, ny 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).
\n- ld for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange.
\n- elemsize is usually just copied over.
\n- ptr, the pointer to the data, has to be\ncomputed according to \\p i and the father's ptr, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has ptr different\nfrom NULL: in the OpenCL case notably, the\ndev_handle and offset fields are used\ninstead.
\n- dev_handle should be just copied over from the\nparent.
\n- offset has to be computed according to \\p i and\nthe father's offset, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n
"] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_filter"] [:: std :: mem :: size_of :: < starpu_data_filter > () - 48usize] ; ["Alignment of starpu_data_filter"] [:: std :: mem :: align_of :: < starpu_data_filter > () - 8usize] ; ["Offset of field: starpu_data_filter::filter_func"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_func) - 0usize] ; ["Offset of field: starpu_data_filter::nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , nchildren) - 8usize] ; ["Offset of field: starpu_data_filter::get_nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_nchildren) - 16usize] ; ["Offset of field: starpu_data_filter::get_child_ops"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_child_ops) - 24usize] ; ["Offset of field: starpu_data_filter::filter_arg"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg) - 32usize] ; ["Offset of field: starpu_data_filter::filter_arg_ptr"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg_ptr) - 40usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitioned beforehand.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list.\nSee \\ref PartitioningData for more details."] 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 ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The pointer of the filter list \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_parray (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut * mut starpu_data_filter) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The list of filter \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_array (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_readonly_submit(), but allow to\nspecify the coherency to be used for the main data \\p initial_handle.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\nin read-write mode through starpu_data_partition_submit(), and will downgrade\nthat partitioning into read-only mode for the \\p children, fetching data back to the \\p\ninitial_handle, and adding the necessary dependencies.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_downgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_clean() but the root data will be\ngathered on the given node.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean_node (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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().\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] 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 ; } unsafe 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.\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices.\n\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a matrix along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_vector.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_vector_y().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a matrix. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_variable.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_variable().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr, thus getting a vector\nof size (n-2*shadow)/nparts+2*shadow. The starpu_data_filter::filter_arg_ptr field\nof \\p f must be the shadow size casted into \\c void*.\n\nIMPORTANT: 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in 2 chunks of\nequal size, ignoring nparts. Thus, \\p id must be 0 or 1.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a vector. The starting\nposition is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_vector_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fvector_pick_variable.c\n\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_vector_filter_pick_variable().\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_matrix_z()\nand starpu_block_filter_pick_matrix_y().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a block. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_variable.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_variable().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, thus getting\n(x/\\p nparts ,y,z,t) tensors. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z,t) tensors. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, thus getting\n(x,y/\\p nparts ,z,t) tensors. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z,t) tensors. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, thus getting\n(x,y,z/\\p nparts,t) tensors. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow,t) tensors. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, thus getting\n(x,y,z,t/\\p nparts) tensors. If \\p nparts does not divide t, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,z,(t-2*shadow)/\\p nparts +2*shadow) tensors. If \\p nparts does not\ndivide t, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe T dimension. The starting position on T-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_t (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_block_t(),\nstarpu_tensor_filter_pick_block_z() and starpu_tensor_filter_pick_block_y().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a tensor. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_variable.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_variable().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg, with a shadow border\nstarpu_data_filter::filter_arg_ptr. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a 4-dim array into \\p nparts tensors along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_to_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor (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) ; } unsafe extern "C" { # [doc = "Partition a 3-dim array into \\p nparts blocks along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_block_child_ops(). A usage example is\navailable in examples/filters/fndim_to_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_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) ; } unsafe extern "C" { # [doc = "Partition a 2-dim array into \\p nparts matrices along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_to_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix (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) ; } unsafe extern "C" { # [doc = "Partition a 1-dim array into \\p nparts vectors.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_to_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector (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) ; } unsafe extern "C" { # [doc = "Transfer a 0-dim array to a variable.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_to_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous (n-1)dim arrays from a ndim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nA usage example is available in examples/filters/fndim_pick_ndim.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_ndim (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous tensors from a 5-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_5d_pick_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_5d_pick_tensor (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a 4-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/fndim_4d_pick_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_4d_pick_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a 3-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_3d_pick_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_3d_pick_matrix (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a 2-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_2d_pick_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_2d_pick_vector (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a 1-dim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_1d_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_1d_pick_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a ndim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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 blocksize, which is most often 1.\nSee \\ref DefiningANewDataFilter for more details."] 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 , blocksize : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_align (align : usize) ; } unsafe 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_noflag() function.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "@deprecated\nFree memory which has previously been allocated with\nstarpu_malloc(). This function is deprecated, one should use\nstarpu_free_noflag().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe extern "C" { # [doc = "Free memory by specifying its size. Should be used for memory\nallocated with starpu_malloc().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free_noflag (A : * mut :: std :: os :: raw :: c_void , dim : usize) -> :: 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 > ; unsafe 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().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on the node.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used (node : :: std :: os :: raw :: c_uint) -> usize ; } unsafe extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref DataManagementAllocation)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nDataManagementAllocation)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on all memory nodes.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used_all_nodes () -> usize ; } unsafe 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 -ENOMEM 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_sec seconds. Similar to calling Unix' \\c\nsleep function, except that it takes a float to allow sub-second\nsleeping, and when StarPU is compiled in SimGrid mode it does not\nreally sleep but just makes SimGrid record that the thread has\ntaken some time to sleep.\nSee \\ref Helpers for more details."] pub fn starpu_sleep (nb_sec : f32) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_micro_sec micro-seconds.\nIn simgrid mode, this only sleeps within virtual time.\nSee \\ref Helpers for more details."] pub fn starpu_usleep (nb_micro_sec : f32) ; } unsafe extern "C" { # [doc = "Account for \\p joules J being used.\nThis is support in simgrid mode, to record how much energy was used, and will\nshow up in further call to starpu_energy_used().\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_use (joules : f32) ; } unsafe extern "C" { # [doc = "Return the amount of energy having been used in J.\nThis account the amounts passed to starpu_energy_use(), but also the static\nenergy use set by the \\ref STARPU_IDLE_POWER environment variable.\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_used () -> f64 ; } # [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 ; unsafe 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) ; } unsafe 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 -EPERM, if\n\\p task was already submitted it returns -EINVAL."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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-ENOENT."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] 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]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\nNULL 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifier. It is possible to associate a task\nwith a unique tag 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 ; unsafe 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\nWARNING! Use with caution. 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\n0x200000003 instead of 0x2 and 0x3 when\ncalling starpu_tag_declare_deps(0x1, 2, 0x2, 0x3). 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } unsafe 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 structure starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled).\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Clear the already notified 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } unsafe 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().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } unsafe extern "C" { # [doc = "Return the task associated to the tag \\p id.\nSee \\ref TasksAndTagsDependencies for more details."] 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 submitted, 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 ; # [doc = "todo"] 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 = "HIP implementation of a codelet."] pub type starpu_hip_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 = "Maxeler FPGA implementation of a codelet."] pub type starpu_max_fpga_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 = "@ingroup API_Bubble Hierarchical Dags\nBubble decision function"] pub type starpu_bubble_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = "@ingroup API_Bubble Hierarchical Dags\nBubble DAG generation function"] pub type starpu_bubble_gen_dag_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_trs_epoch { _unused : [u8 ; 0] , } pub type starpu_trs_epoch_t = * mut _starpu_trs_epoch ; # [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.\n\nNote that the codelet structure needs to exist until the task is\nterminated. If dynamic codelet allocation is desired, release should be done\nno sooner than the starpu_task::callback_func callback time.\n\nIf the application wants to make the structure constant, it needs to be\nfilled exactly as StarPU expects:\n\n- starpu_codelet::cpu_funcs, starpu_codelet::cuda_funcs, etc. must be used instead\nof the deprecated starpu_codelet::cpu_func, starpu_codelet::cuda_func, etc.\n\n- the starpu_codelet::where field must be set.\n\nand additionally, starpu_codelet::checked must be set to 1 to tell StarPU\nthat the conditions above are properly met. Also, the \\ref\nSTARPU_CODELET_PROFILING environment variable must be set to 0.\nAn example is provided in tests/main/const_codelet.c"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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_HIP, ::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-NULL 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-NULL 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 HIP\nimplementations of the codelet. The functions must be\nhost-functions written in the HIP runtime API. Their\nprototype must be:\n\\code{.c}\nvoid hip_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::hip_funcs is ignored if ::STARPU_HIP does\nnot appear in the field starpu_codelet::where, it must be\nnon-NULL otherwise."] pub hip_funcs : [starpu_hip_func_t ; 4usize] , # [doc = "Optional array of flags for HIP execution. They specify\nsome semantic details about HIP kernel execution, such as\nasynchronous execution."] pub hip_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-NULL 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 the Maxeler FPGA\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid fpga_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 starpu_codelet::max_fpga_funcs is ignored if\n::STARPU_MAX_FPGA does not appear in the field\nstarpu_codelet::where, it must be non-NULL otherwise."] pub max_fpga_funcs : [starpu_max_fpga_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\nMPI MS devices for StarPU to simply look\nup the MPI MS function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional function to decide if the task is to be\ntransformed into a bubble"] pub bubble_func : starpu_bubble_func_t , # [doc = "Optional function to transform the task into a new graph"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\nvoid *buffers[] 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 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,\nand should not exceed \\ref STARPU_NMAXBUFS. If\ninsufficient, 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\ndata 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 data 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 NULL 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 (in J). This optional field is\nignored when set to NULL 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 ; 48usize] , # [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. Value 0 acts like if this field wasn't specified.\nColor representation is hex triplet (for example: 0xff0000 is red,\n0x0000ff is blue, 0xffa500 is orange, ...)."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL."] 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 , pub perf_counter_sample : * mut starpu_perf_counter_sample , pub perf_counter_values : * mut starpu_perf_counter_sample_cl_values , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet"] [:: std :: mem :: size_of :: < starpu_codelet > () - 832usize] ; ["Alignment of starpu_codelet"] [:: std :: mem :: align_of :: < starpu_codelet > () - 8usize] ; ["Offset of field: starpu_codelet::where_"] [:: std :: mem :: offset_of ! (starpu_codelet , where_) - 0usize] ; ["Offset of field: starpu_codelet::can_execute"] [:: std :: mem :: offset_of ! (starpu_codelet , can_execute) - 8usize] ; ["Offset of field: starpu_codelet::type_"] [:: std :: mem :: offset_of ! (starpu_codelet , type_) - 16usize] ; ["Offset of field: starpu_codelet::max_parallelism"] [:: std :: mem :: offset_of ! (starpu_codelet , max_parallelism) - 20usize] ; ["Offset of field: starpu_codelet::cpu_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_func) - 24usize] ; ["Offset of field: starpu_codelet::cuda_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_func) - 32usize] ; ["Offset of field: starpu_codelet::opencl_func"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_func) - 40usize] ; ["Offset of field: starpu_codelet::cpu_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs) - 48usize] ; ["Offset of field: starpu_codelet::cuda_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_funcs) - 80usize] ; ["Offset of field: starpu_codelet::cuda_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_flags) - 112usize] ; ["Offset of field: starpu_codelet::hip_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_funcs) - 120usize] ; ["Offset of field: starpu_codelet::hip_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_flags) - 152usize] ; ["Offset of field: starpu_codelet::opencl_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_funcs) - 160usize] ; ["Offset of field: starpu_codelet::opencl_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_flags) - 192usize] ; ["Offset of field: starpu_codelet::max_fpga_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , max_fpga_funcs) - 200usize] ; ["Offset of field: starpu_codelet::cpu_funcs_name"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs_name) - 232usize] ; ["Offset of field: starpu_codelet::bubble_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_func) - 264usize] ; ["Offset of field: starpu_codelet::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_gen_dag_func) - 272usize] ; ["Offset of field: starpu_codelet::nbuffers"] [:: std :: mem :: offset_of ! (starpu_codelet , nbuffers) - 280usize] ; ["Offset of field: starpu_codelet::modes"] [:: std :: mem :: offset_of ! (starpu_codelet , modes) - 284usize] ; ["Offset of field: starpu_codelet::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_modes) - 320usize] ; ["Offset of field: starpu_codelet::specific_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , specific_nodes) - 328usize] ; ["Offset of field: starpu_codelet::nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , nodes) - 332usize] ; ["Offset of field: starpu_codelet::dyn_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_nodes) - 368usize] ; ["Offset of field: starpu_codelet::model"] [:: std :: mem :: offset_of ! (starpu_codelet , model) - 376usize] ; ["Offset of field: starpu_codelet::energy_model"] [:: std :: mem :: offset_of ! (starpu_codelet , energy_model) - 384usize] ; ["Offset of field: starpu_codelet::per_worker_stats"] [:: std :: mem :: offset_of ! (starpu_codelet , per_worker_stats) - 392usize] ; ["Offset of field: starpu_codelet::name"] [:: std :: mem :: offset_of ! (starpu_codelet , name) - 776usize] ; ["Offset of field: starpu_codelet::color"] [:: std :: mem :: offset_of ! (starpu_codelet , color) - 784usize] ; ["Offset of field: starpu_codelet::callback_func"] [:: std :: mem :: offset_of ! (starpu_codelet , callback_func) - 792usize] ; ["Offset of field: starpu_codelet::flags"] [:: std :: mem :: offset_of ! (starpu_codelet , flags) - 800usize] ; ["Offset of field: starpu_codelet::perf_counter_sample"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_sample) - 808usize] ; ["Offset of field: starpu_codelet::perf_counter_values"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_values) - 816usize] ; ["Offset of field: starpu_codelet::checked"] [:: std :: mem :: offset_of ! (starpu_codelet , checked) - 824usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Codelet with empty function defined for all drivers"] pub static mut starpu_codelet_nop : starpu_codelet ; } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_descr"] [:: std :: mem :: size_of :: < starpu_data_descr > () - 16usize] ; ["Alignment of starpu_data_descr"] [:: std :: mem :: align_of :: < starpu_data_descr > () - 8usize] ; ["Offset of field: starpu_data_descr::handle"] [:: std :: mem :: offset_of ! (starpu_data_descr , handle) - 0usize] ; ["Offset of field: starpu_data_descr::mode"] [:: std :: mem :: offset_of ! (starpu_data_descr , mode) - 8usize] ; } ; 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)] 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 = "Optional file name where the task was submitted. This can be useful\nfor debugging purposes."] pub file : * const :: std :: os :: raw :: c_char , # [doc = "Optional line number where the task was submitted. This can be useful\nfor debugging purposes."] pub line : :: std :: os :: raw :: c_int , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to NULL,\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 data 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\ndata 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 insufficient, 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 needed 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 insufficient,\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 NULL. 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 pointer which points to the return value of submitted task.\nThe default value is NULL. starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be used to respectively\npack and unpack the return value into and form it. starpu_task::cl_ret\ncan be used for MPI support. The only requirement is that\nthe size of the return value must be set in starpu_task::cl_ret_size ."] pub cl_ret : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. The buffer of starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be allocated with\nthe starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret.\nstarpu_task::cl_ret_size can be used for MPI support."] pub cl_ret_size : usize , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *) which\nspecifies a possible callback. If this pointer is non-NULL,\nthe callback function is executed on the host after the execution of\nthe task. Contrary to starpu_task::callback_func, it is called\nbefore releasing tasks which depend on this task, so those cannot be\nalready executing. The callback is passed\nthe value contained in the starpu_task::epilogue_callback_arg field.\nNo callback is executed if the field is set to NULL.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EPILOGUE_CALLBACK followed by the function pointer."] pub epilogue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is NULL. This is\nthe pointer passed to the epilogue callback function. This field is\nignored if the field starpu_task::epilogue_callback_func is set to\nNULL."] pub epilogue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, the callback function is executed on the\nhost after the execution of the task. Contrary to\nstarpu_task::epilogue_callback, it is called after releasing\ntasks which depend on this task, so those\nmight 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 NULL.\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 NULL. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\nNULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void*)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 = "Transaction to which the task belongs, if any"] pub transaction : * mut starpu_transaction , # [doc = "Transaction epoch to which the task belongs, if any"] pub trs_epoch : starpu_trs_epoch_t , # [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 this task has failed and will thus have to be retried\n\nSet by StarPU."] pub failed : :: 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\nCall starpu_task_status_get_as_string() to get the status as a string.\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 NULL."] 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 starpu_perfmodel_plot, 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 in microseconds. 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 = "When using hierarchical dags, the job identifier of the\nbubble task which created the current task"] pub bubble_parent : :: std :: os :: raw :: c_ulong , # [doc = "When using hierarchical dags, a pointer to the bubble\ndecision function"] pub bubble_func : starpu_bubble_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble decision function"] pub bubble_func_arg : * mut :: std :: os :: raw :: c_void , # [doc = "When using hierarchical dags, a pointer to the bubble\nDAG generation function"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble DAG generation function"] pub bubble_gen_dag_func_arg : * mut :: std :: os :: raw :: c_void , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task"] [:: std :: mem :: size_of :: < starpu_task > () - 552usize] ; ["Alignment of starpu_task"] [:: std :: mem :: align_of :: < starpu_task > () - 8usize] ; ["Offset of field: starpu_task::name"] [:: std :: mem :: offset_of ! (starpu_task , name) - 0usize] ; ["Offset of field: starpu_task::file"] [:: std :: mem :: offset_of ! (starpu_task , file) - 8usize] ; ["Offset of field: starpu_task::line"] [:: std :: mem :: offset_of ! (starpu_task , line) - 16usize] ; ["Offset of field: starpu_task::cl"] [:: std :: mem :: offset_of ! (starpu_task , cl) - 24usize] ; ["Offset of field: starpu_task::where_"] [:: std :: mem :: offset_of ! (starpu_task , where_) - 32usize] ; ["Offset of field: starpu_task::nbuffers"] [:: std :: mem :: offset_of ! (starpu_task , nbuffers) - 36usize] ; ["Offset of field: starpu_task::dyn_handles"] [:: std :: mem :: offset_of ! (starpu_task , dyn_handles) - 40usize] ; ["Offset of field: starpu_task::dyn_interfaces"] [:: std :: mem :: offset_of ! (starpu_task , dyn_interfaces) - 48usize] ; ["Offset of field: starpu_task::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_task , dyn_modes) - 56usize] ; ["Offset of field: starpu_task::handles"] [:: std :: mem :: offset_of ! (starpu_task , handles) - 64usize] ; ["Offset of field: starpu_task::interfaces"] [:: std :: mem :: offset_of ! (starpu_task , interfaces) - 128usize] ; ["Offset of field: starpu_task::modes"] [:: std :: mem :: offset_of ! (starpu_task , modes) - 192usize] ; ["Offset of field: starpu_task::handles_sequential_consistency"] [:: std :: mem :: offset_of ! (starpu_task , handles_sequential_consistency) - 224usize] ; ["Offset of field: starpu_task::cl_arg"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg) - 232usize] ; ["Offset of field: starpu_task::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg_size) - 240usize] ; ["Offset of field: starpu_task::cl_ret"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret) - 248usize] ; ["Offset of field: starpu_task::cl_ret_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret_size) - 256usize] ; ["Offset of field: starpu_task::epilogue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_func) - 264usize] ; ["Offset of field: starpu_task::epilogue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_arg) - 272usize] ; ["Offset of field: starpu_task::callback_func"] [:: std :: mem :: offset_of ! (starpu_task , callback_func) - 280usize] ; ["Offset of field: starpu_task::callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , callback_arg) - 288usize] ; ["Offset of field: starpu_task::prologue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_func) - 296usize] ; ["Offset of field: starpu_task::prologue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_arg) - 304usize] ; ["Offset of field: starpu_task::prologue_callback_pop_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_func) - 312usize] ; ["Offset of field: starpu_task::prologue_callback_pop_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_arg) - 320usize] ; ["Offset of field: starpu_task::transaction"] [:: std :: mem :: offset_of ! (starpu_task , transaction) - 328usize] ; ["Offset of field: starpu_task::trs_epoch"] [:: std :: mem :: offset_of ! (starpu_task , trs_epoch) - 336usize] ; ["Offset of field: starpu_task::tag_id"] [:: std :: mem :: offset_of ! (starpu_task , tag_id) - 344usize] ; ["Offset of field: starpu_task::mf_skip"] [:: std :: mem :: offset_of ! (starpu_task , mf_skip) - 354usize] ; ["Offset of field: starpu_task::failed"] [:: std :: mem :: offset_of ! (starpu_task , failed) - 355usize] ; ["Offset of field: starpu_task::scheduled"] [:: std :: mem :: offset_of ! (starpu_task , scheduled) - 356usize] ; ["Offset of field: starpu_task::prefetched"] [:: std :: mem :: offset_of ! (starpu_task , prefetched) - 357usize] ; ["Offset of field: starpu_task::workerid"] [:: std :: mem :: offset_of ! (starpu_task , workerid) - 360usize] ; ["Offset of field: starpu_task::workerorder"] [:: std :: mem :: offset_of ! (starpu_task , workerorder) - 364usize] ; ["Offset of field: starpu_task::workerids"] [:: std :: mem :: offset_of ! (starpu_task , workerids) - 368usize] ; ["Offset of field: starpu_task::workerids_len"] [:: std :: mem :: offset_of ! (starpu_task , workerids_len) - 376usize] ; ["Offset of field: starpu_task::priority"] [:: std :: mem :: offset_of ! (starpu_task , priority) - 380usize] ; ["Offset of field: starpu_task::status"] [:: std :: mem :: offset_of ! (starpu_task , status) - 384usize] ; ["Offset of field: starpu_task::magic"] [:: std :: mem :: offset_of ! (starpu_task , magic) - 388usize] ; ["Offset of field: starpu_task::type_"] [:: std :: mem :: offset_of ! (starpu_task , type_) - 392usize] ; ["Offset of field: starpu_task::color"] [:: std :: mem :: offset_of ! (starpu_task , color) - 396usize] ; ["Offset of field: starpu_task::sched_ctx"] [:: std :: mem :: offset_of ! (starpu_task , sched_ctx) - 400usize] ; ["Offset of field: starpu_task::hypervisor_tag"] [:: std :: mem :: offset_of ! (starpu_task , hypervisor_tag) - 404usize] ; ["Offset of field: starpu_task::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_task , possibly_parallel) - 408usize] ; ["Offset of field: starpu_task::bundle"] [:: std :: mem :: offset_of ! (starpu_task , bundle) - 416usize] ; ["Offset of field: starpu_task::profiling_info"] [:: std :: mem :: offset_of ! (starpu_task , profiling_info) - 424usize] ; ["Offset of field: starpu_task::flops"] [:: std :: mem :: offset_of ! (starpu_task , flops) - 432usize] ; ["Offset of field: starpu_task::predicted"] [:: std :: mem :: offset_of ! (starpu_task , predicted) - 440usize] ; ["Offset of field: starpu_task::predicted_transfer"] [:: std :: mem :: offset_of ! (starpu_task , predicted_transfer) - 448usize] ; ["Offset of field: starpu_task::predicted_start"] [:: std :: mem :: offset_of ! (starpu_task , predicted_start) - 456usize] ; ["Offset of field: starpu_task::prev"] [:: std :: mem :: offset_of ! (starpu_task , prev) - 464usize] ; ["Offset of field: starpu_task::next"] [:: std :: mem :: offset_of ! (starpu_task , next) - 472usize] ; ["Offset of field: starpu_task::starpu_private"] [:: std :: mem :: offset_of ! (starpu_task , starpu_private) - 480usize] ; ["Offset of field: starpu_task::omp_task"] [:: std :: mem :: offset_of ! (starpu_task , omp_task) - 488usize] ; ["Offset of field: starpu_task::bubble_parent"] [:: std :: mem :: offset_of ! (starpu_task , bubble_parent) - 496usize] ; ["Offset of field: starpu_task::bubble_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func) - 504usize] ; ["Offset of field: starpu_task::bubble_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func_arg) - 512usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func) - 520usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func_arg) - 528usize] ; ["Offset of field: starpu_task::nb_termination_call_required"] [:: std :: mem :: offset_of ! (starpu_task , nb_termination_call_required) - 536usize] ; ["Offset of field: starpu_task::sched_data"] [:: std :: mem :: offset_of ! (starpu_task , sched_data) - 544usize] ; } ; 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 unsafe fn cl_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn cl_ret_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_cl_ret_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 unsafe fn cl_ret_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_ret_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn 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_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 unsafe fn callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn epilogue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_epilogue_callback_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 unsafe fn epilogue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_epilogue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 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 (4usize , 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 (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 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 (5usize , 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 (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_pop_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_pop_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 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 (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_tag_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_tag_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 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 (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn sequential_consistency_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_sequential_consistency_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 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 (8usize , 1u8 , val as u64) } } # [inline] pub unsafe fn synchronous_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 8usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_synchronous_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 8usize , 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 (9usize , 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 (9usize , 1u8 , val as u64) } } # [inline] pub unsafe fn execute_on_a_specific_worker_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 9usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_execute_on_a_specific_worker_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 9usize , 1u8 , val as u64 ,) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 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 (10usize , 1u8 , val as u64) } } # [inline] pub unsafe fn detach_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 10usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_detach_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 10usize , 1u8 , val as u64 ,) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 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 (11usize , 1u8 , val as u64) } } # [inline] pub unsafe fn destroy_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 11usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_destroy_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 11usize , 1u8 , val as u64 ,) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (12usize , 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 (12usize , 1u8 , val as u64) } } # [inline] pub unsafe fn regenerate_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 12usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_regenerate_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 12usize , 1u8 , val as u64 ,) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (13usize , 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 (13usize , 1u8 , val as u64) } } # [inline] pub unsafe fn no_submitorder_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 13usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_no_submitorder_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 13usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , cl_ret_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , epilogue_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 cl_ret_free : u32 = unsafe { :: std :: mem :: transmute (cl_ret_free) } ; cl_ret_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let epilogue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (epilogue_callback_arg_free) } ; epilogue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 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 (5usize , 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 (6usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (9usize , 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 (10usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (12usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (13usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } unsafe 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.\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_init (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_clean (task : * mut starpu_task) ; } unsafe 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().\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_create () -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Allocate a task structure that does nothing but accesses data \\p handle\nwith mode \\p mode. This allows to synchronize with the task graph, according\nto the sequential consistency, against tasks submitted before or after\nsubmitting this task. One can then use starpu_task_declare_deps_array() or\nstarpu_task_end_dep_add() / starpu_task_end_dep_release() to add dependencies\nagainst this task before submitting it.\nSee \\ref SynchronizationTasks for more details."] pub fn starpu_task_create_sync (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> * mut starpu_task ; } unsafe 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.\nSee \\ref Per-taskFeedback and \\ref PerformanceModelExample for more details."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Tell StarPU to free the resources associated with \\p task when the task is\nover. This is equivalent to having set task->destroy = 1 before submission,\nthe difference is that this can be called after submission and properly deals\nwith concurrency with the task execution.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_set_destroy (task : * mut starpu_task) ; } unsafe 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-ENODEV 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Submit \\p task to StarPU with dependency bypass.\n\nThis can only be called on behalf of another task which has already taken the\nproper dependencies, e.g. this task is just an attempt of doing the actual\ncomputation of that task.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_submit_nodeps (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingTasksToAContext for more details."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if \\p task is terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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, -EINVAL indicates that the\nspecified task was either synchronous or detached.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, -EINVAL indicates that\none of the tasks was either synchronous or detached.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowtoReuseMemory for more details."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] 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 ; } unsafe extern "C" { # [doc = "Wait until there is no more ready task.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_pop () ; } unsafe extern "C" { # [doc = "See \\ref GraphScheduling for more details."] pub fn starpu_do_schedule () ; } unsafe 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++.\nSee \\ref DefiningACodelet for more details."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl.\nSee \\ref Per-codeletFeedback for more details."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Return the task currently executed by the worker, or NULL 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.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_task_get_current () -> * mut starpu_task ; } unsafe 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.\n\nSee \\ref SpecifyingATargetNode for more details."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the name of the performance model of \\p task.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref TraceTaskDetails for more details."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Create and submit an empty task with the given callback.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Function to be used as a prologue callback to enable fault tolerance for the\ntask. This prologue will create a try-task, i.e a duplicate of the task,\nwhich will to the actual computation.\n\nThe prologue argument can be set to a check_ft function that will be\ncalled on termination of the duplicate, which can check the result of the\ntask, and either confirm success, or resubmit another attempt.\nIf it is not set, the default implementation is to just resubmit a new\ntry-task.\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_prologue (check_ft : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Create a try-task for a \\p meta_task, given a \\p template_task task\ntemplate. The meta task can be passed as template on the first call, but\nsince it is mangled by starpu_task_ft_create_retry(), further calls\n(typically made by the check_ft callback) need to be passed the previous\ntry-task as template task.\n\n\\p check_ft is similar to the prologue argument of\nstarpu_task_ft_prologue(), and is typically set to the very function calling\nstarpu_task_ft_create_retry().\n\nThe try-task is returned, and can be modified (e.g. to change scheduling\nparameters) before being submitted with starpu_task_submit_nodeps().\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_create_retry (meta_task : * const starpu_task , template_task : * const starpu_task , check_ft : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Record that this task failed, and should thus be retried.\nThis is usually called from the task codelet function itself, after checking\nthe result and noticing that the computation went wrong, and thus the task\nshould be retried. The performance of this task execution will not be\nrecorded for performance models.\n\nThis can only be called for a task whose data access modes are either\n::STARPU_R and ::STARPU_W."] pub fn starpu_task_ft_failed (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Notify that the try-task was successful and thus the meta-task was\nsuccessful.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_success (meta_task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for \\ref STARPU_WATCHDOG_TIMEOUT seconds.\nSee \\ref WatchdogSupport for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the given status as a string"] pub fn starpu_task_status_get_as_string (status : starpu_task_status) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Specify a minimum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MIN_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_min_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Specify a maximum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MAX_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_max_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Function to open a new transaction object and start the first transaction epoch.\n\n@return A pointer to an initializes struct starpu_transaction\nor \\c NULL if submitting the transaction begin task failed with \\c ENODEV.\nSee \\ref TransactionsCreation for more details."] pub fn starpu_transaction_open (do_start_func : :: std :: option :: Option < unsafe extern "C" fn (buffer : * mut :: std :: os :: raw :: c_void , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , do_start_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_transaction ; } unsafe extern "C" { # [doc = "Function to mark the end of the current transaction epoch and start a new epoch.\nSee \\ref TransactionsEpochNext for more details."] pub fn starpu_transaction_next_epoch (p_trs : * mut starpu_transaction , do_start_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Function to mark the end of the last transaction epoch and free the transaction object.\nSee \\ref TransactionsClosing for more details."] pub fn starpu_transaction_close (p_trs : * mut starpu_transaction) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; # [doc = "< CPU core"] pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; # [doc = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_RAM : starpu_node_kind = 4 ; # [doc = "< Disk memory"] pub const STARPU_DISK_RAM : starpu_node_kind = 5 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_RAM : starpu_node_kind = 7 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_RAM : starpu_node_kind = 8 ; # [doc = "< Maximum value of memory types"] pub const STARPU_MAX_RAM : starpu_node_kind = 8 ; # [doc = "< Number of memory types"] pub const STARPU_NRAM : starpu_node_kind = 9 ; # [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 = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_WORKER : starpu_worker_archtype = 4 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_WORKER : starpu_worker_archtype = 6 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_WORKER : starpu_worker_archtype = 7 ; # [doc = "< Number of arch types"] pub const STARPU_NARCH : starpu_worker_archtype = 8 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 255 ; # [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)] 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 ; 48usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_ctx_iterator"] [:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () - 80usize] ; ["Alignment of starpu_sched_ctx_iterator"] [:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::cursor"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , cursor) - 0usize] ; ["Offset of field: starpu_sched_ctx_iterator::value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , value) - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::possible_value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possible_value) - 16usize] ; ["Offset of field: starpu_sched_ctx_iterator::visited"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , visited) - 24usize] ; ["Offset of field: starpu_sched_ctx_iterator::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possibly_parallel) - 72usize] ; } ; 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)] 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 ; 48usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 48usize] , pub is_master : [:: std :: os :: raw :: c_char ; 48usize] , # [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 collection"] 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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_worker_collection"] [:: std :: mem :: size_of :: < starpu_worker_collection > () - 264usize] ; ["Alignment of starpu_worker_collection"] [:: std :: mem :: align_of :: < starpu_worker_collection > () - 8usize] ; ["Offset of field: starpu_worker_collection::workerids"] [:: std :: mem :: offset_of ! (starpu_worker_collection , workerids) - 0usize] ; ["Offset of field: starpu_worker_collection::collection_private"] [:: std :: mem :: offset_of ! (starpu_worker_collection , collection_private) - 8usize] ; ["Offset of field: starpu_worker_collection::nworkers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nworkers) - 16usize] ; ["Offset of field: starpu_worker_collection::unblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , unblocked_workers) - 24usize] ; ["Offset of field: starpu_worker_collection::nunblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nunblocked_workers) - 32usize] ; ["Offset of field: starpu_worker_collection::masters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , masters) - 40usize] ; ["Offset of field: starpu_worker_collection::nmasters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nmasters) - 48usize] ; ["Offset of field: starpu_worker_collection::present"] [:: std :: mem :: offset_of ! (starpu_worker_collection , present) - 52usize] ; ["Offset of field: starpu_worker_collection::is_unblocked"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_unblocked) - 100usize] ; ["Offset of field: starpu_worker_collection::is_master"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_master) - 148usize] ; ["Offset of field: starpu_worker_collection::type_"] [:: std :: mem :: offset_of ! (starpu_worker_collection , type_) - 196usize] ; ["Offset of field: starpu_worker_collection::has_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , has_next) - 200usize] ; ["Offset of field: starpu_worker_collection::get_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , get_next) - 208usize] ; ["Offset of field: starpu_worker_collection::add"] [:: std :: mem :: offset_of ! (starpu_worker_collection , add) - 216usize] ; ["Offset of field: starpu_worker_collection::remove"] [:: std :: mem :: offset_of ! (starpu_worker_collection , remove) - 224usize] ; ["Offset of field: starpu_worker_collection::init"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init) - 232usize] ; ["Offset of field: starpu_worker_collection::deinit"] [:: std :: mem :: offset_of ! (starpu_worker_collection , deinit) - 240usize] ; ["Offset of field: starpu_worker_collection::init_iterator"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator) - 248usize] ; ["Offset of field: starpu_worker_collection::init_iterator_for_parallel_tasks"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator_for_parallel_tasks) - 256usize] ; } ; 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 () } } } unsafe extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } unsafe extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } unsafe extern "C" { # [doc = "Wait for all workers to be initialised. Calling this function is\nnormally not necessary. It is called for example in\ntools/starpu_machine_display to make sure all workers\ninformation are correctly set before printing their information.\nSee \\ref PauseResume for more details."] pub fn starpu_worker_wait_for_initialisation () ; } unsafe extern "C" { # [doc = "Return true if type matches one of StarPU's defined worker architectures.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_archtype_is_valid (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Convert a mask of architectures to a worker archtype.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_arch_mask_to_worker_archtype (mask : :: std :: os :: raw :: c_uint) -> starpu_worker_archtype ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of HIP devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXHIPDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_hip_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of TCPIP Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_tcpip_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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).\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_sched_find_all_worker_combinations () ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\nNULL) value is returned in case of success, -EINVAL\nindicates that \\p type is not valid otherwise.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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-ERANGE 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return true if worker type can execute this task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_type_can_execute_task (worker_type : starpu_worker_archtype , task : * const starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all workers.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_all (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe extern "C" { # [doc = "Display on \\p output the number of workers of the given \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_count (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe 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 hwloc in case it is available.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devnum (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_subworkerid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return when the current task is expected to be finished.\n\nNote: the returned date should be used with caution since the task might very\nwell end just after this function returns.\n\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_worker_get_current_task_exp_end (workerid : :: std :: os :: raw :: c_uint , date : * mut timespec) ; } unsafe extern "C" { # [doc = "Return whether worker \\p workerid is currently blocked in a parallel task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return worker \\p type from a string.\nReturns STARPU_UNKNOWN_WORKER if the string doesn't match a worker type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_from_string (type_ : * const :: std :: os :: raw :: c_char) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string suitable for environment variable names (CPU, CUDA, etc.).\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_env_var (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe 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().\nSee \\ref InteroperabilityHWLOC for more details."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } unsafe extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to the worker \\p workerid.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } unsafe extern "C" { # [doc = "See \\ref TopologyMemory for more details."] pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the memory node associated to the current worker.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes of a given \\p kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count_by_kind (kind : starpu_node_kind) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Get the list of memory nodes of kind \\p kind.\nFill the array \\p memory_nodes_ids with the memory nodes numbers.\nThe argument \\p maxsize indicates the size of the array\n\\p memory_nodes_ids. The return value gives the number of node numbers\nthat were put in the array. -ERANGE is returned if \\p maxsize\nis lower than the number of memory nodes with the appropriate kind: in that\ncase, the array is filled with the \\p maxsize first elements. To avoid such\noverflows, the value of maxsize can be chosen by the means of function\nstarpu_memory_nodes_get_count_by_kind(), or by passing a value greater or\nequal to \\ref STARPU_MAXNODES.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_ids_by_type (kind : starpu_node_kind , memory_nodes_ids : * mut :: std :: os :: raw :: c_uint , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } unsafe extern "C" { # [doc = "Return the type of worker which operates on memory node kind \\p node_kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_worker_archtype (node_kind : starpu_node_kind) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the type of memory node that arch type \\p type operates on.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node_kind (type_ : starpu_worker_archtype) -> starpu_node_kind ; } unsafe 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 ; } unsafe 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 UINT_MAX-1 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_on () ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_off () ; } unsafe extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Acquire the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock_self () ; } unsafe extern "C" { # [doc = "Release the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock_self () ; } unsafe extern "C" { # [doc = "Return the number of different combined workers.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the current combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref Fork-modeParallelTasks and \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Register a new combined worker and get its identifier.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Get the description of a combined worker.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } unsafe 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).\nSee \\ref SchedulingHelpers for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_device"] [:: std :: mem :: size_of :: < starpu_perfmodel_device > () - 12usize] ; ["Alignment of starpu_perfmodel_device"] [:: std :: mem :: align_of :: < starpu_perfmodel_device > () - 4usize] ; ["Offset of field: starpu_perfmodel_device::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , type_) - 0usize] ; ["Offset of field: starpu_perfmodel_device::devid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , devid) - 4usize] ; ["Offset of field: starpu_perfmodel_device::ncores"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , ncores) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_arch > () - 16usize] ; ["Alignment of starpu_perfmodel_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_arch::ndevices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , ndevices) - 0usize] ; ["Offset of field: starpu_perfmodel_arch::devices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , devices) - 8usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_entry"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () - 88usize] ; ["Alignment of starpu_perfmodel_history_entry"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::mean"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , mean) - 0usize] ; ["Offset of field: starpu_perfmodel_history_entry::deviation"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , deviation) - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum) - 16usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum2) - 24usize] ; ["Offset of field: starpu_perfmodel_history_entry::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nsample) - 32usize] ; ["Offset of field: starpu_perfmodel_history_entry::nerror"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nerror) - 36usize] ; ["Offset of field: starpu_perfmodel_history_entry::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel_history_entry::size"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , size) - 48usize] ; ["Offset of field: starpu_perfmodel_history_entry::flops"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , flops) - 56usize] ; ["Offset of field: starpu_perfmodel_history_entry::duration"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , duration) - 64usize] ; ["Offset of field: starpu_perfmodel_history_entry::tag"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , tag) - 72usize] ; ["Offset of field: starpu_perfmodel_history_entry::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , parameters) - 80usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_list"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () - 16usize] ; ["Alignment of starpu_perfmodel_history_list"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_list::next"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , next) - 0usize] ; ["Offset of field: starpu_perfmodel_history_list::entry"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , entry) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_regression_model"] [:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () - 120usize] ; ["Alignment of starpu_perfmodel_regression_model"] [:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlny) - 0usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx) - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx2) - 16usize] ; ["Offset of field: starpu_perfmodel_regression_model::minx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , minx) - 24usize] ; ["Offset of field: starpu_perfmodel_regression_model::maxx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , maxx) - 32usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnxlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnxlny) - 40usize] ; ["Offset of field: starpu_perfmodel_regression_model::alpha"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , alpha) - 48usize] ; ["Offset of field: starpu_perfmodel_regression_model::beta"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , beta) - 56usize] ; ["Offset of field: starpu_perfmodel_regression_model::valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , valid) - 64usize] ; ["Offset of field: starpu_perfmodel_regression_model::a"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , a) - 72usize] ; ["Offset of field: starpu_perfmodel_regression_model::b"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , b) - 80usize] ; ["Offset of field: starpu_perfmodel_regression_model::c"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , c) - 88usize] ; ["Offset of field: starpu_perfmodel_regression_model::nl_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nl_valid) - 96usize] ; ["Offset of field: starpu_perfmodel_regression_model::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nsample) - 100usize] ; ["Offset of field: starpu_perfmodel_regression_model::coeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , coeff) - 104usize] ; ["Offset of field: starpu_perfmodel_regression_model::ncoeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , ncoeff) - 112usize] ; ["Offset of field: starpu_perfmodel_regression_model::multi_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , multi_valid) - 116usize] ; } ; 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)] 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_per_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () - 408usize] ; ["Alignment of starpu_perfmodel_per_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , cost_function) - 0usize] ; ["Offset of field: starpu_perfmodel_per_arch::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , size_base) - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::history"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , history) - 16usize] ; ["Offset of field: starpu_perfmodel_per_arch::list"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , list) - 24usize] ; ["Offset of field: starpu_perfmodel_per_arch::regression"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , regression) - 32usize] ; ["Offset of field: starpu_perfmodel_per_arch::debug_path"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , debug_path) - 152usize] ; } ; 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-worker cost model function"] pub const STARPU_PER_WORKER : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 2 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 3 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic linear regression-based cost model (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 7 ; # [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)] pub struct starpu_perfmodel { # [doc = "type of performance model\n\n- \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
\n- \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
\n- \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
\n- \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
\n
"] 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_PER_ARCH. 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_PER_WORKER. Take a task, a worker id and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that worker."] pub worker_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not NULL, 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 NULL, 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 = "name of the file storing the performance model. It is non\nNULL if the model has been loaded or stored in a file."] pub path : * mut :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel"] [:: std :: mem :: size_of :: < starpu_perfmodel > () - 128usize] ; ["Alignment of starpu_perfmodel"] [:: std :: mem :: align_of :: < starpu_perfmodel > () - 8usize] ; ["Offset of field: starpu_perfmodel::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel , type_) - 0usize] ; ["Offset of field: starpu_perfmodel::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , cost_function) - 8usize] ; ["Offset of field: starpu_perfmodel::arch_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , arch_cost_function) - 16usize] ; ["Offset of field: starpu_perfmodel::worker_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , worker_cost_function) - 24usize] ; ["Offset of field: starpu_perfmodel::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel , size_base) - 32usize] ; ["Offset of field: starpu_perfmodel::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel::symbol"] [:: std :: mem :: offset_of ! (starpu_perfmodel , symbol) - 48usize] ; ["Offset of field: starpu_perfmodel::path"] [:: std :: mem :: offset_of ! (starpu_perfmodel , path) - 56usize] ; ["Offset of field: starpu_perfmodel::is_loaded"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_loaded) - 64usize] ; ["Offset of field: starpu_perfmodel::benchmarking"] [:: std :: mem :: offset_of ! (starpu_perfmodel , benchmarking) - 68usize] ; ["Offset of field: starpu_perfmodel::is_init"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_init) - 72usize] ; ["Offset of field: starpu_perfmodel::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters) - 80usize] ; ["Offset of field: starpu_perfmodel::parameters_names"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters_names) - 88usize] ; ["Offset of field: starpu_perfmodel::nparameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , nparameters) - 96usize] ; ["Offset of field: starpu_perfmodel::combinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , combinations) - 104usize] ; ["Offset of field: starpu_perfmodel::ncombinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , ncombinations) - 112usize] ; ["Offset of field: starpu_perfmodel::state"] [:: std :: mem :: offset_of ! (starpu_perfmodel , state) - 120usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = "Deinitialize the \\p model performance model structure. You need to call this\nbefore deallocating the structure. You will probably want to call\nstarpu_perfmodel_unload_model() before calling this function, to save the perfmodel."] pub fn starpu_perfmodel_deinit (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_start - start counting hardware events in an event set\n\n- \\p workerid is the worker on which calibration is to be performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration will be run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_start (workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_stop - stop counting hardware events in an event set\n\n- \\p model is the energy performance model to be filled with the result\n- \\p task is a task specimen, so the performance model folds the result according to the parameter sizes of the task.\n- \\p nimpl is the implementation number run during calibration\n- \\p ntasks is the number of tasks run during calibration\n- \\p workerid is the worker on which calibration was performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration was run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_stop (model : * mut starpu_perfmodel , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint , ntasks : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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$STARPU_HOME/.starpu. 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Save the performance model in its file."] pub fn starpu_save_history_based_model (model : * mut starpu_perfmodel) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } unsafe 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 tools/starpu_perfmodel_display.c."] pub fn starpu_perfmodel_free_sampling () ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the estimated time in µs 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 ; } unsafe 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 () ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with one explicit\nmeasurement (in µs or J), 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.\n\nNote that this records only one measurement, and StarPU would ignore\nthe first measurement (since it is usually disturbed by library loading\netc.). Make sure to call this function several times to record all your\nmeasurements.\n\nYou can also call starpu_perfmodel_update_history_n() to directly provide an\naverage performed on several tasks.\n\nSee \\ref PerformanceModelCalibration for more details."] 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) ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with an explicit average measurement (in µs or J).\n\nThis is similar to starpu_perfmodel_update_history(), but records a batch of\n\\p number measurements provided as the average of the measurements \\p average_measured."] pub fn starpu_perfmodel_update_history_n (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 , average_measured : f64 , number : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the latency of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task_list"] [:: std :: mem :: size_of :: < starpu_task_list > () - 16usize] ; ["Alignment of starpu_task_list"] [:: std :: mem :: align_of :: < starpu_task_list > () - 8usize] ; ["Offset of field: starpu_task_list::head"] [:: std :: mem :: offset_of ! (starpu_task_list , head) - 0usize] ; ["Offset of field: starpu_task_list::tail"] [:: std :: mem :: offset_of ! (starpu_task_list , tail) - 8usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize a list structure.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } unsafe extern "C" { # [doc = "Push \\p task at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Push \\p task at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Get the front of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the back of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test if \\p list is empty.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Remove \\p task from \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Remove the element at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Remove the element at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the first task of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the end of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Move list from one head \\p lsrc to another \\p ldst.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } unsafe 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\n- ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n
- ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n
- ::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
- ::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
- 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
\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.\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Identical to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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\ntask->dyn_handles array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating task->dyn_handles 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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().\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [doc = "Structure to be used for starpu_codelet_pack_arg_init() & co, and\nstarpu_codelet_unpack_arg_init() & co. The contents is public,\nhowever users should not directly access it, but only use as a\nparameter to the appropriate functions."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub arg_buffer_used : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet_pack_arg_data"] [:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () - 40usize] ; ["Alignment of starpu_codelet_pack_arg_data"] [:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer) - 0usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_size"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_size) - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_used"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_used) - 16usize] ; ["Offset of field: starpu_codelet_pack_arg_data::current_offset"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , current_offset) - 24usize] ; ["Offset of field: starpu_codelet_pack_arg_data::nargs"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , nargs) - 32usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } unsafe extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times.\nSee \\ref InsertTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } unsafe extern "C" { # [doc = "Initialize \\p state with \\p cl_arg and \\p cl_arg_size. This has to\nbe called before calling starpu_codelet_unpack_arg().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_init (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut :: std :: os :: raw :: c_void , cl_arg_size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of size \\p size from \\p state into \\p ptr with a copy.\n\\p state has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr\nwith a copy. \\p ptr is allocated before copying in it the value of\nthe argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_dup_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr.\n\\p ptr will be a pointer to the memory of the argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pick_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Finish unpacking data, after calling starpu_codelet_unpack_arg_init()\nonce and starpu_codelet_unpack_arg() or starpu_codelet_dup_arg() or\nstarpu_codelet_pick_arg() several times.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_fini (state : * mut starpu_codelet_pack_arg_data) ; } unsafe extern "C" { # [doc = "Call this function during unpacking to skip saving the argument in ptr.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_discard_arg (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] 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\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here given the task
\n- starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here gives back the task to the core. It must not\naccess this task any more
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- 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.
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n\nNote: to get an estimation of the task duration, \\p perf_workerid\nneeds to be used rather than \\p workerid, for the case of parallel\ntasks."] 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 NULL, 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 = "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 = " Whether this scheduling policy does data prefetching, and thus the\ncore should not try to do it opportunistically."] pub prefetches : :: std :: os :: raw :: c_int , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_policy"] [:: std :: mem :: size_of :: < starpu_sched_policy > () - 128usize] ; ["Alignment of starpu_sched_policy"] [:: std :: mem :: align_of :: < starpu_sched_policy > () - 8usize] ; ["Offset of field: starpu_sched_policy::init_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , init_sched) - 0usize] ; ["Offset of field: starpu_sched_policy::deinit_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , deinit_sched) - 8usize] ; ["Offset of field: starpu_sched_policy::push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task) - 16usize] ; ["Offset of field: starpu_sched_policy::simulate_push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , simulate_push_task) - 24usize] ; ["Offset of field: starpu_sched_policy::push_task_notify"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task_notify) - 32usize] ; ["Offset of field: starpu_sched_policy::pop_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pop_task) - 40usize] ; ["Offset of field: starpu_sched_policy::submit_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , submit_hook) - 48usize] ; ["Offset of field: starpu_sched_policy::pre_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pre_exec_hook) - 56usize] ; ["Offset of field: starpu_sched_policy::post_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , post_exec_hook) - 64usize] ; ["Offset of field: starpu_sched_policy::do_schedule"] [:: std :: mem :: offset_of ! (starpu_sched_policy , do_schedule) - 72usize] ; ["Offset of field: starpu_sched_policy::add_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , add_workers) - 80usize] ; ["Offset of field: starpu_sched_policy::remove_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , remove_workers) - 88usize] ; ["Offset of field: starpu_sched_policy::prefetches"] [:: std :: mem :: offset_of ! (starpu_sched_policy , prefetches) - 96usize] ; ["Offset of field: starpu_sched_policy::policy_name"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_name) - 104usize] ; ["Offset of field: starpu_sched_policy::policy_description"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_description) - 112usize] ; ["Offset of field: starpu_sched_policy::worker_type"] [:: std :: mem :: offset_of ! (starpu_sched_policy , worker_type) - 120usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Return an NULL-terminated array of all the predefined\nscheduling policies.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a scheduling policy to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policy (name : * const :: std :: os :: raw :: c_char) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a list of scheduling policies to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the default context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the given context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy () -> * mut starpu_sched_policy ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the job identifier associated with the task.\nSee \\ref TraceSchedTaskDetails for more details."] pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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 impl_mask == NULL to check for at\nleast one implementation without determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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\nimpl_mask == NULL to check for at least one implementation\nwithout determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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. \\p back is ignored: the task priority is\nused to order tasks in this queue.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions.\nSee \\ref PerformanceModelExample for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions).\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds on a given architecture \\p arch using given implementation \\p nimpl.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_length() but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_length (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the durations using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the durations.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } unsafe extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return expected energy use in J.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_energy but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_energy (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task energy use in J, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the energy uses using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the energy uses.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only).\nSee \\ref SchedulingHelpers for more details."] 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) > ; unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "The scheduling policy should call this when it makes a scheduling decision\nfor a task. This will possibly stop execution at this point, and then the\nprogrammer can inspect local variables etc. to determine why this scheduling\ndecision was done.\n\nSee \\ref STARPU_TASK_BREAK_ON_SCHED\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_task_break (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n- ::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
\n- ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n
\n- ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n
\n- ::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
\n
\nSee \\ref CreatingAContext for more details."] 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto.\nSee \\ref SubmittingTasksToAContext and \\ref TmpCTXS for more details."] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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.\nSee \\ref EmptyingAContext for more details."] pub fn starpu_sched_ctx_stop_task_submission () ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the function associated with the scheduler context \\p\nsched_ctx_id which was given through the field\nstarpu_conf::sched_policy_callback"] pub fn starpu_sched_ctx_get_sched_policy_callback (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; unsafe extern "C" { # [doc = "Initialize HIPBLAS on every HIPdevice. The\nHIPBLAS library must be initialized prior to any HIPBLAS call. Calling\nstarpu_hipblas_init() will initialize HIPBLAS on every HIP device\ncontrolled by StarPU. This call blocks until HIPBLAS has been properly\ninitialized on every device."] pub fn starpu_hipblas_init () ; } pub type hipblasHandle_t = * mut :: std :: os :: raw :: c_void ; unsafe extern "C" { # [doc = "Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It\nis properly initialized and configured for multistream by\nstarpu_hipblas_init()."] pub fn starpu_hipblas_get_local_handle () -> hipblasHandle_t ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the HIPBLAS library on\nevery HIP device."] pub fn starpu_hipblas_shutdown () ; } unsafe 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. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_init () ; } unsafe 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().\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_set_stream () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device.\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_shutdown () ; } unsafe extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_init () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_shutdown () ; } unsafe extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Stop recording tasks\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_stop () ; } unsafe extern "C" { # [doc = "Emit the DAG that was recorded on \\p output.\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } unsafe 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. \\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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_lp (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_mps (output : * mut FILE) ; } unsafe 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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a pointer value seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_ptr (input : * mut :: std :: os :: raw :: c_void , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc current\nstate. The return value should be considered as the new current\nstate for future CRC computation. This is used for computing data\nsize footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] 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 , # [doc = " PAPI Events"] pub papi_values : [:: std :: os :: raw :: c_longlong ; 15usize] , pub papi_event_set : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_task_info"] [:: std :: mem :: size_of :: < starpu_profiling_task_info > () - 368usize] ; ["Alignment of starpu_profiling_task_info"] [:: std :: mem :: align_of :: < starpu_profiling_task_info > () - 8usize] ; ["Offset of field: starpu_profiling_task_info::submit_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , submit_time) - 0usize] ; ["Offset of field: starpu_profiling_task_info::push_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_start_time) - 16usize] ; ["Offset of field: starpu_profiling_task_info::push_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_end_time) - 32usize] ; ["Offset of field: starpu_profiling_task_info::pop_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_start_time) - 48usize] ; ["Offset of field: starpu_profiling_task_info::pop_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_end_time) - 64usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_start_time) - 80usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_end_time) - 96usize] ; ["Offset of field: starpu_profiling_task_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , start_time) - 112usize] ; ["Offset of field: starpu_profiling_task_info::end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , end_time) - 128usize] ; ["Offset of field: starpu_profiling_task_info::release_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_start_time) - 144usize] ; ["Offset of field: starpu_profiling_task_info::release_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_end_time) - 160usize] ; ["Offset of field: starpu_profiling_task_info::callback_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_start_time) - 176usize] ; ["Offset of field: starpu_profiling_task_info::callback_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_end_time) - 192usize] ; ["Offset of field: starpu_profiling_task_info::workerid"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , workerid) - 208usize] ; ["Offset of field: starpu_profiling_task_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , used_cycles) - 216usize] ; ["Offset of field: starpu_profiling_task_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , stall_cycles) - 224usize] ; ["Offset of field: starpu_profiling_task_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , energy_consumed) - 232usize] ; ["Offset of field: starpu_profiling_task_info::papi_values"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_values) - 240usize] ; ["Offset of field: starpu_profiling_task_info::papi_event_set"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_event_set) - 360usize] ; } ; 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: {:?}, papi_values: {:?}, papi_event_set: {:?} }}" , self . workerid , self . energy_consumed , self . papi_values , self . papi_event_set) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info().\n\nThe executing_time, callback_time, waiting_time, sleeping_time, and\nscheduling_time are exclusive to each other, i.e. they can be added up, their\nsum is smaller than total_time. The difference between total_time and the sum\nis the uncategorized runtime overhead."] # [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 by the worker to execute callbacks, while not executing a\n task, during the profiling measurement interval."] pub callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish,\n while not executing a task or a callback, during the profiling\n measurement interval."] pub waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available, and\n not executing a task or a callback or waiting for a data transfer to\n finish, during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks, while not executing a\n task or a callback or waiting for a data transfer to finish, and there\n are tasks to be scheduled, during the profiling measurement interval."] pub scheduling_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval.\n Normally always equal to executing_time."] pub all_executing_time : timespec , # [doc = " Time spent by the worker to execute callbacks during the profiling measurement interval.\n Normally always greater than callback_time."] pub all_callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval.\n Normally always greater than waiting_time."] pub all_waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available during the profiling measurement interval.\n Normally always greater than sleeping_time."] pub all_sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks during the profiling measurement interval.\n Normally always greater than scheduling_time."] pub all_scheduling_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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_worker_info"] [:: std :: mem :: size_of :: < starpu_profiling_worker_info > () - 232usize] ; ["Alignment of starpu_profiling_worker_info"] [:: std :: mem :: align_of :: < starpu_profiling_worker_info > () - 8usize] ; ["Offset of field: starpu_profiling_worker_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_worker_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_worker_info::executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executing_time) - 32usize] ; ["Offset of field: starpu_profiling_worker_info::callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , callback_time) - 48usize] ; ["Offset of field: starpu_profiling_worker_info::waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , waiting_time) - 64usize] ; ["Offset of field: starpu_profiling_worker_info::sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , sleeping_time) - 80usize] ; ["Offset of field: starpu_profiling_worker_info::scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , scheduling_time) - 96usize] ; ["Offset of field: starpu_profiling_worker_info::all_executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_executing_time) - 112usize] ; ["Offset of field: starpu_profiling_worker_info::all_callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_callback_time) - 128usize] ; ["Offset of field: starpu_profiling_worker_info::all_waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_waiting_time) - 144usize] ; ["Offset of field: starpu_profiling_worker_info::all_sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_sleeping_time) - 160usize] ; ["Offset of field: starpu_profiling_worker_info::all_scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_scheduling_time) - 176usize] ; ["Offset of field: starpu_profiling_worker_info::executed_tasks"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executed_tasks) - 192usize] ; ["Offset of field: starpu_profiling_worker_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , used_cycles) - 200usize] ; ["Offset of field: starpu_profiling_worker_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , stall_cycles) - 208usize] ; ["Offset of field: starpu_profiling_worker_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , energy_consumed) - 216usize] ; ["Offset of field: starpu_profiling_worker_info::flops"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , flops) - 224usize] ; } ; 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) } } # [doc = "todo"] # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_bus_info"] [:: std :: mem :: size_of :: < starpu_profiling_bus_info > () - 48usize] ; ["Alignment of starpu_profiling_bus_info"] [:: std :: mem :: align_of :: < starpu_profiling_bus_info > () - 8usize] ; ["Offset of field: starpu_profiling_bus_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_bus_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_bus_info::transferred_bytes"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transferred_bytes) - 32usize] ; ["Offset of field: starpu_profiling_bus_info::transfer_count"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transfer_count) - 40usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_init () ; } unsafe extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init().\nSee \\ref TraceMpi for more details."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } unsafe 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 NULL, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned.\nSee \\ref Per-workerFeedback for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of buses in the machine.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the source point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the destination point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref FeedBackFigures for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } unsafe extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_bus_helper_display_summary () ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_worker_helper_display_summary () ; } unsafe 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).\nSee \\ref MemoryFeedback for more details."] pub fn starpu_data_display_memory_stats () ; } pub const starpu_prof_tool_event_none : starpu_prof_tool_event = 0 ; pub const starpu_prof_tool_event_init : starpu_prof_tool_event = 1 ; pub const starpu_prof_tool_event_terminate : starpu_prof_tool_event = 2 ; pub const starpu_prof_tool_event_init_begin : starpu_prof_tool_event = 3 ; pub const starpu_prof_tool_event_init_end : starpu_prof_tool_event = 4 ; pub const starpu_prof_tool_event_driver_init : starpu_prof_tool_event = 5 ; pub const starpu_prof_tool_event_driver_deinit : starpu_prof_tool_event = 6 ; pub const starpu_prof_tool_event_driver_init_start : starpu_prof_tool_event = 7 ; pub const starpu_prof_tool_event_driver_init_end : starpu_prof_tool_event = 8 ; pub const starpu_prof_tool_event_start_cpu_exec : starpu_prof_tool_event = 9 ; pub const starpu_prof_tool_event_end_cpu_exec : starpu_prof_tool_event = 10 ; pub const starpu_prof_tool_event_start_gpu_exec : starpu_prof_tool_event = 11 ; pub const starpu_prof_tool_event_end_gpu_exec : starpu_prof_tool_event = 12 ; pub const starpu_prof_tool_event_start_transfer : starpu_prof_tool_event = 13 ; pub const starpu_prof_tool_event_end_transfer : starpu_prof_tool_event = 14 ; pub const starpu_prof_tool_event_user_start : starpu_prof_tool_event = 15 ; pub const starpu_prof_tool_event_user_end : starpu_prof_tool_event = 16 ; # [doc = "Event type"] pub type starpu_prof_tool_event = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_driver_cpu : starpu_prof_tool_driver_type = 0 ; pub const starpu_prof_tool_driver_gpu : starpu_prof_tool_driver_type = 1 ; pub const starpu_prof_tool_driver_hip : starpu_prof_tool_driver_type = 2 ; pub const starpu_prof_tool_driver_ocl : starpu_prof_tool_driver_type = 3 ; # [doc = "todo"] pub type starpu_prof_tool_driver_type = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_command_reg : starpu_prof_tool_command = 0 ; pub const starpu_prof_tool_command_toggle : starpu_prof_tool_command = 1 ; pub const starpu_prof_tool_command_toggle_per_thread : starpu_prof_tool_command = 2 ; # [doc = "todo"] pub type starpu_prof_tool_command = :: std :: os :: raw :: c_uint ; # [doc = "General information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_prof_tool_info { pub conf : * mut starpu_conf , pub event_type : starpu_prof_tool_event , pub starpu_version : [:: std :: os :: raw :: c_uint ; 3usize] , pub thread_id : :: std :: os :: raw :: c_int , pub worker_id : :: std :: os :: raw :: c_int , pub device_number : :: std :: os :: raw :: c_int , pub driver_type : starpu_prof_tool_driver_type , pub memnode : :: std :: os :: raw :: c_uint , pub bytes_to_transfer : :: std :: os :: raw :: c_uint , pub bytes_transfered : :: std :: os :: raw :: c_uint , pub fun_ptr : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_info > () - 64usize] ; ["Alignment of starpu_prof_tool_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_info > () - 8usize] ; ["Offset of field: starpu_prof_tool_info::conf"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , conf) - 0usize] ; ["Offset of field: starpu_prof_tool_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , event_type) - 8usize] ; ["Offset of field: starpu_prof_tool_info::starpu_version"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , starpu_version) - 12usize] ; ["Offset of field: starpu_prof_tool_info::thread_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , thread_id) - 24usize] ; ["Offset of field: starpu_prof_tool_info::worker_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , worker_id) - 28usize] ; ["Offset of field: starpu_prof_tool_info::device_number"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , device_number) - 32usize] ; ["Offset of field: starpu_prof_tool_info::driver_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , driver_type) - 36usize] ; ["Offset of field: starpu_prof_tool_info::memnode"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , memnode) - 40usize] ; ["Offset of field: starpu_prof_tool_info::bytes_to_transfer"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_to_transfer) - 44usize] ; ["Offset of field: starpu_prof_tool_info::bytes_transfered"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_transfered) - 48usize] ; ["Offset of field: starpu_prof_tool_info::fun_ptr"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , fun_ptr) - 56usize] ; } ; impl Default for starpu_prof_tool_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 () } } } # [doc = "Event info"] # [repr (C)] # [derive (Copy , Clone)] pub union starpu_prof_tool_event_info { pub event_type : starpu_prof_tool_event , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_event_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Alignment of starpu_prof_tool_event_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Offset of field: starpu_prof_tool_event_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_event_info , event_type) - 0usize] ; } ; impl Default for starpu_prof_tool_event_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_prof_tool_event_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_prof_tool_event_info {{ union }}") } } # [doc = "API info"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_prof_tool_api_info { } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_api_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_api_info > () - 0usize] ; ["Alignment of starpu_prof_tool_api_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_api_info > () - 1usize] ; } ; pub type starpu_prof_tool_cb_func = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_prof_tool_info , arg2 : * mut starpu_prof_tool_event_info , arg3 : * mut starpu_prof_tool_api_info) > ; # [doc = "Register / unregister events"] pub type starpu_prof_tool_entry_register_func = :: std :: option :: Option < unsafe extern "C" fn (event_type : starpu_prof_tool_event , cb : starpu_prof_tool_cb_func , info : starpu_prof_tool_command) > ; # [doc = "A function with this signature must be implemented by external tools that want to use the callbacks"] pub type starpu_prof_tool_entry_func = :: std :: option :: Option < unsafe extern "C" fn (reg : starpu_prof_tool_entry_register_func , unreg : starpu_prof_tool_entry_register_func) > ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 2048usize] , 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_codelet_event"] [:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () - 2328usize] ; ["Alignment of starpu_fxt_codelet_event"] [:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () - 8usize] ; ["Offset of field: starpu_fxt_codelet_event::symbol"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , symbol) - 0usize] ; ["Offset of field: starpu_fxt_codelet_event::workerid"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , workerid) - 2048usize] ; ["Offset of field: starpu_fxt_codelet_event::perfmodel_archname"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , perfmodel_archname) - 2052usize] ; ["Offset of field: starpu_fxt_codelet_event::hash"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , hash) - 2308usize] ; ["Offset of field: starpu_fxt_codelet_event::size"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , size) - 2312usize] ; ["Offset of field: starpu_fxt_codelet_event::time"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , time) - 2320usize] ; } ; 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 () } } } # [doc = "Store information related to clock synchronizations: mainly the offset to apply to each time."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_fxt_mpi_offset { # [doc = "< node time for the barrier at the beginning of the program"] pub local_time_start : u64 , # [doc = "< offset to apply to node time, computed at the beginning of the program"] pub offset_start : i64 , # [doc = "< node time for the barrier at the end of the program (optional)"] pub local_time_end : u64 , # [doc = "< offset to apply to node time, computed at the end of the program (optional)"] pub offset_end : i64 , # [doc = "< number of barriers to synchronize clocks during the execution of the program\n(can be 0, 1 or 2)"] pub nb_barriers : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_mpi_offset"] [:: std :: mem :: size_of :: < starpu_fxt_mpi_offset > () - 40usize] ; ["Alignment of starpu_fxt_mpi_offset"] [:: std :: mem :: align_of :: < starpu_fxt_mpi_offset > () - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_start) - 0usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_start) - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_end) - 16usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_end) - 24usize] ; ["Offset of field: starpu_fxt_mpi_offset::nb_barriers"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , nb_barriers) - 32usize] ; } ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 sched_tasks_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 papi_path : * mut :: std :: os :: raw :: c_char , pub comms_path : * mut :: std :: os :: raw :: c_char , pub number_events_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 , pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 48usize] , pub nworkers : :: std :: os :: raw :: c_int , pub worker_archtypes : [starpu_perfmodel_arch ; 48usize] , # [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 synchronize clocks and apply an offset."] pub file_offset : starpu_fxt_mpi_offset , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), this variable stores the MPI rank of the trace file."] pub file_rank : :: 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, number\nof dumped codelets."] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_options"] [:: std :: mem :: size_of :: < starpu_fxt_options > () - 13800usize] ; ["Alignment of starpu_fxt_options"] [:: std :: mem :: align_of :: < starpu_fxt_options > () - 8usize] ; ["Offset of field: starpu_fxt_options::per_task_colour"] [:: std :: mem :: offset_of ! (starpu_fxt_options , per_task_colour) - 0usize] ; ["Offset of field: starpu_fxt_options::no_events"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_events) - 4usize] ; ["Offset of field: starpu_fxt_options::no_counter"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_counter) - 8usize] ; ["Offset of field: starpu_fxt_options::no_bus"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_bus) - 12usize] ; ["Offset of field: starpu_fxt_options::no_flops"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_flops) - 16usize] ; ["Offset of field: starpu_fxt_options::ninputfiles"] [:: std :: mem :: offset_of ! (starpu_fxt_options , ninputfiles) - 20usize] ; ["Offset of field: starpu_fxt_options::no_smooth"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_smooth) - 24usize] ; ["Offset of field: starpu_fxt_options::no_acquire"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_acquire) - 28usize] ; ["Offset of field: starpu_fxt_options::memory_states"] [:: std :: mem :: offset_of ! (starpu_fxt_options , memory_states) - 32usize] ; ["Offset of field: starpu_fxt_options::internal"] [:: std :: mem :: offset_of ! (starpu_fxt_options , internal) - 36usize] ; ["Offset of field: starpu_fxt_options::label_deps"] [:: std :: mem :: offset_of ! (starpu_fxt_options , label_deps) - 40usize] ; ["Offset of field: starpu_fxt_options::filenames"] [:: std :: mem :: offset_of ! (starpu_fxt_options , filenames) - 48usize] ; ["Offset of field: starpu_fxt_options::out_paje_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , out_paje_path) - 560usize] ; ["Offset of field: starpu_fxt_options::distrib_time_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , distrib_time_path) - 568usize] ; ["Offset of field: starpu_fxt_options::activity_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , activity_path) - 576usize] ; ["Offset of field: starpu_fxt_options::sched_tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , sched_tasks_path) - 584usize] ; ["Offset of field: starpu_fxt_options::dag_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dag_path) - 592usize] ; ["Offset of field: starpu_fxt_options::tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , tasks_path) - 600usize] ; ["Offset of field: starpu_fxt_options::data_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , data_path) - 608usize] ; ["Offset of field: starpu_fxt_options::papi_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , papi_path) - 616usize] ; ["Offset of field: starpu_fxt_options::comms_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , comms_path) - 624usize] ; ["Offset of field: starpu_fxt_options::number_events_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , number_events_path) - 632usize] ; ["Offset of field: starpu_fxt_options::anim_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , anim_path) - 640usize] ; ["Offset of field: starpu_fxt_options::states_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , states_path) - 648usize] ; ["Offset of field: starpu_fxt_options::dir"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dir) - 656usize] ; ["Offset of field: starpu_fxt_options::worker_names"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_names) - 664usize] ; ["Offset of field: starpu_fxt_options::nworkers"] [:: std :: mem :: offset_of ! (starpu_fxt_options , nworkers) - 12952usize] ; ["Offset of field: starpu_fxt_options::worker_archtypes"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_archtypes) - 12960usize] ; ["Offset of field: starpu_fxt_options::file_prefix"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_prefix) - 13728usize] ; ["Offset of field: starpu_fxt_options::file_offset"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_offset) - 13736usize] ; ["Offset of field: starpu_fxt_options::file_rank"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_rank) - 13776usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets) - 13784usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets_count"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets_count) - 13792usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } unsafe 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.\nThis function has to be called before starpu_init().\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_start_profiling () ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_stop_profiling () ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace_in_dir (filename_in : * mut :: std :: os :: raw :: c_char , dir : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } unsafe extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Pre-initialize drivers\nSo as to register information on device types, memory types, etc.\nOnly use internally by StarPU."] pub fn starpu_drivers_preinit () ; } # [doc = "structure for designating a given driver. See \\ref UsingTheDriverAPI for more details."] # [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 hip_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver__bindgen_ty_1"] [:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Alignment of starpu_driver__bindgen_ty_1"] [:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cpu_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cpu_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cuda_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cuda_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::hip_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , hip_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::opencl_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , opencl_id) - 0usize] ; } ; 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 }}") } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver"] [:: std :: mem :: size_of :: < starpu_driver > () - 16usize] ; ["Alignment of starpu_driver"] [:: std :: mem :: align_of :: < starpu_driver > () - 8usize] ; ["Offset of field: starpu_driver::type_"] [:: std :: mem :: offset_of ! (starpu_driver , type_) - 0usize] ; ["Offset of field: starpu_driver::id"] [:: std :: mem :: offset_of ! (starpu_driver , id) - 8usize] ; } ; 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) } } unsafe 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-EINVAL 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().\n\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Notify all running drivers that they should terminate.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_drivers_request_termination () ; } unsafe extern "C" { # [doc = "Initialize the given driver. Return 0 on success, -EINVAL\nif starpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Run the driver once, then return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tree"] [:: std :: mem :: size_of :: < starpu_tree > () - 32usize] ; ["Alignment of starpu_tree"] [:: std :: mem :: align_of :: < starpu_tree > () - 8usize] ; ["Offset of field: starpu_tree::nodes"] [:: std :: mem :: offset_of ! (starpu_tree , nodes) - 0usize] ; ["Offset of field: starpu_tree::father"] [:: std :: mem :: offset_of ! (starpu_tree , father) - 8usize] ; ["Offset of field: starpu_tree::arity"] [:: std :: mem :: offset_of ! (starpu_tree , arity) - 16usize] ; ["Offset of field: starpu_tree::id"] [:: std :: mem :: offset_of ! (starpu_tree , id) - 20usize] ; ["Offset of field: starpu_tree::level"] [:: std :: mem :: offset_of ! (starpu_tree , level) - 24usize] ; ["Offset of field: starpu_tree::is_pu"] [:: std :: mem :: offset_of ! (starpu_tree , is_pu) - 28usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } unsafe 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 ; } unsafe 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)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_lock_t > () - 8usize] ; ["Alignment of starpu_omp_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_lock_t , internal) - 0usize] ; } ; 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)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_nest_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Alignment of starpu_omp_nest_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_nest_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_nest_lock_t , internal) - 0usize] ; } ; 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 chosen 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)] 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 pragma omp parallel 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_parallel_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () - 872usize] ; ["Alignment of starpu_omp_parallel_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_parallel_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_parallel_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , if_clause) - 860usize] ; ["Offset of field: starpu_omp_parallel_region_attr::num_threads"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , num_threads) - 864usize] ; } ; 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)] 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 pragma omp task is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding pragma omp task is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding pragma omp task is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding pragma omp task 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_task_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () - 936usize] ; ["Alignment of starpu_omp_task_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_task_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_task_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_task_region_attr::priority"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , priority) - 860usize] ; ["Offset of field: starpu_omp_task_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , if_clause) - 864usize] ; ["Offset of field: starpu_omp_task_region_attr::final_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , final_clause) - 868usize] ; ["Offset of field: starpu_omp_task_region_attr::untied_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , untied_clause) - 872usize] ; ["Offset of field: starpu_omp_task_region_attr::mergeable_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , mergeable_clause) - 876usize] ; ["Offset of field: starpu_omp_task_region_attr::is_loop"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , is_loop) - 880usize] ; ["Offset of field: starpu_omp_task_region_attr::nogroup_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nogroup_clause) - 884usize] ; ["Offset of field: starpu_omp_task_region_attr::collapse"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , collapse) - 888usize] ; ["Offset of field: starpu_omp_task_region_attr::num_tasks"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , num_tasks) - 892usize] ; ["Offset of field: starpu_omp_task_region_attr::nb_iterations"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nb_iterations) - 896usize] ; ["Offset of field: starpu_omp_task_region_attr::grainsize"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , grainsize) - 904usize] ; ["Offset of field: starpu_omp_task_region_attr::begin_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , begin_i) - 912usize] ; ["Offset of field: starpu_omp_task_region_attr::end_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , end_i) - 920usize] ; ["Offset of field: starpu_omp_task_region_attr::chunk"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , chunk) - 928usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_shutdown () ; } unsafe 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 \\#pragma omp parallel.\nSee \\ref OMPParallel for more details."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } unsafe 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 \\#pragma omp master.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp master without code\noutlining.\n\\return !0 if called by the region's master thread.\n\\return 0 if not called by the region's master thread.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp barrier.\nSee \\ref OMPBarrier for more details."] pub fn starpu_omp_barrier () ; } unsafe 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 name == NULL, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement \\#pragma omp\ncritical.\n\nSee \\ref OMPCritical for more details."] 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) ; } unsafe 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 name == NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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\nname==NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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(nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp single.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single without code\noutlining.\n\\return !0 if the calling thread has won the election.\n\\return 0 if the calling thread has lost the election.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp single 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\n\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and NULL for\nthe task that won the election. This function can be used to implement\n\\#pragma omp single with a copyprivate clause without code outlining.\n\nReturn the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\nReturn NULL 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\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_end () ; } unsafe 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 \\#pragma omp for 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(ordered==!0) or not (ordered==0). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(nowait==0) or not (nowait==!0).\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 \\#pragma omp for.\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for.\n\n\\sa starpu_omp_for\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp ordered.\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_begin () ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_end () ; } unsafe 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 (nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp sections and \\#pragma omp section.\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp sections and \\#pragma omp section.\n\n\\sa starpu_omp_sections\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp task.\n\nSee \\ref OMPTaskExplicit for more details."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } unsafe 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 \\#pragma omp taskwait.\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskwait () ; } unsafe 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 \\#pragma omp taskgroup.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] 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) ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_begin () ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_end () ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return !0 if called from a parallel region scope.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return !0 if dynamic thread number adjustment is enabled.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_dynamic\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return !0 if nested parallel sections are enabled.\n\\return 0 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the state of the cancel ICVS var.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } unsafe 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 information such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } unsafe 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 1 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return !0 if called from a final task.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } unsafe extern "C" { # [doc = "Return the number of places available to the execution environment in the place list.\n\n\\return the number of places available to the execution environment in the place list.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of processors available to the execution environment in the specified place.\n\n\\return the number of processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the numerical identifiers of the processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the place number of the place to which the encountering thread is bound.\n\n\\return the place number of the place to which the encountering thread is bound.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of places in the place partition of the innermost implicit task.\n\n\\return the number of places in the place partition of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current device is the initial device or not.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a device number that represents the host device.\n\n\\return a device number that represents the host device.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return !0 if called from the host device.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } unsafe extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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 !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 () ; } unsafe 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 () ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtime () -> f64 ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtick () -> f64 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Only use internally by StarPU."] pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } unsafe extern "C" { # [doc = "Register a handle for ptr->handle data lookup.\n\n\\sa starpu_omp_handle_unregister\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_register (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Unregister a handle from ptr->handle data lookup.\n\n\\sa starpu_omp_handle_register\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_unregister (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer.\n\n\\return the handle or \\c NULL if not found.\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_bitmap { pub bits : [:: std :: os :: raw :: c_ulong ; 1usize] , pub cardinal : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bitmap"] [:: std :: mem :: size_of :: < starpu_bitmap > () - 16usize] ; ["Alignment of starpu_bitmap"] [:: std :: mem :: align_of :: < starpu_bitmap > () - 8usize] ; ["Offset of field: starpu_bitmap::bits"] [:: std :: mem :: offset_of ! (starpu_bitmap , bits) - 0usize] ; ["Offset of field: starpu_bitmap::cardinal"] [:: std :: mem :: offset_of ! (starpu_bitmap , cardinal) - 8usize] ; } ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_OPENMP : starpu_parallel_worker_types = 0 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_INTEL_OPENMP_MKL : starpu_parallel_worker_types = 1 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_GNU_OPENMP_MKL : starpu_parallel_worker_types = 2 ; # [doc = "These represent the default available functions to enforce parallel_worker\nuse by the sub-runtime"] pub type starpu_parallel_worker_types = :: std :: os :: raw :: c_uint ; # [doc = "Parallel_Worker configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_parallel_worker_config { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Create parallel_workers on the machine with the given parameters.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_init (parallel_worker_level : hwloc_obj_type_t , ...) -> * mut starpu_parallel_worker_config ; } unsafe extern "C" { # [doc = "Delete the given parallel_workers configuration"] pub fn starpu_parallel_worker_shutdown (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print the given parallel_workers configuration.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_print (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " Prologue functions"] pub fn starpu_parallel_worker_openmp_prologue (arg1 : * mut :: std :: os :: raw :: c_void) ; } # [doc = "< deprecated"] pub const STARPU_CLUSTER_OPENMP : starpu_cluster_types = 0 ; # [doc = "< deprecated"] pub const STARPU_CLUSTER_INTEL_OPENMP_MKL : starpu_cluster_types = 1 ; # [doc = "@deprecated Use ::starpu_parallel_worker_types"] pub type starpu_cluster_types = :: std :: os :: raw :: c_uint ; # [doc = " @deprecated Use starpu_parallel_worker_config"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_cluster_machine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_init()"] pub fn starpu_cluster_machine (cluster_level : hwloc_obj_type_t , ...) -> * mut starpu_cluster_machine ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_shutdown()"] pub fn starpu_uncluster_machine (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_print()"] pub fn starpu_cluster_print (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } # [doc = "< undefined scope"] pub const starpu_perf_counter_scope_undefined : starpu_perf_counter_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_counter_scope_global : starpu_perf_counter_scope = 2 ; # [doc = "< per-worker scope"] pub const starpu_perf_counter_scope_per_worker : starpu_perf_counter_scope = 4 ; # [doc = "< per-codelet scope"] pub const starpu_perf_counter_scope_per_codelet : starpu_perf_counter_scope = 6 ; # [doc = "Enum of all possible performance counter scopes."] pub type starpu_perf_counter_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_counter_type_undefined : starpu_perf_counter_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_counter_type_int32 : starpu_perf_counter_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_counter_type_int64 : starpu_perf_counter_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_counter_type_float : starpu_perf_counter_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_counter_type_double : starpu_perf_counter_type = 4 ; # [doc = "Enum of all possible performance counter value type."] pub type starpu_perf_counter_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_listener { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_sample { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_set { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Start collecting performance counter values."] pub fn starpu_perf_counter_collection_start () ; } unsafe extern "C" { # [doc = "Stop collecting performance counter values."] pub fn starpu_perf_counter_collection_stop () ; } unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_counter_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_counter_scope_id_to_name (scope : starpu_perf_counter_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_counter_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_counter_type_id_to_name (type_ : starpu_perf_counter_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance counters for the given scope."] pub fn starpu_perf_counter_nb (scope : starpu_perf_counter_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter name to its id."] pub fn starpu_perf_counter_name_to_id (scope : starpu_perf_counter_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter rank in its scope to its counter id."] pub fn starpu_perf_counter_nth_to_id (scope : starpu_perf_counter_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a counter id to its name constant string."] pub fn starpu_perf_counter_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the counter's type id."] pub fn starpu_perf_counter_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the counter's help string."] pub fn starpu_perf_counter_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of counters defined in the given scope."] pub fn starpu_perf_counter_list_avail (scope : starpu_perf_counter_scope) ; } unsafe extern "C" { # [doc = "Display the list of counters defined in all scopes."] pub fn starpu_perf_counter_list_all_avail () ; } unsafe extern "C" { # [doc = "Allocate a new performance counter set."] pub fn starpu_perf_counter_set_alloc (scope : starpu_perf_counter_scope) -> * mut starpu_perf_counter_set ; } unsafe extern "C" { # [doc = "Free a performance counter set."] pub fn starpu_perf_counter_set_free (set : * mut starpu_perf_counter_set) ; } unsafe extern "C" { # [doc = "Enable a given counter in the set."] pub fn starpu_perf_counter_set_enable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Disable a given counter in the set."] pub fn starpu_perf_counter_set_disable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Initialize a new performance counter listener."] pub fn starpu_perf_counter_listener_init (set : * mut starpu_perf_counter_set , callback : :: std :: option :: Option < unsafe extern "C" fn (listener : * mut starpu_perf_counter_listener , sample : * mut starpu_perf_counter_sample , context : * mut :: std :: os :: raw :: c_void) > , user_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_perf_counter_listener ; } unsafe extern "C" { # [doc = "End a performance counter listener."] pub fn starpu_perf_counter_listener_exit (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the global scope."] pub fn starpu_perf_counter_set_global_listener (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the per_worker scope on a given worker."] pub fn starpu_perf_counter_set_per_worker_listener (workerid : :: std :: os :: raw :: c_uint , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a common listener for all workers."] pub fn starpu_perf_counter_set_all_per_worker_listeners (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a per_codelet listener for a codelet."] pub fn starpu_perf_counter_set_per_codelet_listener (cl : * mut starpu_codelet , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Unset the global listener."] pub fn starpu_perf_counter_unset_global_listener () ; } unsafe extern "C" { # [doc = "Unset the per_worker listener."] pub fn starpu_perf_counter_unset_per_worker_listener (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Unset all per_worker listeners."] pub fn starpu_perf_counter_unset_all_per_worker_listeners () ; } unsafe extern "C" { # [doc = "Unset a per_codelet listener."] pub fn starpu_perf_counter_unset_per_codelet_listener (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Read an int32 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int32_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Read an int64 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int64_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Read a float counter value from a sample."] pub fn starpu_perf_counter_sample_get_float_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Read a double counter value from a sample."] pub fn starpu_perf_counter_sample_get_double_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f64 ; } # [doc = "< undefined scope"] pub const starpu_perf_knob_scope_undefined : starpu_perf_knob_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_knob_scope_global : starpu_perf_knob_scope = 1 ; # [doc = "< per-worker scope"] pub const starpu_perf_knob_scope_per_worker : starpu_perf_knob_scope = 3 ; # [doc = "< per-scheduler scope"] pub const starpu_perf_knob_scope_per_scheduler : starpu_perf_knob_scope = 5 ; # [doc = "Enum of all possible performance knob scopes."] pub type starpu_perf_knob_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_knob_type_undefined : starpu_perf_knob_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_knob_type_int32 : starpu_perf_knob_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_knob_type_int64 : starpu_perf_knob_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_knob_type_float : starpu_perf_knob_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_knob_type_double : starpu_perf_knob_type = 4 ; # [doc = "Enum of all possible performance knob value type."] pub type starpu_perf_knob_type = :: std :: os :: raw :: c_uint ; unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_knob_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_knob_scope_id_to_name (scope : starpu_perf_knob_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_knob_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_knob_type_id_to_name (type_ : starpu_perf_knob_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance steering knobs for the given scope."] pub fn starpu_perf_knob_nb (scope : starpu_perf_knob_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_name_to_id (scope : starpu_perf_knob_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_nth_to_id (scope : starpu_perf_knob_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob rank in its scope to its knob id."] pub fn starpu_perf_knob_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate a knob id to its name constant string."] pub fn starpu_perf_knob_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the knob's help string."] pub fn starpu_perf_knob_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in the given scope."] pub fn starpu_perf_knob_list_avail (scope : starpu_perf_knob_scope) ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in all scopes."] pub fn starpu_perf_knob_list_all_avail () ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int32_value (knob_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int64_value (knob_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_float_value (knob_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_double_value (knob_id : :: std :: os :: raw :: c_int) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int32_value (knob_id : :: std :: os :: raw :: c_int , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int64_value (knob_id : :: std :: os :: raw :: c_int , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float knob value for Global scope."] pub fn starpu_perf_knob_set_global_float_value (knob_id : :: std :: os :: raw :: c_int , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double knob value for Global scope."] pub fn starpu_perf_knob_set_global_double_value (knob_id : :: std :: os :: raw :: c_int , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f64) ; } # [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 unless\nstarpu_conf::precedence_over_environment_variables is set."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 =\nNULL)."] 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 = NULL)"] pub sched_policy : * mut starpu_sched_policy , # [doc = "Callback function that can later be used by the scheduler.\nThe scheduler can retrieve this function by calling\nstarpu_sched_ctx_get_sched_policy_callback()"] pub sched_policy_callback : :: 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 = \\c -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 = \\c -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of HIP devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NHIP.\n(default = \\c -1)"] pub nhip : :: 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 = \\c -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of Maxeler FPGA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NMAX_FPGA.\n(default = -1)"] pub nmax_fpga : :: 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 = \\c -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "Number of TCP/IP Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NTCPIP_MS.\n(default = \\c -1)"] pub ntcpip_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 = \\c 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 \\c hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the HIP workers will be attached to\nthe HIP devices specified in the\nstarpu_conf::workers_hip_gpuid array. Otherwise, StarPU\naffects the HIP devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_HIPID.\n(default = \\c 0)"] pub use_explicit_workers_hip_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_hip_gpuid flag is\nset, this array contains the logical identifiers of the\nHIP devices (as used by \\c hipGetDevice())."] pub workers_hip_gpuid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the Maxeler FPGA workers will be attached to\nthe Maxeler FPGA devices specified in the\nstarpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU\naffects the Maxeler FPGA devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_MAX_FPGAID.\n(default = 0)"] pub use_explicit_workers_max_fpga_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag\nis set, this array contains the logical identifiers of the\nMaxeler FPGA devices to be used."] pub workers_max_fpga_deviceid : [:: std :: os :: raw :: c_uint ; 48usize] , pub max_fpga_load : * mut :: std :: os :: raw :: c_void , # [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 = \\c 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 ; 48usize] , # [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 = \\c 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 = \\c 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to enforce data locality when\nchoosing a worker to execute a task.\nThis can also be specified with the environment variable\n\\ref STARPU_DATA_LOCALITY_ENFORCE.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\nenable-data-locality-enforce \"--enable-data-locality-enforce\".\n(default = \\c 0)"] pub data_locality_enforce : :: 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 = \\c 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [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 = \\c 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 = \\c 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 HIP accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-hip-copy\n\"--disable-asynchronous-hip-copy\".\n(default = \\c 0)"] pub disable_asynchronous_hip_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 = \\c 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 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 = \\c 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and TCP/IP Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-tcpip-master-slave-copy\n\"--disable-asynchronous-tcpip-master-slave-copy\".\n(default = \\c 0)."] pub disable_asynchronous_tcpip_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and Maxeler FPGA devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-fpga-copy\n\"--disable-asynchronous-fpga-copy\".\n(default = 0)."] pub disable_asynchronous_max_fpga_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable memory mapping\nsupport between memory nodes. This can also be specified\nwith the environment variable \\ref STARPU_ENABLE_MAP."] pub enable_map : :: 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 = NULL)"] 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 = NULL)"] 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 = \\c 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 , # [doc = "Set the minimum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MIN_PRIO"] pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , # [doc = "Set the maximum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MAX_PRIO"] pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch \\c SIGINT, \\c SIGSEGV and \\c 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 caught. 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 = "Specify whether StarPU should automatically start to collect\nperformance counters after initialization"] pub start_perf_counter_collection : :: std :: os :: raw :: c_uint , # [doc = "Minimum spinning backoff of drivers (default = \\c 1)"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. (default = \\c 32)"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , # [doc = "Specify if CUDA workers should do only fast allocations\nwhen running the datawizard progress of\nother memory nodes. This will pass the interval value\n_STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.\nDefault value is 0, allowing CUDA workers to do slow\nallocations.\nThis can also be specified with the environment variable\n\\ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES."] pub cuda_only_fast_alloc_other_memnodes : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_conf"] [:: std :: mem :: size_of :: < starpu_conf > () - 1376usize] ; ["Alignment of starpu_conf"] [:: std :: mem :: align_of :: < starpu_conf > () - 8usize] ; ["Offset of field: starpu_conf::magic"] [:: std :: mem :: offset_of ! (starpu_conf , magic) - 0usize] ; ["Offset of field: starpu_conf::will_use_mpi"] [:: std :: mem :: offset_of ! (starpu_conf , will_use_mpi) - 4usize] ; ["Offset of field: starpu_conf::sched_policy_name"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_name) - 8usize] ; ["Offset of field: starpu_conf::sched_policy"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy) - 16usize] ; ["Offset of field: starpu_conf::sched_policy_callback"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_callback) - 24usize] ; ["Offset of field: starpu_conf::precedence_over_environment_variables"] [:: std :: mem :: offset_of ! (starpu_conf , precedence_over_environment_variables) - 32usize] ; ["Offset of field: starpu_conf::ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , ncpus) - 36usize] ; ["Offset of field: starpu_conf::reserve_ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , reserve_ncpus) - 40usize] ; ["Offset of field: starpu_conf::ncuda"] [:: std :: mem :: offset_of ! (starpu_conf , ncuda) - 44usize] ; ["Offset of field: starpu_conf::nhip"] [:: std :: mem :: offset_of ! (starpu_conf , nhip) - 48usize] ; ["Offset of field: starpu_conf::nopencl"] [:: std :: mem :: offset_of ! (starpu_conf , nopencl) - 52usize] ; ["Offset of field: starpu_conf::nmax_fpga"] [:: std :: mem :: offset_of ! (starpu_conf , nmax_fpga) - 56usize] ; ["Offset of field: starpu_conf::nmpi_ms"] [:: std :: mem :: offset_of ! (starpu_conf , nmpi_ms) - 60usize] ; ["Offset of field: starpu_conf::ntcpip_ms"] [:: std :: mem :: offset_of ! (starpu_conf , ntcpip_ms) - 64usize] ; ["Offset of field: starpu_conf::use_explicit_workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_bindid) - 68usize] ; ["Offset of field: starpu_conf::workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_bindid) - 72usize] ; ["Offset of field: starpu_conf::use_explicit_workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_cuda_gpuid) - 264usize] ; ["Offset of field: starpu_conf::workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_cuda_gpuid) - 268usize] ; ["Offset of field: starpu_conf::use_explicit_workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_hip_gpuid) - 460usize] ; ["Offset of field: starpu_conf::workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_hip_gpuid) - 464usize] ; ["Offset of field: starpu_conf::use_explicit_workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_opencl_gpuid) - 656usize] ; ["Offset of field: starpu_conf::workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_opencl_gpuid) - 660usize] ; ["Offset of field: starpu_conf::use_explicit_workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_max_fpga_deviceid) - 852usize] ; ["Offset of field: starpu_conf::workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_max_fpga_deviceid) - 856usize] ; ["Offset of field: starpu_conf::max_fpga_load"] [:: std :: mem :: offset_of ! (starpu_conf , max_fpga_load) - 1048usize] ; ["Offset of field: starpu_conf::use_explicit_workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_mpi_ms_deviceid) - 1056usize] ; ["Offset of field: starpu_conf::workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_mpi_ms_deviceid) - 1060usize] ; ["Offset of field: starpu_conf::bus_calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , bus_calibrate) - 1252usize] ; ["Offset of field: starpu_conf::calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , calibrate) - 1256usize] ; ["Offset of field: starpu_conf::data_locality_enforce"] [:: std :: mem :: offset_of ! (starpu_conf , data_locality_enforce) - 1260usize] ; ["Offset of field: starpu_conf::single_combined_worker"] [:: std :: mem :: offset_of ! (starpu_conf , single_combined_worker) - 1264usize] ; ["Offset of field: starpu_conf::disable_asynchronous_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_copy) - 1268usize] ; ["Offset of field: starpu_conf::disable_asynchronous_cuda_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_cuda_copy) - 1272usize] ; ["Offset of field: starpu_conf::disable_asynchronous_hip_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_hip_copy) - 1276usize] ; ["Offset of field: starpu_conf::disable_asynchronous_opencl_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_opencl_copy) - 1280usize] ; ["Offset of field: starpu_conf::disable_asynchronous_mpi_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_mpi_ms_copy) - 1284usize] ; ["Offset of field: starpu_conf::disable_asynchronous_tcpip_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_tcpip_ms_copy) - 1288usize] ; ["Offset of field: starpu_conf::disable_asynchronous_max_fpga_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_max_fpga_copy) - 1292usize] ; ["Offset of field: starpu_conf::enable_map"] [:: std :: mem :: offset_of ! (starpu_conf , enable_map) - 1296usize] ; ["Offset of field: starpu_conf::cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_opengl_interoperability) - 1304usize] ; ["Offset of field: starpu_conf::n_cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , n_cuda_opengl_interoperability) - 1312usize] ; ["Offset of field: starpu_conf::not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , not_launched_drivers) - 1320usize] ; ["Offset of field: starpu_conf::n_not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , n_not_launched_drivers) - 1328usize] ; ["Offset of field: starpu_conf::trace_buffer_size"] [:: std :: mem :: offset_of ! (starpu_conf , trace_buffer_size) - 1336usize] ; ["Offset of field: starpu_conf::global_sched_ctx_min_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_min_priority) - 1344usize] ; ["Offset of field: starpu_conf::global_sched_ctx_max_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_max_priority) - 1348usize] ; ["Offset of field: starpu_conf::catch_signals"] [:: std :: mem :: offset_of ! (starpu_conf , catch_signals) - 1352usize] ; ["Offset of field: starpu_conf::start_perf_counter_collection"] [:: std :: mem :: offset_of ! (starpu_conf , start_perf_counter_collection) - 1356usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_min"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_min) - 1360usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_max"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_max) - 1364usize] ; ["Offset of field: starpu_conf::cuda_only_fast_alloc_other_memnodes"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_only_fast_alloc_other_memnodes) - 1368usize] ; } ; 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 () } } } unsafe 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-EINVAL indicates that the argument was NULL."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Set fields of \\p conf so that no worker is enabled, i.e. set\nstarpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.\n\nThis allows to portably enable only a given type of worker:\n
\n\nstarpu_conf_noworker(&conf);
\nconf.ncpus = -1;\n\n\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_conf_noworker (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe 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-NULL \\p conf. Default configuration is used if \\p conf\nis NULL. Upon successful completion, this function returns\n0. Otherwise, -ENODEV indicates that no worker was available\n(and thus StarPU was not initialized). See \\ref SubmittingATask for more details."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application, which is necessary when running in\nSimgrid mode or MPI Master Slave mode.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram. See \\ref SubmittingATask for more details."] 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 ; } unsafe extern "C" { # [doc = "Return 1 if StarPU is already initialized. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait for starpu_init() call to finish. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_wait_initialized () ; } unsafe 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. See \\ref SubmittingATask for more details."] pub fn starpu_shutdown () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_pause () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_resume () ; } unsafe extern "C" { # [doc = "Return !0 if task processing by workers is currently paused, 0 otherwise.\nSee \\ref StarPUEatsCPUs for more details."] pub fn starpu_is_paused () -> :: std :: os :: raw :: c_int ; } unsafe 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\n::STARPU_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.\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe 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 \\p cpuid does not produce a warning.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Bind the calling thread on the cores corresponding to the \\p workerid .\n\n\\p workerid can be a basic worker or a combined worker.\n\nThis can be used e.g. before initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_worker (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Bind the calling thread back to the core reserved for the main thread.\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_main () ; } unsafe extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_cpu (cpuid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the OS number of a given \\p cpuid\n\nStarPU uses logical numbering (as define by hwloc) all along, but in case\ninteraction is needed with another binding tool that uses numbering as\ndefined by the OS, we need to convert from hwloc logical numbering to hwloc\nphysical numbering."] pub fn starpu_cpu_os_index (cpuid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print a description of the topology on \\p f.\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_topology_print (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled.\nSee \\ref Basic for more details."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled.\nSee \\ref cudaWorkers for more details."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and HIP\naccelerators are disabled.\nSee \\ref hipWorkers for more details."] pub fn starpu_asynchronous_hip_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled.\nSee \\ref openclWorkers for more details."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and Maxeler FPGA\ndevices are disabled.\nSee \\ref maxfpgaWorkers for more details."] pub fn starpu_asynchronous_max_fpga_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled.\nSee \\ref mpimsWorkers for more details."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and TCP/IP Slave\ndevices are disabled.\nSee \\ref tcpipmsWorkers for more details."] pub fn starpu_asynchronous_tcpip_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers with a given kind of memory\nare disabled."] pub fn starpu_asynchronous_copy_disabled_for (kind : starpu_node_kind) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if memory mapping support between memory nodes is\nenabled.\nSee \\ref Basic for more details."] pub fn starpu_map_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call starpu_profiling_bus_helper_display_summary() and\nstarpu_profiling_worker_helper_display_summary().\nSee \\ref DataStatistics for more details."] pub fn starpu_display_stats () ; } unsafe extern "C" { # [doc = "Return as 3 integers the version of StarPU used when running the\napplication.\nSee \\ref ConfigurationAndInitialization for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_perf_counter_sample_cl_values { pub _address : u8 , } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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-d9f436f8999da027/out/bindings.rs:3:96621
[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.174/src/unix/linux_like/linux/mod.rs:1440:1
[INFO] [stdout] |
[INFO] [stdout] 1440 | / s_no_extra_traits! {
[INFO] [stdout] 1441 | | pub struct sockaddr_nl {
[INFO] [stdout] 1442 | | pub nl_family: crate::sa_family_t,
[INFO] [stdout] 1443 | | nl_pad: c_ushort,
[INFO] [stdout] ... |
[INFO] [stdout] 1872 | | }
[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] fn extract_bit (byte : u8 , index : usize) -> bool { 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 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] ; Self :: extract_bit (byte , index) } # [inline] pub unsafe fn raw_get_bit (this : * const Self , index : usize) -> bool { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { * (core :: ptr :: addr_of ! ((* this) . storage) as * const u8) . offset (byte_index as isize) } ; Self :: extract_bit (byte , index) } # [inline] fn change_bit (byte : u8 , index : usize , val : bool) -> u8 { 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 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] ; * byte = Self :: change_bit (* byte , index , val) ; } # [inline] pub unsafe fn raw_set_bit (this : * mut Self , index : usize , val : bool) { debug_assert ! (index / 8 < core :: mem :: size_of ::< Storage > ()) ; let byte_index = index / 8 ; let byte = unsafe { (core :: ptr :: addr_of_mut ! ((* this) . storage) as * mut u8) . offset (byte_index as isize) } ; unsafe { * byte = Self :: change_bit (* byte , index , val) } ; } # [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 unsafe fn raw_get (this : * const Self , bit_offset : usize , bit_width : u8 ,) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if unsafe { Self :: raw_get_bit (this , 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) ; } } # [inline] pub unsafe fn raw_set (this : * mut Self , bit_offset : usize , bit_width : u8 , val : u64 ,) { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < core :: mem :: size_of ::< Storage > ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= core :: mem :: size_of ::< Storage > ()) ; 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 } ; unsafe { Self :: raw_set_bit (this , 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 = 4 ; pub const STARPU_RELEASE_VERSION : u32 = 3 ; pub const STARPU_USE_CPU : u32 = 1 ; pub const STARPU_USE_OPENCL : u32 = 1 ; pub const STARPU_USE_TCPIP_MASTER_SLAVE : u32 = 1 ; pub const STARPU_OPENMP : u32 = 1 ; pub const STARPU_PARALLEL_WORKER : 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_CBLAS_H : 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_PAPI : 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_BOOL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP : u32 = 1 ; pub const STARPU_HAVE_SYNC_VAL_COMPARE_AND_SWAP_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR : u32 = 1 ; pub const STARPU_HAVE_SYNC_FETCH_AND_OR_8 : u32 = 1 ; pub const STARPU_HAVE_SYNC_LOCK_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_COMPARE_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_EXCHANGE_N_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_ADD_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_FETCH_OR_8 : u32 = 1 ; pub const STARPU_HAVE_ATOMIC_TEST_AND_SET : u32 = 1 ; pub const STARPU_HAVE_SYNC_SYNCHRONIZE : 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_FXT_MAX_FILES : u32 = 64 ; pub const STARPU_MAXCPUS : u32 = 32 ; pub const STARPU_MAXNUMANODES : u32 = 4 ; pub const STARPU_MAXCUDADEVS : u32 = 4 ; pub const STARPU_MAXOPENCLDEVS : u32 = 8 ; pub const STARPU_MAXMAXFPGADEVS : u32 = 12 ; pub const STARPU_MAXHIPDEVS : u32 = 8 ; pub const STARPU_NMAXWORKERS : u32 = 48 ; pub const STARPU_NMAX_SCHED_CTXS : u32 = 10 ; pub const STARPU_MAXIMPLEMENTATIONS : u32 = 4 ; 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_HAVE_MPI_COMM_CREATE_GROUP : u32 = 1 ; pub const STARPU_USE_FXT : 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_PTHREAD_MUTEX_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_COND_INITIALIZER_ZERO : u32 = 1 ; pub const STARPU_PTHREAD_RWLOCK_INITIALIZER_ZERO : 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 STARPU_PYTHON_HAVE_NUMPY : u32 = 1 ; pub const STARPU_PROF_TOOL : 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_MALLOC_SIMULATION_UNIQUE : u32 = 128 ; pub const STARPU_NOWHERE : u32 = 1 ; 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_HIP_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_SPECIFIC_NODE_LOCAL_OR_CPU : i32 = - 5 ; pub const STARPU_SPECIFIC_NODE_NONE : i32 = - 6 ; 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_TRANSACTION : u32 = 5505024 ; pub const STARPU_TASK_FILE : u32 = 5636096 ; pub const STARPU_TASK_LINE : u32 = 5767168 ; pub const STARPU_EPILOGUE_CALLBACK : u32 = 5898240 ; pub const STARPU_EPILOGUE_CALLBACK_ARG : u32 = 6029312 ; pub const STARPU_BUBBLE_FUNC : u32 = 6160384 ; pub const STARPU_BUBBLE_FUNC_ARG : u32 = 6291456 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC : u32 = 6422528 ; pub const STARPU_BUBBLE_GEN_DAG_FUNC_ARG : u32 = 6553600 ; pub const STARPU_BUBBLE_PARENT : u32 = 6684672 ; pub const STARPU_SHIFTED_MODE_MAX : u32 = 6815744 ; 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_PARALLEL_WORKER_MIN_NB : u32 = 131072 ; pub const STARPU_PARALLEL_WORKER_MAX_NB : u32 = 262144 ; pub const STARPU_PARALLEL_WORKER_NB : u32 = 393216 ; pub const STARPU_PARALLEL_WORKER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_PARALLEL_WORKER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_PARALLEL_WORKER_POLICY_NAME : u32 = 786432 ; pub const STARPU_PARALLEL_WORKER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_PARALLEL_WORKER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_PARALLEL_WORKER_TYPE : u32 = 1310720 ; pub const STARPU_PARALLEL_WORKER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_PARALLEL_WORKER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_PARALLEL_WORKER_NEW : u32 = 1703936 ; pub const STARPU_PARALLEL_WORKER_NCORES : u32 = 1835008 ; pub const STARPU_CLUSTER_MIN_NB : u32 = 131072 ; pub const STARPU_CLUSTER_MAX_NB : u32 = 262144 ; pub const STARPU_CLUSTER_NB : u32 = 393216 ; pub const STARPU_CLUSTER_PREFERE_MIN : u32 = 524288 ; pub const STARPU_CLUSTER_KEEP_HOMOGENEOUS : u32 = 655360 ; pub const STARPU_CLUSTER_POLICY_NAME : u32 = 786432 ; pub const STARPU_CLUSTER_POLICY_STRUCT : u32 = 917504 ; pub const STARPU_CLUSTER_CREATE_FUNC : u32 = 1048576 ; pub const STARPU_CLUSTER_CREATE_FUNC_ARG : u32 = 1179648 ; pub const STARPU_CLUSTER_TYPE : u32 = 1310720 ; pub const STARPU_CLUSTER_AWAKE_WORKERS : u32 = 1441792 ; pub const STARPU_CLUSTER_PARTITION_ONE : u32 = 1572864 ; pub const STARPU_CLUSTER_NEW : u32 = 1703936 ; pub const STARPU_CLUSTER_NCORES : u32 = 1835008 ; pub const STARPU_THREAD_ACTIVE : u32 = 1 ; # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of drand48_data"] [:: std :: mem :: size_of :: < drand48_data > () - 24usize] ; ["Alignment of drand48_data"] [:: std :: mem :: align_of :: < drand48_data > () - 8usize] ; ["Offset of field: drand48_data::__x"] [:: std :: mem :: offset_of ! (drand48_data , __x) - 0usize] ; ["Offset of field: drand48_data::__old_x"] [:: std :: mem :: offset_of ! (drand48_data , __old_x) - 6usize] ; ["Offset of field: drand48_data::__c"] [:: std :: mem :: offset_of ! (drand48_data , __c) - 12usize] ; ["Offset of field: drand48_data::__init"] [:: std :: mem :: offset_of ! (drand48_data , __init) - 14usize] ; ["Offset of field: drand48_data::__a"] [:: std :: mem :: offset_of ! (drand48_data , __a) - 16usize] ; } ; 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_opencl_program"] [:: std :: mem :: size_of :: < starpu_opencl_program > () - 64usize] ; ["Alignment of starpu_opencl_program"] [:: std :: mem :: align_of :: < starpu_opencl_program > () - 8usize] ; ["Offset of field: starpu_opencl_program::programs"] [:: std :: mem :: offset_of ! (starpu_opencl_program , programs) - 0usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Return the OpenCL context of the device designated by \\p devid\nin \\p context.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_context (devid : :: std :: os :: raw :: c_int , context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the cl_device_id corresponding to \\p devid in \\p device.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_device (devid : :: std :: os :: raw :: c_int , device : * mut cl_device_id) ; } unsafe extern "C" { # [doc = "Return the command queue of the device designated by \\p devid\ninto \\p queue.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_queue (devid : :: std :: os :: raw :: c_int , queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Return the context of the current worker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_context (context : * mut cl_context) ; } unsafe extern "C" { # [doc = "Return the computation kernel command queue of the current\nworker.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_get_current_queue (queue : * mut cl_command_queue) ; } unsafe extern "C" { # [doc = "Set the arguments of a given kernel. The list of arguments\nmust be given as (size_t size_of_the_argument, cl_mem *\npointer_to_the_argument). 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\n\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_set_kernel_args (err : * mut cl_int , kernel : * mut cl_kernel , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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 share/starpu/opencl 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. See \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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 $STARPU_HOME/.starpu/opencl 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe 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$STARPU_HOME/.starpu/opencl/\\.\\.vendor_id_\\_device_id_\\.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a file.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Compile an OpenCL source code stored in a string.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Unload an OpenCL compiled code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_unload_opencl (opencl_programs : * mut starpu_opencl_program) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the given \\p kernel, to be called after kernel execution.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_release_kernel (kernel : cl_kernel) -> :: std :: os :: raw :: c_int ; } unsafe 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). See \\ref OpenCL-specificOptimizations for more details."] pub fn starpu_opencl_collect_stats (event : cl_event) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the error message in English corresponding to \\p status, an OpenCL\nerror code.\nSee \\ref OpenCLSupport for more details."] pub fn starpu_opencl_error_string (status : cl_int) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref OpenCLSupport for more details."] 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) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_opencl_allocate_memory (devid : :: std :: os :: raw :: c_int , addr : * mut cl_mem , size : usize , flags : cl_mem_flags) -> cl_int ; } unsafe 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 NULL, the copy is\nsynchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy\nis synchronous, i.e the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is\nsynchronous, i.e. the queue is synchronised before returning. If not\nNULL, \\p event can be used after the call to wait for this\nparticular copy to complete. This function returns CL_SUCCESS\nif the copy was successful, or a valid OpenCL error code otherwise.\nThe integer pointed to by \\p ret is set to -EAGAIN if the\nasynchronous launch was successful, or to 0 if \\p event was\nNULL.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 NULL, the copy is synchronous, i.e. the queue is\nsynchronised before returning. If not NULL, \\p event can be\nused after the call to wait for this particular copy to complete. The\nfunction returns -EAGAIN if the asynchronous launch was\nsuccessful. It returns 0 if the synchronous copy was successful, or\nfails otherwise.\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 __gnuc_va_list = __builtin_va_list ; pub type va_list = __gnuc_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 ; unsafe extern "C" { pub fn starpu_pthread_mutex_lock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_unlock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_mutex_trylock_sched (mutex : * mut starpu_pthread_mutex_t) -> :: std :: os :: raw :: c_int ; } unsafe 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)] pub struct starpu_pthread_spinlock_t { pub taken : :: std :: os :: raw :: c_uint , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_pthread_spinlock_t"] [:: std :: mem :: size_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Alignment of starpu_pthread_spinlock_t"] [:: std :: mem :: align_of :: < starpu_pthread_spinlock_t > () - 16usize] ; ["Offset of field: starpu_pthread_spinlock_t::taken"] [:: std :: mem :: offset_of ! (starpu_pthread_spinlock_t , taken) - 0usize] ; } ; unsafe 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 ; } unsafe extern "C" { pub fn starpu_pthread_spin_destroy (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_lock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_pthread_spin_trylock (lock : * mut starpu_pthread_spinlock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; unsafe extern "C" { pub fn starpu_sem_trywait (sem : * mut starpu_sem_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sem_wait (sem : * 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. See \\ref DataInterface for more details."] 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\nNULL pointer, since the value\nof the provided buffer is simply\nignored for now.\n\nSee \\ref ScratchData for more details."] pub const STARPU_SCRATCH : starpu_data_access_mode = 4 ; # [doc = "< Reduction mode.\nStarPU will allocate on the fly a per-worker\nbuffer, so that various tasks that access the\nsame data in ::STARPU_REDUX mode can execute\nin parallel. When a task accesses the\ndata without ::STARPU_REDUX, StarPU will\nautomatically reduce the different contributions.\n\nCodelets contributing to these reductions\nwith ::STARPU_REDUX must be registered with\n::STARPU_RW | ::STARPU_COMMUTE access modes.\n\nSee \\ref DataReduction for more details."] 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).\n\nSee \\ref DataCommute for more details."] pub const STARPU_COMMUTE : starpu_data_access_mode = 16 ; # [doc = "< used in starpu_mpi_task_insert() 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.\n\nTODO add extended description in documentation."] pub const STARPU_LOCALITY : starpu_data_access_mode = 64 ; # [doc = "< Inter-node reduction only.\nThis is similar to ::STARPU_REDUX, except that\nStarPU will allocate a per-node buffer only,\ni.e. parallelism will be achieved between\nnodes, but not within each node. This is\nuseful when the per-worker buffers allocated\nwith ::STARPU_REDUX consume too much memory.\n\nSee \\ref MPIMpiRedux for more details."] pub const STARPU_MPI_REDUX : starpu_data_access_mode = 128 ; # [doc = "< Disable automatic submission of asynchronous\npartitioning/unpartitioning, only use internally by StarPU"] pub const STARPU_NOPLAN : starpu_data_access_mode = 256 ; # [doc = "< Request unmapping the destination replicate, only use internally by StarPU"] pub const STARPU_UNMAP : starpu_data_access_mode = 512 ; # [doc = "< Ignore this data for the footprint computation. See \\ref ScratchData"] pub const STARPU_NOFOOTPRINT : starpu_data_access_mode = 1024 ; # [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 = 2048 ; # [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 ; unsafe extern "C" { # [doc = "Set the name of the data, to be shown in various profiling tools.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_name (handle : starpu_data_handle_t , name : * const :: std :: os :: raw :: c_char) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] 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]) ; } unsafe 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. See \\ref CreatingAGanttDiagram for more details."] pub fn starpu_data_set_coordinates (handle : starpu_data_handle_t , dimensions : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] 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 ; } unsafe 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.\nSee \\ref TaskSubmission for more details."] pub fn starpu_data_unregister (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_unregister_no_coherency (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref TemporaryData for more details."] pub fn starpu_data_unregister_submit (handle : starpu_data_handle_t) ; } unsafe 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. See \\ref DataManagementAllocation for more details."] pub fn starpu_data_invalidate (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Submit invalidation of the data \\p handle after completion of\npreviously submitted tasks. See \\ref DataReduction for more details."] pub fn starpu_data_invalidate_submit (handle : starpu_data_handle_t) ; } unsafe 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) ; } unsafe 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\nexplicitly 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 -EDEADLK). Upon successful\ncompletion, this function returns 0. See \\ref DataAccess for more details."] pub fn starpu_data_acquire (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe 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.\n\n\\p callback_acquired is called when the data is acquired in terms of semantic,\nbut the data is not fetched yet. It is given a pointer to the node, which it\ncan modify if it wishes so.\n\nThis is a very internal interface, subject to changes, do not use this."] 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_acquired : :: std :: option :: Option < unsafe extern "C" fn (arg : * mut :: std :: os :: raw :: c_void , node : * mut :: std :: os :: raw :: c_int , mode : starpu_data_access_mode) > , callback : :: std :: option :: Option < unsafe extern "C" fn (arg : * 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 , prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] pub fn starpu_data_acquire_try (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> :: std :: os :: raw :: c_int ; } unsafe 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. See \\ref DataAccess for more details."] 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 ; } unsafe extern "C" { # [doc = "Release the piece of data acquired by the\napplication either by starpu_data_acquire() or by\nstarpu_data_acquire_cb(). See \\ref DataAccess for more details."] pub fn starpu_data_release (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Partly release the piece of data acquired by the application either by\nstarpu_data_acquire() or by starpu_data_acquire_cb(), switching the\nacquisition down to \\p down_to_mode. For now, only releasing from ::STARPU_RW\nor ::STARPU_W acquisition down to ::STARPU_R is supported, or down to the same\nacquisition. ::STARPU_NONE can also be passed as \\p down_to_mode, in which\ncase this is equivalent to calling starpu_data_release(). See \\ref DataAccess for more details."] pub fn starpu_data_release_to (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_release_to(), except that the data\nwas made 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. See \\ref DataAccess for more details."] pub fn starpu_data_release_to_on_node (handle : starpu_data_handle_t , down_to_mode : starpu_data_access_mode , 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 ; unsafe extern "C" { # [doc = "Create a data access arbiter, see \\ref ConcurrentDataAccess for the\ndetails"] pub fn starpu_arbiter_create () -> starpu_arbiter_t ; } unsafe extern "C" { # [doc = "Make access to \\p handle managed by \\p arbiter, see \\ref\nConcurrentDataAccess for the details."] pub fn starpu_data_assign_arbiter (handle : starpu_data_handle_t , arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Destroy the \\p arbiter. This must only be called after all data\nassigned to it have been unregistered. See \\ref\nConcurrentDataAccess for the details."] pub fn starpu_arbiter_destroy (arbiter : starpu_arbiter_t) ; } unsafe extern "C" { # [doc = "Explicitly ask StarPU to allocate room for a piece of data on\nthe specified memory \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_request_allocation (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } # [doc = " A task really needs it now!"] pub const STARPU_FETCH : starpu_is_prefetch = 0 ; # [doc = " A task will need it soon"] pub const STARPU_TASK_PREFETCH : starpu_is_prefetch = 1 ; # [doc = " It is a good idea to have it asap"] pub const STARPU_PREFETCH : starpu_is_prefetch = 2 ; # [doc = " Get this here when you have time to"] pub const STARPU_IDLEFETCH : starpu_is_prefetch = 3 ; # [doc = " Get this here when you have time to"] pub const STARPU_NFETCH : starpu_is_prefetch = 4 ; # [doc = "Prefetch levels\n\nData requests are ordered by priorities, but also by prefetching level,\nbetween data that a task wants now, and data that we will probably want\n\"soon\"."] pub type starpu_is_prefetch = :: std :: os :: raw :: c_uint ; unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe 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. See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "Check whether a valid copy of \\p handle is currently available on\nmemory node \\p node (or a transfer request for getting so is ongoing). See \\ref SchedulingHelpers for more details."] pub fn starpu_data_is_on_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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. See \\ref DataPrefetch for more details."] pub fn starpu_data_wont_use (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Advise StarPU to evict \\p handle from the memory node \\p node\nStarPU will thus write its value back to its home node, before evicting it.\nThis may however fail if e.g. some task is still working on it.\n\nIf the eviction was successful, 0 is returned ; -1 is returned otherwise.\n\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_evict_from_node (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 transferred into those memory nodes. For\ninstance a 1<<0 write-through mask means that the CUDA workers\nwill commit their changes in main memory (node 0). See \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_wt_mask (handle : starpu_data_handle_t , wt_mask : u32) ; } unsafe 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().\nSee \\ref SequentialConsistency and \\ref DataManagementAllocation for more details."] pub fn starpu_data_set_sequential_consistency_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get the data consistency mode associated to the data handle \\p handle. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_sequential_consistency_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the default sequential consistency flag. See \\ref SequentialConsistency for more details."] pub fn starpu_data_get_default_sequential_consistency_flag () -> :: std :: os :: raw :: c_uint ; } unsafe 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(). See \\ref SequentialConsistency for more details."] pub fn starpu_data_set_default_sequential_consistency_flag (flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Set whether this data should be elligible to be evicted to disk\nstorage (1) or not (0). The default is 1. See \\ref OOCDataRegistration for more details."] pub fn starpu_data_set_ooc_flag (handle : starpu_data_handle_t , flag : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Get whether this data was set to be elligible to be evicted to disk\nstorage (1) or not (0). See \\ref OOCDataRegistration for more details."] pub fn starpu_data_get_ooc_flag (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Query the status of \\p handle on the specified \\p memory_node.\n\n\\p is_allocated tells whether memory was allocated there for the data.\n\\p is_valid tells whether the actual value is available there.\n\\p is_loading tells whether the actual value is getting loaded there.\n\\p is_requested tells whether the actual value is requested to be loaded\nthere by some fetch/prefetch/idlefetch request.\nSee \\ref DataPrefetch for more details."] pub fn starpu_data_query_status2 (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_loading : * mut :: std :: os :: raw :: c_int , is_requested : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Same as starpu_data_query_status2(), but without the is_loading parameter. See \\ref DataPrefetch for more details."] 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) ; } unsafe 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 (which has to take one handle with ::STARPU_W), and\nreduction between per-worker buffers will be done with the codelet \\p\nredux_cl (which has to take a first accumulation handle with\n::STARPU_RW|::STARPU_COMMUTE, and a second contribution handle with ::STARPU_R).\nSee \\ref DataReduction and \\ref TemporaryData for more details."] pub fn starpu_data_set_reduction_methods (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , init_cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Same as starpu_data_set_reduction_methods() but allows to pass\narguments to the reduction and init tasks"] pub fn starpu_data_set_reduction_methods_with_args (handle : starpu_data_handle_t , redux_cl : * mut starpu_codelet , redux_cl_arg : * mut :: std :: os :: raw :: c_void , init_cl : * mut starpu_codelet , init_cl_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { pub fn starpu_data_get_interface_ops (handle : starpu_data_handle_t) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_data_test_if_mapped_on_node (handle : starpu_data_handle_t , memory_node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref DataPrefetch for more details."] pub fn starpu_memchunk_tidy (memory_node : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_user_data (handle : starpu_data_handle_t , user_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c user_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_user_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Set the field \\c sched_data for the \\p handle to \\p sched_data . It can\nthen be retrieved with starpu_data_get_sched_data(). \\p sched_data can be any\nscheduler-defined value.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_set_sched_data (handle : starpu_data_handle_t , sched_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Retrieve the field \\c sched_data previously set for the \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_sched_data (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Check whether data \\p handle can be evicted now from node \\p node. See \\ref DataPrefetch for more details."] pub fn starpu_data_can_evict (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , is_prefetch : starpu_is_prefetch) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub static mut _starpu_silent : :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Retrieve the value of an environment variable.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] pub fn starpu_getenv (str_ : * const :: std :: os :: raw :: c_char) -> * mut :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref ExecutionConfigurationThroughEnvironmentVariables for more details."] 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 ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Same as starpu_execute_on_each_worker(), except that the task name\nis specified in the argument \\p name.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the current date in micro-seconds. See \\ref Preparing for more details."] pub fn starpu_timing_now () -> f64 ; } unsafe 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Like starpu_data_cpy(), copy the content of \\p src_handle into \\p dst_handle,\nbut additionally take a \\p priority parameter to sort it among the whole task\ngraph.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_cpy_priority (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 , priority : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Create a copy of \\p src_handle, and return a new handle in \\p dst_handle,\nwhich is to be used only for read accesses. This allows StarPU to optimize it\nby not actually copying the data whenever possible (e.g. it may possibly\nsimply return src_handle itself).\nThe parameter \\p asynchronous indicates whether the function should block\nor not. In the case of an asynchronous call, it is possible to synchronize\nwith the 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 NULL, this callback function is executed after\nthe handle has been copied, and it is given the pointer \\p\ncallback_arg as argument.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_dup_ro (dst_handle : * mut starpu_data_handle_t , src_handle : starpu_data_handle_t , asynchronous : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call hwloc-ps to display binding of each process and thread running on\nthe machine.
\nUse the environment variable \\ref STARPU_DISPLAY_BINDINGS to automatically\ncall this function at the beginning of the execution of StarPU.\nSee \\ref MiscellaneousAndDebug for more details."] pub fn starpu_display_bindings () ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_pu_os_index (logical_index : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a bitmap representing logical indexes of NUMA nodes where the buffer\ntargeted by \\p ptr is allocated. An error is notified by a negative result.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_memory_location_bitmap (ptr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_long ; } unsafe 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.\nSee \\ref HardwareTopology for more details."] pub fn starpu_get_hwloc_topology () -> hwloc_topology_t ; } # [doc = "Set of functions to manipulate data on disk. See \\ref DiskFunctions for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 data 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 data, 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 data \\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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_disk_ops"] [:: std :: mem :: size_of :: < starpu_disk_ops > () - 152usize] ; ["Alignment of starpu_disk_ops"] [:: std :: mem :: align_of :: < starpu_disk_ops > () - 8usize] ; ["Offset of field: starpu_disk_ops::plug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , plug) - 0usize] ; ["Offset of field: starpu_disk_ops::unplug"] [:: std :: mem :: offset_of ! (starpu_disk_ops , unplug) - 8usize] ; ["Offset of field: starpu_disk_ops::bandwidth"] [:: std :: mem :: offset_of ! (starpu_disk_ops , bandwidth) - 16usize] ; ["Offset of field: starpu_disk_ops::alloc"] [:: std :: mem :: offset_of ! (starpu_disk_ops , alloc) - 24usize] ; ["Offset of field: starpu_disk_ops::free"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free) - 32usize] ; ["Offset of field: starpu_disk_ops::open"] [:: std :: mem :: offset_of ! (starpu_disk_ops , open) - 40usize] ; ["Offset of field: starpu_disk_ops::close"] [:: std :: mem :: offset_of ! (starpu_disk_ops , close) - 48usize] ; ["Offset of field: starpu_disk_ops::read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , read) - 56usize] ; ["Offset of field: starpu_disk_ops::write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , write) - 64usize] ; ["Offset of field: starpu_disk_ops::full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_read) - 72usize] ; ["Offset of field: starpu_disk_ops::full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , full_write) - 80usize] ; ["Offset of field: starpu_disk_ops::async_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_write) - 88usize] ; ["Offset of field: starpu_disk_ops::async_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_read) - 96usize] ; ["Offset of field: starpu_disk_ops::async_full_read"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_read) - 104usize] ; ["Offset of field: starpu_disk_ops::async_full_write"] [:: std :: mem :: offset_of ! (starpu_disk_ops , async_full_write) - 112usize] ; ["Offset of field: starpu_disk_ops::copy"] [:: std :: mem :: offset_of ! (starpu_disk_ops , copy) - 120usize] ; ["Offset of field: starpu_disk_ops::wait_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , wait_request) - 128usize] ; ["Offset of field: starpu_disk_ops::test_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , test_request) - 136usize] ; ["Offset of field: starpu_disk_ops::free_request"] [:: std :: mem :: offset_of ! (starpu_disk_ops , free_request) - 144usize] ; } ; unsafe extern "C" { # [doc = "Use the stdio library (fwrite, fread...) to read/write on disk.\n\nWarning: It creates one file per allocation !\n\nDo not support asynchronous transfers."] pub static mut starpu_disk_stdio_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the HDF5 library.\n\nIt doesn't support multiple opening from different processes. \n\nYou may only allow one process to write in the HDF5 file.\n\nIf HDF5 library is not compiled with --thread-safe you can't open more than one HDF5 file at the same time. "] pub static mut starpu_disk_hdf5_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk.\n\nWarning: It creates one file per allocation !"] pub static mut starpu_disk_unistd_ops : starpu_disk_ops ; } unsafe extern "C" { # [doc = "Use the unistd library (write, read...) to read/write on disk with the O_DIRECT flag.\n\nWarning: It creates one file per allocation !\n\nOnly available on Linux systems."] pub static mut starpu_disk_unistd_o_direct_ops : starpu_disk_ops ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Close an existing data opened with starpu_disk_open(). See \\ref OutOfCore_Introduction for more details."] pub fn starpu_disk_close (node : :: std :: os :: raw :: c_uint , obj : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe 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. See \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe extern "C" { # [doc = "Register a disk memory node with a set of functions to manipulate\ndata. 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
\nSUCCESS: return the disk node.
\nFAIL: return an error code.
\n\\p size must be at least \\ref STARPU_DISK_SIZE_MIN bytes ! \\p size\nbeing negative means infinite size.\n\nSee \\ref OutOfCore_Introduction for more details."] 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 ; } unsafe 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, HIP or OpenCL support.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] 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 HIP node. Return 0 on success."] pub ram_to_hip : :: 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 FPGA node. Return 0 on success."] pub ram_to_max_fpga : :: 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 HIP node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub hip_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 HIP node to the \\p dst_interface interface on the \\p\ndst_node HIP node. Return 0 on success."] pub hip_to_hip : :: 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 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 FPGA node to the \\p dst_interface interface on the \\p\ndst_node CPU node. Return 0 on success."] pub max_fpga_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 > , 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 > , pub ram_to_hip_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_ram_async : :: std :: option :: Option < unsafe extern "C" fn () -> :: std :: os :: raw :: c_int > , pub hip_to_hip_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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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\ncl_event, the event of the last submitted transfer. Must\nreturn 0 if the transfer was actually completed completely\nsynchronously, or -EAGAIN 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 FPGA node. Must return 0 if the transfer was actually\ncompleted completely synchronously, or -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub ram_to_max_fpga_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 FPGA 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 -EAGAIN if at least\nsome transfers are still ongoing and should be awaited for by the\ncore."] pub max_fpga_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 -EAGAIN if any of the starpu_interface_copy()\ncalls has returned -EAGAIN (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::peek_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 > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_copy_methods"] [:: std :: mem :: size_of :: < starpu_data_copy_methods > () - 200usize] ; ["Alignment of starpu_data_copy_methods"] [:: std :: mem :: align_of :: < starpu_data_copy_methods > () - 8usize] ; ["Offset of field: starpu_data_copy_methods::can_copy"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , can_copy) - 0usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_ram) - 8usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda) - 16usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip) - 24usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl) - 32usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga) - 40usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram) - 48usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda) - 56usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram) - 64usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip) - 72usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram) - 80usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl) - 88usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram) - 96usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_cuda_async) - 104usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_ram_async) - 112usize] ; ["Offset of field: starpu_data_copy_methods::cuda_to_cuda_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , cuda_to_cuda_async) - 120usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_hip_async) - 128usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_ram_async) - 136usize] ; ["Offset of field: starpu_data_copy_methods::hip_to_hip_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , hip_to_hip_async) - 144usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_opencl_async) - 152usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_ram_async) - 160usize] ; ["Offset of field: starpu_data_copy_methods::opencl_to_opencl_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , opencl_to_opencl_async) - 168usize] ; ["Offset of field: starpu_data_copy_methods::ram_to_max_fpga_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , ram_to_max_fpga_async) - 176usize] ; ["Offset of field: starpu_data_copy_methods::max_fpga_to_ram_async"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , max_fpga_to_ram_async) - 184usize] ; ["Offset of field: starpu_data_copy_methods::any_to_any"] [:: std :: mem :: offset_of ! (starpu_data_copy_methods , any_to_any) - 192usize] ; } ; # [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 = "< Identifier for the tensor data interface"] pub const STARPU_TENSOR_INTERFACE_ID : starpu_data_interface_id = 9 ; # [doc = "< Identifier for the ndim array data interface"] pub const STARPU_NDIM_INTERFACE_ID : starpu_data_interface_id = 10 ; # [doc = "< Maximum number of data interfaces"] pub const STARPU_MAX_INTERFACE_ID : starpu_data_interface_id = 11 ; # [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)] 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 (if >= 0), 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] pub register_data_handle : :: std :: option :: Option < unsafe extern "C" fn (handle : starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , 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.\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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.\n\nSee \\ref DefiningANewDataInterface_pointers for more details."] 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 = "Cache the buffers from the given node to a caching interface.\n\nThis method is optional, mostly useful when also making\nstarpu_data_interface_ops::unregister_data_handle check that pointers are NULL.\n\n\\p src_interface is an interface that already has buffers\nallocated, but which we don't need any more. \\p cached_interface\nis a new interface into which the buffer pointers should be\ntransferred, for later reuse when allocating data of the same kind.\n\nUsually we can just memcpy over the set of pointers and descriptions\n(this is what StarPU does when this method is not implemented), but\nif unregister_data_handle checks that pointers are NULL, we need to\nadditionally clear the pointers in \\p src_interface. Also,\nit is not useful to copy the whole interface, only the\npointers need to be copied (essentially the pointers that\nstarpu_data_interface_ops::reuse_data_on_node will then transfer into\na new handle interface), as well as the properties\nthat starpu_data_interface_ops::compare (or\nstarpu_data_interface_ops::alloc_compare if defined) needs for\ncomparing interfaces for caching compatibility.\n\nWhen this method is not defined, StarPU will just copy the \\p\ncached_interface into \\p src_interface.\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub cache_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (cached_interface : * mut :: std :: os :: raw :: c_void , src_interface : * mut :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Reuse on the given node the buffers of the provided interface\n\nThis method is optional, mostly useful when also defining\nalloc_footprint to share tiles of the same allocation size but\ndifferent shapes, or when the interface contains pointers which\nare initialized at registration (e.g. nn array in the ndim interface)\n\n\\p cached_interface is an already-allocated buffer that we want to\nreuse, and \\p new_data_interface is an interface in which we want to\ninstall that already-allocated buffer. Usually we can just memcpy over\nthe set of pointers and descriptions. But e.g. with 2D tiles the ld\nvalue may not be correct, and memcpy would wrongly overwrite it in\nnew_data_interface, i.e. reusing a vertical tile allocation for a horizontal tile, or vice-versa.\n\nreuse_data_on_node should thus copy over pointers, and define fields\nthat are usually set by allocate_data_on_node (e.g. ld).\n\nSee \\ref VariableSizeDataInterface and \\ref DefiningANewDataInterface_pointers for more details."] pub reuse_data_on_node : :: std :: option :: Option < unsafe extern "C" fn (dst_data_interface : * mut :: std :: os :: raw :: c_void , cached_interface : * const :: std :: os :: raw :: c_void , node : :: std :: os :: raw :: c_uint) > , # [doc = "Map data from a source to a destination.\nDefine function starpu_interface_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub map_data : :: 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 = "Unmap data from a source to a destination.\nDefine function starpu_interface_unmap() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub unmap_data : :: 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 = "Update map data from a source to a destination.\nDefine function starpu_interface_update_map() to set this field.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub update_map : :: 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 = "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 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 the maximum size that the data may need to increase to. For\ninstance, in the case of compressed matrix tiles this is the size\nwhen the block is fully dense.\nThis is currently only used for feedback tools."] pub get_max_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.\nIf specified, alloc_compare should be set to provide the strict\ncomparison, and reuse_data_on_node should be set to provide correct buffer reuse."] 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 starpu_malloc_flags(ptr, size, 0) (and thus\nreturned in \\p ptr) and set the size of the newly created buffer\nin \\p count. If \\p ptr is NULL, 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 = "Read the data handle from the contiguous buffer at the address\n\\p ptr of size \\p count."] pub peek_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 = "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 = "Pack the interface into a contiguous buffer and set the\nsize of the newly created buffer in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub pack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void , ptr : * mut * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Unpack the interface from the given buffer and set the size\nof the unpacked data in \\p count. This function\nis used in master slave mode for data interfaces with a\ndynamic content."] pub unpack_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut * mut :: std :: os :: raw :: c_void , ptr : * mut :: std :: os :: raw :: c_void , count : * mut starpu_ssize_t) -> :: std :: os :: raw :: c_int > , # [doc = "Free the allocated memory by a previous call to unpack_meta()"] pub free_meta : :: std :: option :: Option < unsafe extern "C" fn (data_interface : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , # [doc = "Name of the interface"] pub name : * mut :: std :: os :: raw :: c_char , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_data_interface_ops > () - 264usize] ; ["Alignment of starpu_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_data_interface_ops::register_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , register_data_handle) - 0usize] ; ["Offset of field: starpu_data_interface_ops::unregister_data_handle"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unregister_data_handle) - 8usize] ; ["Offset of field: starpu_data_interface_ops::allocate_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , allocate_data_on_node) - 16usize] ; ["Offset of field: starpu_data_interface_ops::free_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_data_on_node) - 24usize] ; ["Offset of field: starpu_data_interface_ops::cache_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , cache_data_on_node) - 32usize] ; ["Offset of field: starpu_data_interface_ops::reuse_data_on_node"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , reuse_data_on_node) - 40usize] ; ["Offset of field: starpu_data_interface_ops::map_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , map_data) - 48usize] ; ["Offset of field: starpu_data_interface_ops::unmap_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unmap_data) - 56usize] ; ["Offset of field: starpu_data_interface_ops::update_map"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , update_map) - 64usize] ; ["Offset of field: starpu_data_interface_ops::init"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , init) - 72usize] ; ["Offset of field: starpu_data_interface_ops::copy_methods"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , copy_methods) - 80usize] ; ["Offset of field: starpu_data_interface_ops::handle_to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , handle_to_pointer) - 88usize] ; ["Offset of field: starpu_data_interface_ops::to_pointer"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , to_pointer) - 96usize] ; ["Offset of field: starpu_data_interface_ops::get_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_size) - 104usize] ; ["Offset of field: starpu_data_interface_ops::get_alloc_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_alloc_size) - 112usize] ; ["Offset of field: starpu_data_interface_ops::get_max_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_max_size) - 120usize] ; ["Offset of field: starpu_data_interface_ops::footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , footprint) - 128usize] ; ["Offset of field: starpu_data_interface_ops::alloc_footprint"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_footprint) - 136usize] ; ["Offset of field: starpu_data_interface_ops::compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , compare) - 144usize] ; ["Offset of field: starpu_data_interface_ops::alloc_compare"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , alloc_compare) - 152usize] ; ["Offset of field: starpu_data_interface_ops::display"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , display) - 160usize] ; ["Offset of field: starpu_data_interface_ops::describe"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , describe) - 168usize] ; ["Offset of field: starpu_data_interface_ops::interfaceid"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interfaceid) - 176usize] ; ["Offset of field: starpu_data_interface_ops::interface_size"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , interface_size) - 184usize] ; ["Offset of field: starpu_data_interface_ops::is_multiformat"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , is_multiformat) - 192usize] ; ["Offset of field: starpu_data_interface_ops::dontcache"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , dontcache) - 193usize] ; ["Offset of field: starpu_data_interface_ops::get_mf_ops"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , get_mf_ops) - 200usize] ; ["Offset of field: starpu_data_interface_ops::pack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_data) - 208usize] ; ["Offset of field: starpu_data_interface_ops::peek_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , peek_data) - 216usize] ; ["Offset of field: starpu_data_interface_ops::unpack_data"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_data) - 224usize] ; ["Offset of field: starpu_data_interface_ops::pack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , pack_meta) - 232usize] ; ["Offset of field: starpu_data_interface_ops::unpack_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , unpack_meta) - 240usize] ; ["Offset of field: starpu_data_interface_ops::free_meta"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , free_meta) - 248usize] ; ["Offset of field: starpu_data_interface_ops::name"] [:: std :: mem :: offset_of ! (starpu_data_interface_ops , name) - 256usize] ; } ; 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 () } } } unsafe 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()).\n\nSee \\ref DefiningANewDataInterface_registration for more details."] 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) ; } unsafe extern "C" { # [doc = "Register the given data interface operations. If the field\nstarpu_data_interface_ops::field is set to\n::STARPU_UNKNOWN_INTERFACE_ID, then a new identifier will be set by\ncalling starpu_data_interface_get_next_id().\nThe function is automatically called when registering a piece of\ndata with starpu_data_register(). It is only necessary to call it\nbeforehand for some specific cases (such as the usmaster slave mode)."] pub fn starpu_data_register_ops (ops : * mut starpu_data_interface_ops) ; } unsafe 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.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_data_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Register a new piece of data into the handle \\p handledst with the\nsame interface as the handle \\p handlesrc.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_register_same (handledst : * mut starpu_data_handle_t , handlesrc : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the pointer associated with \\p handle on node \\p node or NULL\nif handle’s interface does not support this operation or data for this\n\\p handle is not allocated on that \\p node.\nSee \\ref DataPointers for more details."] pub fn starpu_data_handle_to_pointer (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle or NULL if\n\\p handle’s interface does not have any data allocated locally.\nSee \\ref DataPointers for more details."] pub fn starpu_data_get_local_ptr (handle : starpu_data_handle_t) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Return the interface associated with \\p handle on \\p memory_node.\nSee \\ref DefiningANewDataInterface_pack for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the unique identifier of the interface associated with\nthe given \\p handle.\nSee \\ref DefiningANewDataInterface_helpers for more details."] pub fn starpu_data_get_interface_id (handle : starpu_data_handle_t) -> starpu_data_interface_id ; } unsafe 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 on node \\p node 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 NULL, 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.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_pack_node (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 ; } unsafe extern "C" { # [doc = "Like starpu_data_pack_node(), but for the local memory node.\nSee \\ref DataHandlesHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Read in handle's \\p node replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek_node (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 ; } unsafe extern "C" { # [doc = "Read in handle's local replicate the data located at \\p ptr\nof size \\p count as described by the interface of the data. The interface\nregistered at \\p handle must define a peeking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_peek (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpack in handle the data located at \\p ptr of size \\p count allocated\non node \\p node as described by the interface of the data. The interface\nregistered at \\p handle must define an unpacking operation (see\nstarpu_data_interface_ops).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack_node (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 ; } unsafe 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).\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_unpack (handle : starpu_data_handle_t , ptr : * mut :: std :: os :: raw :: c_void , count : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the size of the data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the allocated data associated with \\p handle.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_alloc_size (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the maximum size that the \\p handle data may need to increase to.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_max_size (handle : starpu_data_handle_t) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "See \\ref DataHandlesHelpers for more details."] pub fn starpu_data_get_home_node (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print basic information on \\p handle on \\p node.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_data_print (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , stream : * mut FILE) ; } unsafe 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 ; } unsafe 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 -EAGAIN if the\ntransfer is still ongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe 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 4D data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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 ; } unsafe extern "C" { # [doc = "Copy \\p nn[1] * \\p nn[2]...* \\p nn[ndim-1] blocks of \\p nn[0] * \\p elemsize 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 nn[i] blocks (i = 1, 2, ... ndim-1) whose start addresses are\nldn_src[i] * \\p elemsize (resp. ld1_dst[i] * \\p elemsize) bytes apart\nin the source (resp. destination) interface.\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 Ndim data, which is provided with \\p async_data to be passed to\nstarpu_interface_copy(). this returns -EAGAIN if the transfer is still\nongoing, or 0 if the transfer is already completed.\n\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_copynd (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_offset : usize , dst_node : :: std :: os :: raw :: c_uint , elemsize : usize , ndim : usize , nn : * mut u32 , ldn_src : * mut u32 , ldn_dst : * mut u32 , async_data : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "When an asynchronous 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().\n\nSee \\ref DefiningANewDataInterface_copy for more details."] 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) ; } unsafe extern "C" { # [doc = "See starpu_interface_start_driver_copy_async().\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_end_driver_copy_async (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , start : f64) ; } unsafe extern "C" { # [doc = "Record in offline execution traces the copy of \\p size bytes from\nnode \\p src_node to node \\p dst_node.\nSee \\ref DefiningANewDataInterface_copy for more details."] pub fn starpu_interface_data_copy (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node_flags().\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_malloc_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> usize ; } unsafe 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 -ENOMEM as\nallocated size. Deallocation must be done with starpu_free_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_malloc_on_node (dst_node : :: std :: os :: raw :: c_uint , size : usize) -> usize ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] pub fn starpu_free_on_node_flags (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Free \\p addr of \\p size bytes on node \\p dst_node which was previously allocated\nwith starpu_malloc_on_node().\n\nSee \\ref DefiningANewDataInterface_allocation for more details."] pub fn starpu_free_on_node (dst_node : :: std :: os :: raw :: c_uint , addr : usize , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_malloc_on_node_set_default_flags (node : :: std :: os :: raw :: c_uint , flags : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::map_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_map (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize , ret : * mut :: std :: os :: raw :: c_int) -> usize ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::unmap_data.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_unmap (src : usize , src_offset : usize , src_node : :: std :: os :: raw :: c_uint , dst : usize , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Used to set starpu_data_interface_ops::update_map.\nSee \\ref DefiningANewDataInterface_pointers for more details."] pub fn starpu_interface_update_map (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) -> :: std :: os :: raw :: c_int ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_matrix_interface"] [:: std :: mem :: size_of :: < starpu_matrix_interface > () - 64usize] ; ["Alignment of starpu_matrix_interface"] [:: std :: mem :: align_of :: < starpu_matrix_interface > () - 8usize] ; ["Offset of field: starpu_matrix_interface::id"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , id) - 0usize] ; ["Offset of field: starpu_matrix_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ptr) - 8usize] ; ["Offset of field: starpu_matrix_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_matrix_interface::offset"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , offset) - 24usize] ; ["Offset of field: starpu_matrix_interface::nx"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , nx) - 32usize] ; ["Offset of field: starpu_matrix_interface::ny"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ny) - 36usize] ; ["Offset of field: starpu_matrix_interface::ld"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , ld) - 40usize] ; ["Offset of field: starpu_matrix_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , elemsize) - 48usize] ; ["Offset of field: starpu_matrix_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_matrix_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_matrix_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_coo_interface"] [:: std :: mem :: size_of :: < starpu_coo_interface > () - 56usize] ; ["Alignment of starpu_coo_interface"] [:: std :: mem :: align_of :: < starpu_coo_interface > () - 8usize] ; ["Offset of field: starpu_coo_interface::id"] [:: std :: mem :: offset_of ! (starpu_coo_interface , id) - 0usize] ; ["Offset of field: starpu_coo_interface::columns"] [:: std :: mem :: offset_of ! (starpu_coo_interface , columns) - 8usize] ; ["Offset of field: starpu_coo_interface::rows"] [:: std :: mem :: offset_of ! (starpu_coo_interface , rows) - 16usize] ; ["Offset of field: starpu_coo_interface::values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , values) - 24usize] ; ["Offset of field: starpu_coo_interface::nx"] [:: std :: mem :: offset_of ! (starpu_coo_interface , nx) - 32usize] ; ["Offset of field: starpu_coo_interface::ny"] [:: std :: mem :: offset_of ! (starpu_coo_interface , ny) - 36usize] ; ["Offset of field: starpu_coo_interface::n_values"] [:: std :: mem :: offset_of ! (starpu_coo_interface , n_values) - 40usize] ; ["Offset of field: starpu_coo_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_coo_interface , elemsize) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref COODataInterface for more details."] 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) ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_block_interface"] [:: std :: mem :: size_of :: < starpu_block_interface > () - 64usize] ; ["Alignment of starpu_block_interface"] [:: std :: mem :: align_of :: < starpu_block_interface > () - 8usize] ; ["Offset of field: starpu_block_interface::id"] [:: std :: mem :: offset_of ! (starpu_block_interface , id) - 0usize] ; ["Offset of field: starpu_block_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_block_interface , ptr) - 8usize] ; ["Offset of field: starpu_block_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_block_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_block_interface::offset"] [:: std :: mem :: offset_of ! (starpu_block_interface , offset) - 24usize] ; ["Offset of field: starpu_block_interface::nx"] [:: std :: mem :: offset_of ! (starpu_block_interface , nx) - 32usize] ; ["Offset of field: starpu_block_interface::ny"] [:: std :: mem :: offset_of ! (starpu_block_interface , ny) - 36usize] ; ["Offset of field: starpu_block_interface::nz"] [:: std :: mem :: offset_of ! (starpu_block_interface , nz) - 40usize] ; ["Offset of field: starpu_block_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldy) - 44usize] ; ["Offset of field: starpu_block_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_block_interface , ldz) - 48usize] ; ["Offset of field: starpu_block_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_block_interface , elemsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_block_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Tensor Data Interface\n@{"] pub static mut starpu_interface_tensor_ops : starpu_data_interface_ops ; } # [doc = "Tensor interface for 4D dense tensors"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_tensor_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the tensor"] pub ptr : usize , # [doc = "< device handle of the tensor."] pub dev_handle : usize , # [doc = "< offset in the tensor."] pub offset : usize , # [doc = "< number of elements on the x-axis of the tensor."] pub nx : u32 , # [doc = "< number of elements on the y-axis of the tensor."] pub ny : u32 , # [doc = "< number of elements on the z-axis of the tensor."] pub nz : u32 , # [doc = "< number of elements on the t-axis of the tensor."] pub nt : u32 , # [doc = "< number of elements between two lines"] pub ldy : u32 , # [doc = "< number of elements between two planes"] pub ldz : u32 , # [doc = "< number of elements between two cubes"] pub ldt : u32 , # [doc = "< size of the elements of the tensor."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tensor_interface"] [:: std :: mem :: size_of :: < starpu_tensor_interface > () - 72usize] ; ["Alignment of starpu_tensor_interface"] [:: std :: mem :: align_of :: < starpu_tensor_interface > () - 8usize] ; ["Offset of field: starpu_tensor_interface::id"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , id) - 0usize] ; ["Offset of field: starpu_tensor_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ptr) - 8usize] ; ["Offset of field: starpu_tensor_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_tensor_interface::offset"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , offset) - 24usize] ; ["Offset of field: starpu_tensor_interface::nx"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nx) - 32usize] ; ["Offset of field: starpu_tensor_interface::ny"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ny) - 36usize] ; ["Offset of field: starpu_tensor_interface::nz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nz) - 40usize] ; ["Offset of field: starpu_tensor_interface::nt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , nt) - 44usize] ; ["Offset of field: starpu_tensor_interface::ldy"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldy) - 48usize] ; ["Offset of field: starpu_tensor_interface::ldz"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldz) - 52usize] ; ["Offset of field: starpu_tensor_interface::ldt"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , ldt) - 56usize] ; ["Offset of field: starpu_tensor_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_tensor_interface , elemsize) - 64usize] ; } ; impl Default for starpu_tensor_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nx x \\p ny x \\p nz x \\p nt 4D tensor of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldy,\n\\p ldz, and \\p ldt specify the number of elements between rows, between z planes and between t cubes.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *tensor;\nstarpu_data_handle_t tensor_handle;\ntensor = (float*)malloc(nx*ny*nz*nt*sizeof(float));\nstarpu_tensor_data_register(&tensor_handle, STARPU_MAIN_RAM, (uintptr_t)tensor, nx, nx*ny, nx*ny*nz, nx, ny, nz, nt, sizeof(float));\n\\endcode\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldy : u32 , ldz : u32 , ldt : u32 , nx : u32 , ny : u32 , nz : u32 , nt : u32 , elemsize : usize) ; } unsafe 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, and \\p ldt elements between t cubes."] pub fn starpu_tensor_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldy : u32 , ldz : u32 , ldt : u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on the x-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nx (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the y-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_ny (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the z-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the t-axis of the tensor\ndesignated by \\p handle."] pub fn starpu_tensor_get_nt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each row of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldy (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each z plane of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldz (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between each t cubes of the tensor\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_tensor_get_local_ldt (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_tensor_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the tensor designated by\n\\p handle."] pub fn starpu_tensor_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Ndim Array Data Interface\n@{"] pub static mut starpu_interface_ndim_ops : starpu_data_interface_ops ; } # [doc = "ndim interface for ndim array"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_ndim_interface { # [doc = "< identifier of the interface"] pub id : starpu_data_interface_id , # [doc = "< local pointer of the ndim"] pub ptr : usize , # [doc = "< device handle of the ndim."] pub dev_handle : usize , # [doc = "< offset in the ndim."] pub offset : usize , # [doc = "< size actually currently allocated."] pub allocsize : usize , # [doc = "< array of element number on each dimension"] pub nn : * mut u32 , # [doc = "< array of element number between two units on each dimension"] pub ldn : * mut u32 , # [doc = "< size of the dimension."] pub ndim : usize , # [doc = "< size of the elements of the ndim."] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_ndim_interface"] [:: std :: mem :: size_of :: < starpu_ndim_interface > () - 72usize] ; ["Alignment of starpu_ndim_interface"] [:: std :: mem :: align_of :: < starpu_ndim_interface > () - 8usize] ; ["Offset of field: starpu_ndim_interface::id"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , id) - 0usize] ; ["Offset of field: starpu_ndim_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ptr) - 8usize] ; ["Offset of field: starpu_ndim_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_ndim_interface::offset"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , offset) - 24usize] ; ["Offset of field: starpu_ndim_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , allocsize) - 32usize] ; ["Offset of field: starpu_ndim_interface::nn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , nn) - 40usize] ; ["Offset of field: starpu_ndim_interface::ldn"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ldn) - 48usize] ; ["Offset of field: starpu_ndim_interface::ndim"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , ndim) - 56usize] ; ["Offset of field: starpu_ndim_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_ndim_interface , elemsize) - 64usize] ; } ; impl Default for starpu_ndim_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 () } } } unsafe extern "C" { # [doc = "Register the \\p nn[0] x \\p nn[1] x ... \\p ndim-dimension matrix of \\p elemsize byte elements\npointed by \\p ptr and initialize \\p handle to represent it. Again, \\p ldn,\nspecifies the number of elements between two units on each dimension.\n\nHere an example of how to use the function.\n\\code{.c}\nfloat *ndim_arr;\nsize_t arrsize = 1;\nint i;\nfor (i = 0; i < ndim; i++)\narrsize = arrsize * nn[i];\nstarpu_data_handle_t ndim_handle;\nndim_arr = (float*)malloc(arrsize*sizeof(float));\nstarpu_ndim_data_register(&ndim_handle, STARPU_MAIN_RAM, (uintptr_t)ndim_arr, ldn, nn, ndim, sizeof(float));\n\\endcode\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_data_register (handleptr : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , ldn : * mut u32 , nn : * mut u32 , ndim : usize , elemsize : usize) ; } unsafe 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 ldn elements between two units on each dimension."] pub fn starpu_ndim_ptr_register (handle : starpu_data_handle_t , node : :: std :: os :: raw :: c_uint , ptr : usize , dev_handle : usize , offset : usize , ldn : * mut u32) ; } unsafe extern "C" { # [doc = "Return the number of elements on each dimension of the ndim array\ndesignated by \\p handle."] pub fn starpu_ndim_get_nn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements on the i-axis of the ndim array\ndesignated by \\p handle. When i=0, it means x-axis,\nwhen i=1, it means y-axis, when i=2, it means z-axis, etc."] pub fn starpu_ndim_get_ni (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units on each dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldn (handle : starpu_data_handle_t) -> * mut u32 ; } unsafe extern "C" { # [doc = "Return the number of elements between two units i-axis dimension of the ndim array\ndesignated by \\p handle, in the format of the current memory node."] pub fn starpu_ndim_get_local_ldi (handle : starpu_data_handle_t , i : usize) -> u32 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_ndim_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the dimension size."] pub fn starpu_ndim_get_ndim (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "Return the size of the elements of the ndim array designated by\n\\p handle."] pub fn starpu_ndim_get_elemsize (handle : starpu_data_handle_t) -> usize ; } unsafe extern "C" { # [doc = "@name Vector Data Interface\n@{"] pub static mut starpu_interface_vector_ops : starpu_data_interface_ops ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_vector_interface"] [:: std :: mem :: size_of :: < starpu_vector_interface > () - 64usize] ; ["Alignment of starpu_vector_interface"] [:: std :: mem :: align_of :: < starpu_vector_interface > () - 8usize] ; ["Offset of field: starpu_vector_interface::id"] [:: std :: mem :: offset_of ! (starpu_vector_interface , id) - 0usize] ; ["Offset of field: starpu_vector_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_vector_interface , ptr) - 8usize] ; ["Offset of field: starpu_vector_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_vector_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_vector_interface::offset"] [:: std :: mem :: offset_of ! (starpu_vector_interface , offset) - 24usize] ; ["Offset of field: starpu_vector_interface::nx"] [:: std :: mem :: offset_of ! (starpu_vector_interface , nx) - 32usize] ; ["Offset of field: starpu_vector_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , elemsize) - 40usize] ; ["Offset of field: starpu_vector_interface::slice_base"] [:: std :: mem :: offset_of ! (starpu_vector_interface , slice_base) - 48usize] ; ["Offset of field: starpu_vector_interface::allocsize"] [:: std :: mem :: offset_of ! (starpu_vector_interface , allocsize) - 56usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_vector_data_register, but additionally specifies which\nallocation size should be used instead of the initial nx*elemsize.\nSee \\ref VariableSizeDataInterface for more details."] 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) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the local pointer associated with \\p handle."] pub fn starpu_vector_get_local_ptr (handle : starpu_data_handle_t) -> usize ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_variable_interface"] [:: std :: mem :: size_of :: < starpu_variable_interface > () - 40usize] ; ["Alignment of starpu_variable_interface"] [:: std :: mem :: align_of :: < starpu_variable_interface > () - 8usize] ; ["Offset of field: starpu_variable_interface::id"] [:: std :: mem :: offset_of ! (starpu_variable_interface , id) - 0usize] ; ["Offset of field: starpu_variable_interface::ptr"] [:: std :: mem :: offset_of ! (starpu_variable_interface , ptr) - 8usize] ; ["Offset of field: starpu_variable_interface::dev_handle"] [:: std :: mem :: offset_of ! (starpu_variable_interface , dev_handle) - 16usize] ; ["Offset of field: starpu_variable_interface::offset"] [:: std :: mem :: offset_of ! (starpu_variable_interface , offset) - 24usize] ; ["Offset of field: starpu_variable_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_variable_interface , elemsize) - 32usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref VariableDataInterface for more details."] pub fn starpu_variable_data_register (handle : * mut starpu_data_handle_t , home_node : :: std :: os :: raw :: c_int , ptr : usize , size : usize) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "@name Void Data Interface\n@{"] pub static mut starpu_interface_void_ops : starpu_data_interface_ops ; } unsafe 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 void\ndata in read-write concurrently.\nSee \\ref DataHandlesHelpers for more details."] pub fn starpu_void_data_register (handle : * mut starpu_data_handle_t) ; } unsafe 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)] 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 = "< position of non-zero entries on the row (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< index (in nzval) of the first entry of the row (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). also useful when partitioning the matrix."] pub firstentry : u32 , # [doc = "< size of the elements of the matrix"] pub elemsize : usize , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_csr_interface"] [:: std :: mem :: size_of :: < starpu_csr_interface > () - 72usize] ; ["Alignment of starpu_csr_interface"] [:: std :: mem :: align_of :: < starpu_csr_interface > () - 8usize] ; ["Offset of field: starpu_csr_interface::id"] [:: std :: mem :: offset_of ! (starpu_csr_interface , id) - 0usize] ; ["Offset of field: starpu_csr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nnz) - 4usize] ; ["Offset of field: starpu_csr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nrow) - 8usize] ; ["Offset of field: starpu_csr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_csr_interface , nzval) - 16usize] ; ["Offset of field: starpu_csr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , colind) - 24usize] ; ["Offset of field: starpu_csr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_csr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_csr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_csr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_csr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_csr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_csr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_csr_interface , elemsize) - 64usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Register a CSR (Compressed Sparse Row Representation) sparse matrix.\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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)] 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 = "< array of nnz elements (stored in RAM)"] pub ram_colind : * mut u32 , # [doc = "< array of nrow+1 elements (stored in RAM)"] pub ram_rowptr : * mut u32 , # [doc = "< k for k-based indexing (0 or 1 usually). Also useful when partitioning 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bcsr_interface"] [:: std :: mem :: size_of :: < starpu_bcsr_interface > () - 80usize] ; ["Alignment of starpu_bcsr_interface"] [:: std :: mem :: align_of :: < starpu_bcsr_interface > () - 8usize] ; ["Offset of field: starpu_bcsr_interface::id"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , id) - 0usize] ; ["Offset of field: starpu_bcsr_interface::nnz"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nnz) - 4usize] ; ["Offset of field: starpu_bcsr_interface::nrow"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nrow) - 8usize] ; ["Offset of field: starpu_bcsr_interface::nzval"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , nzval) - 16usize] ; ["Offset of field: starpu_bcsr_interface::colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , colind) - 24usize] ; ["Offset of field: starpu_bcsr_interface::rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , rowptr) - 32usize] ; ["Offset of field: starpu_bcsr_interface::ram_colind"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_colind) - 40usize] ; ["Offset of field: starpu_bcsr_interface::ram_rowptr"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , ram_rowptr) - 48usize] ; ["Offset of field: starpu_bcsr_interface::firstentry"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , firstentry) - 56usize] ; ["Offset of field: starpu_bcsr_interface::r"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , r) - 60usize] ; ["Offset of field: starpu_bcsr_interface::c"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , c) - 64usize] ; ["Offset of field: starpu_bcsr_interface::elemsize"] [:: std :: mem :: offset_of ! (starpu_bcsr_interface , elemsize) - 72usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Return the number of rows in a block."] pub fn starpu_bcsr_get_r (handle : starpu_data_handle_t) -> u32 ; } unsafe extern "C" { # [doc = "Return the number of columns in a block."] pub fn starpu_bcsr_get_c (handle : starpu_data_handle_t) -> u32 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_data_interface_ops"] [:: std :: mem :: size_of :: < starpu_multiformat_data_interface_ops > () - 56usize] ; ["Alignment of starpu_multiformat_data_interface_ops"] [:: std :: mem :: align_of :: < starpu_multiformat_data_interface_ops > () - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_elemsize) - 0usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_elemsize) - 8usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_opencl_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_opencl_cl) - 16usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::opencl_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , opencl_to_cpu_cl) - 24usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_elemsize"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_elemsize) - 32usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cpu_to_cuda_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cpu_to_cuda_cl) - 40usize] ; ["Offset of field: starpu_multiformat_data_interface_ops::cuda_to_cpu_cl"] [:: std :: mem :: offset_of ! (starpu_multiformat_data_interface_ops , cuda_to_cpu_cl) - 48usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 hip_ptr : * mut :: std :: os :: raw :: c_void , pub opencl_ptr : * mut :: std :: os :: raw :: c_void , pub nx : u32 , pub ops : * mut starpu_multiformat_data_interface_ops , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_multiformat_interface"] [:: std :: mem :: size_of :: < starpu_multiformat_interface > () - 56usize] ; ["Alignment of starpu_multiformat_interface"] [:: std :: mem :: align_of :: < starpu_multiformat_interface > () - 8usize] ; ["Offset of field: starpu_multiformat_interface::id"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , id) - 0usize] ; ["Offset of field: starpu_multiformat_interface::cpu_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cpu_ptr) - 8usize] ; ["Offset of field: starpu_multiformat_interface::cuda_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , cuda_ptr) - 16usize] ; ["Offset of field: starpu_multiformat_interface::hip_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , hip_ptr) - 24usize] ; ["Offset of field: starpu_multiformat_interface::opencl_ptr"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , opencl_ptr) - 32usize] ; ["Offset of field: starpu_multiformat_interface::nx"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , nx) - 40usize] ; ["Offset of field: starpu_multiformat_interface::ops"] [:: std :: mem :: offset_of ! (starpu_multiformat_interface , ops) - 48usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref TheMultiformatInterface for more details."] 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().\nSee \\ref DefiningANewDataFilter for more details."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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\n- id 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
\n- nx, ny 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).
\n- ld for matrix interfaces are usually just\ncopied over: the leading dimension (ld) usually does not\nchange.
\n- elemsize is usually just copied over.
\n- ptr, the pointer to the data, has to be\ncomputed according to \\p i and the father's ptr, so\nas to point to the start of the sub data. This should\nhowever be done only if the father has ptr different\nfrom NULL: in the OpenCL case notably, the\ndev_handle and offset fields are used\ninstead.
\n- dev_handle should be just copied over from the\nparent.
\n- offset has to be computed according to \\p i and\nthe father's offset, so as to provide the offset of\nthe start of the sub data. This is notably used for the\nOpenCL case.\n
"] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_filter"] [:: std :: mem :: size_of :: < starpu_data_filter > () - 48usize] ; ["Alignment of starpu_data_filter"] [:: std :: mem :: align_of :: < starpu_data_filter > () - 8usize] ; ["Offset of field: starpu_data_filter::filter_func"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_func) - 0usize] ; ["Offset of field: starpu_data_filter::nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , nchildren) - 8usize] ; ["Offset of field: starpu_data_filter::get_nchildren"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_nchildren) - 16usize] ; ["Offset of field: starpu_data_filter::get_child_ops"] [:: std :: mem :: offset_of ! (starpu_data_filter , get_child_ops) - 24usize] ; ["Offset of field: starpu_data_filter::filter_arg"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg) - 32usize] ; ["Offset of field: starpu_data_filter::filter_arg_ptr"] [:: std :: mem :: offset_of ! (starpu_data_filter , filter_arg_ptr) - 40usize] ; } ; 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 () } } } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_partition (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_unpartition (root_data : starpu_data_handle_t , gathering_node : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the \\p i -th child of the given \\p handle, which must have\nbeen partitioned beforehand.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_child (handle : starpu_data_handle_t , i : :: std :: os :: raw :: c_uint) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Return the number of children \\p handle has been partitioned into.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_nb_children (handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref PartitioningData for more details."] pub fn starpu_data_get_sub_data (root_data : starpu_data_handle_t , depth : :: std :: os :: raw :: c_uint , ...) -> starpu_data_handle_t ; } unsafe extern "C" { # [doc = "Similar to starpu_data_get_sub_data() but use a \\c va_list for the\nparameter list.\nSee \\ref PartitioningData for more details."] 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 ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_vmap_filters (root_data : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_uint , pa : * mut va_list) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The pointer of the filter list \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_parray (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut * mut starpu_data_filter) ; } unsafe extern "C" { # [doc = "Apply \\p nfilters filters to the handle designated by \\p\nroot_handle recursively. The list of filter \\p filters\nof the type starpu_data_filter should be given.\nSee \\ref PartitioningData for more details."] pub fn starpu_data_map_filters_array (root_handle : starpu_data_handle_t , nfilters : :: std :: os :: raw :: c_int , filters : * mut starpu_data_filter) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_plan (initial_handle : starpu_data_handle_t , f : * mut starpu_data_filter , children : * mut starpu_data_handle_t) ; } unsafe 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\n\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_readonly_submit(), but allow to\nspecify the coherency to be used for the main data \\p initial_handle.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe extern "C" { # [doc = "Assume that a partitioning of \\p initial_handle has already been submitted\nin read-write mode through starpu_data_partition_submit(), and will downgrade\nthat partitioning into read-only mode for the \\p children, fetching data back to the \\p\ninitial_handle, and adding the necessary dependencies.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_readonly_downgrade_submit (initial_handle : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_partition_clean() but the root data will be\ngathered on the given node.\nSee \\ref AsynchronousPartitioning for more details."] pub fn starpu_data_partition_clean_node (root_data : starpu_data_handle_t , nparts : :: std :: os :: raw :: c_uint , children : * mut starpu_data_handle_t , gather_node : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Similar to starpu_data_unpartition_submit_sequential_consistency()\nbut allow to specify a callback function for the unpartitiong task.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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.\nSee \\ref AsynchronousPartitioning for more details."] 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) ; } unsafe 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().\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the number of children obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] pub fn starpu_bcsr_filter_canonical_block_get_nchildren (f : * mut starpu_data_filter , handle : starpu_data_handle_t) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_bcsr_filter_canonical_block().\nSee \\ref BCSRDataInterface for more details."] 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 ; } unsafe 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.\n\nSee \\ref BCSRDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block-sparse matrix into vertical block-sparse matrices.\n\nSee \\ref CSRDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the x dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a dense Matrix along the y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT: 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\n\nSee \\ref MatrixDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a matrix along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_vector.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_vector_y().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a matrix. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_matrix_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fmatrix_pick_variable.c\n\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_matrix_filter_pick_variable().\nSee \\ref MatrixDataInterface for more details."] pub fn starpu_matrix_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr, thus getting a vector\nof size (n-2*shadow)/nparts+2*shadow. The starpu_data_filter::filter_arg_ptr field\nof \\p f must be the shadow size casted into \\c void*.\n\nIMPORTANT: 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\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe 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 starpu_data_filter::filter_arg_ptr field of \\p f. The\nstarpu_data_filter::filter_arg_ptr 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.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Return in \\p child_interface the \\p id th element of the vector\nrepresented by \\p father_interface once partitioned in 2 chunks of\nequal size, ignoring nparts. Thus, \\p id must be 0 or 1.\n\nSee \\ref VectorDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a vector. The starting\nposition is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_vector_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fvector_pick_variable.c\n\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_vector_filter_pick_variable().\nSee \\ref VectorDataInterface for more details."] pub fn starpu_vector_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe 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.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Partition a block along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, 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\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref BlockDataInterface for more details."] 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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a block along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_matrix.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_matrix_z()\nand starpu_block_filter_pick_matrix_y().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a block. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_block_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fblock_pick_variable.c\n\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_block_filter_pick_variable().\nSee \\ref BlockDataInterface for more details."] pub fn starpu_block_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, thus getting\n(x/\\p nparts ,y,z,t) tensors. If \\p nparts does not divide x, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the X dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n((x-2*shadow)/\\p nparts +2*shadow,y,z,t) tensors. If \\p nparts does not\ndivide x, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, thus getting\n(x,y/\\p nparts ,z,t) tensors. If \\p nparts does not divide y, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Y dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,(y-2*shadow)/\\p nparts +2*shadow,z,t) tensors. If \\p nparts does not\ndivide y, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, thus getting\n(x,y,z/\\p nparts,t) tensors. If \\p nparts does not divide z, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the Z dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,(z-2*shadow)/\\p nparts +2*shadow,t) tensors. If \\p nparts does not\ndivide z, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, thus getting\n(x,y,z,t/\\p nparts) tensors. If \\p nparts does not divide t, the last\nsubmatrix contains the remainder.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Partition a tensor along the T dimension, with a\nshadow border starpu_data_filter::filter_arg_ptr, thus getting\n(x,y,z,(t-2*shadow)/\\p nparts +2*shadow) tensors. If \\p nparts does not\ndivide t, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_time_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe T dimension. The starting position on T-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_t (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Z dimension. The starting position on Z-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_z (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a tensor along\nthe Y dimension. The starting position on Y-axis is set in\nstarpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_block.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_y (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_block_t(),\nstarpu_tensor_filter_pick_block_z() and starpu_tensor_filter_pick_block_y().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a tensor. The starting position\nis set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_tensor_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/ftensor_pick_variable.c\n\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_tensor_filter_pick_variable().\nSee \\ref TensorDataInterface for more details."] pub fn starpu_tensor_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a ndim array along the given dimension set in\nstarpu_data_filter::filter_arg, with a shadow border\nstarpu_data_filter::filter_arg_ptr. If \\p nparts does not\ndivide the element number on dimension, the last submatrix contains the remainder.\n\nIMPORTANT:\nThis can only be used for read-only access, as no coherency is\nenforced for the shadowed parts.\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_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) ; } unsafe extern "C" { # [doc = "Partition a 4-dim array into \\p nparts tensors along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_to_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor (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) ; } unsafe extern "C" { # [doc = "Partition a 3-dim array into \\p nparts blocks along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_block_child_ops(). A usage example is\navailable in examples/filters/fndim_to_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_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) ; } unsafe extern "C" { # [doc = "Partition a 2-dim array into \\p nparts matrices along the given\ndimension set in starpu_data_filter::filter_arg.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_to_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix (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) ; } unsafe extern "C" { # [doc = "Partition a 1-dim array into \\p nparts vectors.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_to_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector (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) ; } unsafe extern "C" { # [doc = "Transfer a 0-dim array to a variable.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_to_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_to_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous (n-1)dim arrays from a ndim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nA usage example is available in examples/filters/fndim_pick_ndim.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_ndim (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous tensors from a 5-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_tensor_child_ops(). A usage example is\navailable in examples/filters/fndim_5d_pick_tensor.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_5d_pick_tensor (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous blocks from a 4-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_block_child_ops(). A usage example is\navailable in examples/filters/fndim_4d_pick_block.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_4d_pick_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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous matrices from a 3-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_matrix_child_ops(). A usage example is\navailable in examples/filters/fndim_3d_pick_matrix.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_3d_pick_matrix (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous vectors from a 2-dim array along\nthe given dimension set in starpu_data_filter::filter_arg.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_vector_child_ops(). A usage example is\navailable in examples/filters/fndim_2d_pick_vector.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_2d_pick_vector (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a 1-dim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_1d_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_1d_pick_variable (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) ; } unsafe extern "C" { # [doc = "Pick \\p nparts contiguous variables from a ndim array.\nThe starting position is set in starpu_data_filter::filter_arg_ptr.\n\nstarpu_data_filter::get_child_ops needs to be set to\nstarpu_ndim_filter_pick_variable_child_ops(). A usage example is\navailable in examples/filters/fndim_pick_variable.c\n\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable (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) ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_pick_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_pick_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_tensor().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_tensor_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_block().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_block_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_matrix().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_matrix_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_vector().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_vector_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe extern "C" { # [doc = "Return the child_ops of the partition obtained with starpu_ndim_filter_to_variable().\nSee \\ref NdimDataInterface for more details."] pub fn starpu_ndim_filter_to_variable_child_ops (f : * mut starpu_data_filter , child : :: std :: os :: raw :: c_uint) -> * mut starpu_data_interface_ops ; } unsafe 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 blocksize, which is most often 1.\nSee \\ref DefiningANewDataFilter for more details."] 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 , blocksize : :: std :: os :: raw :: c_uint , chunk_size : * mut :: std :: os :: raw :: c_uint , offset : * mut usize) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_align (align : usize) ; } unsafe 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_noflag() function.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc (A : * mut * mut :: std :: os :: raw :: c_void , dim : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "@deprecated\nFree memory which has previously been allocated with\nstarpu_malloc(). This function is deprecated, one should use\nstarpu_free_noflag().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free (A : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Perform a memory allocation based on the constraints defined by the\ngiven flag.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] 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 ; } unsafe extern "C" { # [doc = "Free memory by specifying its size. Should be used for memory\nallocated with starpu_malloc().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_free_noflag (A : * mut :: std :: os :: raw :: c_void , dim : usize) -> :: 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 > ; unsafe 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().\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_malloc_set_hooks (malloc_hook : starpu_malloc_hook , free_hook : starpu_free_hook) ; } unsafe 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.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_pin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Unpin the given memory area previously pinned with\nstarpu_memory_pin(). Return 0 on success, -1 on error.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_unpin (addr : * mut :: std :: os :: raw :: c_void , size : usize) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_total (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_get_available (node : :: std :: os :: raw :: c_uint) -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on the node.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used (node : :: std :: os :: raw :: c_uint) -> usize ; } unsafe extern "C" { # [doc = "Return the amount of total memory on all memory nodes for whose a\nmemory limit is defined (see Section \\ref DataManagementAllocation)."] pub fn starpu_memory_get_total_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of available memory on all memory nodes for whose\na memory limit is defined (see Section \\ref\nDataManagementAllocation)."] pub fn starpu_memory_get_available_all_nodes () -> starpu_ssize_t ; } unsafe extern "C" { # [doc = "Return the amount of used memory on all memory nodes.\nSee \\ref DataManagementAllocation for more details."] pub fn starpu_memory_get_used_all_nodes () -> usize ; } unsafe 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 -ENOMEM 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_allocate (node : :: std :: os :: raw :: c_uint , size : usize , flags : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_deallocate (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe 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.\nSee \\ref HowToLimitMemoryPerNode for more details."] pub fn starpu_memory_wait_available (node : :: std :: os :: raw :: c_uint , size : usize) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_sec seconds. Similar to calling Unix' \\c\nsleep function, except that it takes a float to allow sub-second\nsleeping, and when StarPU is compiled in SimGrid mode it does not\nreally sleep but just makes SimGrid record that the thread has\ntaken some time to sleep.\nSee \\ref Helpers for more details."] pub fn starpu_sleep (nb_sec : f32) ; } unsafe extern "C" { # [doc = "Sleep for the given \\p nb_micro_sec micro-seconds.\nIn simgrid mode, this only sleeps within virtual time.\nSee \\ref Helpers for more details."] pub fn starpu_usleep (nb_micro_sec : f32) ; } unsafe extern "C" { # [doc = "Account for \\p joules J being used.\nThis is support in simgrid mode, to record how much energy was used, and will\nshow up in further call to starpu_energy_used().\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_use (joules : f32) ; } unsafe extern "C" { # [doc = "Return the amount of energy having been used in J.\nThis account the amounts passed to starpu_energy_use(), but also the static\nenergy use set by the \\ref STARPU_IDLE_POWER environment variable.\nSee \\ref Energy-basedScheduling fore more details."] pub fn starpu_energy_used () -> f64 ; } # [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 ; unsafe 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) ; } unsafe 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 -EPERM, if\n\\p task was already submitted it returns -EINVAL."] pub fn starpu_task_bundle_insert (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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-ENOENT."] pub fn starpu_task_bundle_remove (bundle : starpu_task_bundle_t , task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps_array (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , task_array : * mut [* mut starpu_task ; 0usize]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] 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]) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_declare_end_deps (task : * mut starpu_task , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\nNULL 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref GettingTaskChildren for more details."] 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 ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_add (t : * mut starpu_task , nb_deps : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Unlock 1 end dependency to the task \\p t. This function must be\ncalled after starpu_task_end_dep_add().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_task_end_dep_release (t : * mut starpu_task) ; } # [doc = "Define a task logical identifier. It is possible to associate a task\nwith a unique tag 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 ; unsafe 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\nWARNING! Use with caution. 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\n0x200000003 instead of 0x2 and 0x3 when\ncalling starpu_tag_declare_deps(0x1, 2, 0x2, 0x3). 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , ...) ; } unsafe 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\n\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_declare_deps_array (id : starpu_tag_t , ndeps : :: std :: os :: raw :: c_uint , array : * mut starpu_tag_t) ; } unsafe 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 structure starpu_task was freed (e.g. if the field\nstarpu_task::destroy was enabled).\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait (id : starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_tag_wait_array (ntags : :: std :: os :: raw :: c_uint , id : * mut starpu_tag_t) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Clear the already notified 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_restart (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_remove (id : starpu_tag_t) ; } unsafe 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().\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_from_apps (id : starpu_tag_t) ; } unsafe 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.\nSee \\ref TasksAndTagsDependencies for more details."] pub fn starpu_tag_notify_restart_from_apps (id : starpu_tag_t) ; } unsafe extern "C" { # [doc = "Return the task associated to the tag \\p id.\nSee \\ref TasksAndTagsDependencies for more details."] 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 submitted, 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 ; # [doc = "todo"] 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 = "HIP implementation of a codelet."] pub type starpu_hip_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 = "Maxeler FPGA implementation of a codelet."] pub type starpu_max_fpga_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 = "@ingroup API_Bubble Hierarchical Dags\nBubble decision function"] pub type starpu_bubble_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > ; # [doc = "@ingroup API_Bubble Hierarchical Dags\nBubble DAG generation function"] pub type starpu_bubble_gen_dag_func_t = :: std :: option :: Option < unsafe extern "C" fn (t : * mut starpu_task , arg : * mut :: std :: os :: raw :: c_void) > ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_transaction { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _starpu_trs_epoch { _unused : [u8 ; 0] , } pub type starpu_trs_epoch_t = * mut _starpu_trs_epoch ; # [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.\n\nNote that the codelet structure needs to exist until the task is\nterminated. If dynamic codelet allocation is desired, release should be done\nno sooner than the starpu_task::callback_func callback time.\n\nIf the application wants to make the structure constant, it needs to be\nfilled exactly as StarPU expects:\n\n- starpu_codelet::cpu_funcs, starpu_codelet::cuda_funcs, etc. must be used instead\nof the deprecated starpu_codelet::cpu_func, starpu_codelet::cuda_func, etc.\n\n- the starpu_codelet::where field must be set.\n\nand additionally, starpu_codelet::checked must be set to 1 to tell StarPU\nthat the conditions above are properly met. Also, the \\ref\nSTARPU_CODELET_PROFILING environment variable must be set to 0.\nAn example is provided in tests/main/const_codelet.c"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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_HIP, ::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-NULL 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-NULL 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 HIP\nimplementations of the codelet. The functions must be\nhost-functions written in the HIP runtime API. Their\nprototype must be:\n\\code{.c}\nvoid hip_func(void *buffers[], void *cl_arg)\n\\endcode\nIf the field starpu_codelet::where is set, then the field\nstarpu_codelet::hip_funcs is ignored if ::STARPU_HIP does\nnot appear in the field starpu_codelet::where, it must be\nnon-NULL otherwise."] pub hip_funcs : [starpu_hip_func_t ; 4usize] , # [doc = "Optional array of flags for HIP execution. They specify\nsome semantic details about HIP kernel execution, such as\nasynchronous execution."] pub hip_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-NULL 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 the Maxeler FPGA\nimplementations of the codelet. The functions prototype\nmust be:\n\\code{.c}\nvoid fpga_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 starpu_codelet::max_fpga_funcs is ignored if\n::STARPU_MAX_FPGA does not appear in the field\nstarpu_codelet::where, it must be non-NULL otherwise."] pub max_fpga_funcs : [starpu_max_fpga_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\nMPI MS devices for StarPU to simply look\nup the MPI MS function implementation through its name."] pub cpu_funcs_name : [* const :: std :: os :: raw :: c_char ; 4usize] , # [doc = "Optional function to decide if the task is to be\ntransformed into a bubble"] pub bubble_func : starpu_bubble_func_t , # [doc = "Optional function to transform the task into a new graph"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "Specify the number of arguments taken by the codelet. These\narguments are managed by the DSM and are accessed from the\nvoid *buffers[] 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 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,\nand should not exceed \\ref STARPU_NMAXBUFS. If\ninsufficient, 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\ndata 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 data 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 NULL 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 (in J). This optional field is\nignored when set to NULL 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 ; 48usize] , # [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. Value 0 acts like if this field wasn't specified.\nColor representation is hex triplet (for example: 0xff0000 is red,\n0x0000ff is blue, 0xffa500 is orange, ...)."] pub color : :: std :: os :: raw :: c_uint , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL."] 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 , pub perf_counter_sample : * mut starpu_perf_counter_sample , pub perf_counter_values : * mut starpu_perf_counter_sample_cl_values , # [doc = "Whether _starpu_codelet_check_deprecated_fields was already done or not."] pub checked : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet"] [:: std :: mem :: size_of :: < starpu_codelet > () - 832usize] ; ["Alignment of starpu_codelet"] [:: std :: mem :: align_of :: < starpu_codelet > () - 8usize] ; ["Offset of field: starpu_codelet::where_"] [:: std :: mem :: offset_of ! (starpu_codelet , where_) - 0usize] ; ["Offset of field: starpu_codelet::can_execute"] [:: std :: mem :: offset_of ! (starpu_codelet , can_execute) - 8usize] ; ["Offset of field: starpu_codelet::type_"] [:: std :: mem :: offset_of ! (starpu_codelet , type_) - 16usize] ; ["Offset of field: starpu_codelet::max_parallelism"] [:: std :: mem :: offset_of ! (starpu_codelet , max_parallelism) - 20usize] ; ["Offset of field: starpu_codelet::cpu_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_func) - 24usize] ; ["Offset of field: starpu_codelet::cuda_func"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_func) - 32usize] ; ["Offset of field: starpu_codelet::opencl_func"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_func) - 40usize] ; ["Offset of field: starpu_codelet::cpu_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs) - 48usize] ; ["Offset of field: starpu_codelet::cuda_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_funcs) - 80usize] ; ["Offset of field: starpu_codelet::cuda_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , cuda_flags) - 112usize] ; ["Offset of field: starpu_codelet::hip_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_funcs) - 120usize] ; ["Offset of field: starpu_codelet::hip_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , hip_flags) - 152usize] ; ["Offset of field: starpu_codelet::opencl_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_funcs) - 160usize] ; ["Offset of field: starpu_codelet::opencl_flags"] [:: std :: mem :: offset_of ! (starpu_codelet , opencl_flags) - 192usize] ; ["Offset of field: starpu_codelet::max_fpga_funcs"] [:: std :: mem :: offset_of ! (starpu_codelet , max_fpga_funcs) - 200usize] ; ["Offset of field: starpu_codelet::cpu_funcs_name"] [:: std :: mem :: offset_of ! (starpu_codelet , cpu_funcs_name) - 232usize] ; ["Offset of field: starpu_codelet::bubble_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_func) - 264usize] ; ["Offset of field: starpu_codelet::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_codelet , bubble_gen_dag_func) - 272usize] ; ["Offset of field: starpu_codelet::nbuffers"] [:: std :: mem :: offset_of ! (starpu_codelet , nbuffers) - 280usize] ; ["Offset of field: starpu_codelet::modes"] [:: std :: mem :: offset_of ! (starpu_codelet , modes) - 284usize] ; ["Offset of field: starpu_codelet::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_modes) - 320usize] ; ["Offset of field: starpu_codelet::specific_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , specific_nodes) - 328usize] ; ["Offset of field: starpu_codelet::nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , nodes) - 332usize] ; ["Offset of field: starpu_codelet::dyn_nodes"] [:: std :: mem :: offset_of ! (starpu_codelet , dyn_nodes) - 368usize] ; ["Offset of field: starpu_codelet::model"] [:: std :: mem :: offset_of ! (starpu_codelet , model) - 376usize] ; ["Offset of field: starpu_codelet::energy_model"] [:: std :: mem :: offset_of ! (starpu_codelet , energy_model) - 384usize] ; ["Offset of field: starpu_codelet::per_worker_stats"] [:: std :: mem :: offset_of ! (starpu_codelet , per_worker_stats) - 392usize] ; ["Offset of field: starpu_codelet::name"] [:: std :: mem :: offset_of ! (starpu_codelet , name) - 776usize] ; ["Offset of field: starpu_codelet::color"] [:: std :: mem :: offset_of ! (starpu_codelet , color) - 784usize] ; ["Offset of field: starpu_codelet::callback_func"] [:: std :: mem :: offset_of ! (starpu_codelet , callback_func) - 792usize] ; ["Offset of field: starpu_codelet::flags"] [:: std :: mem :: offset_of ! (starpu_codelet , flags) - 800usize] ; ["Offset of field: starpu_codelet::perf_counter_sample"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_sample) - 808usize] ; ["Offset of field: starpu_codelet::perf_counter_values"] [:: std :: mem :: offset_of ! (starpu_codelet , perf_counter_values) - 816usize] ; ["Offset of field: starpu_codelet::checked"] [:: std :: mem :: offset_of ! (starpu_codelet , checked) - 824usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Codelet with empty function defined for all drivers"] pub static mut starpu_codelet_nop : starpu_codelet ; } # [doc = "Describe a data handle along with an access mode."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_data_descr { # [doc = "< data"] pub handle : starpu_data_handle_t , # [doc = "< access mode"] pub mode : starpu_data_access_mode , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_data_descr"] [:: std :: mem :: size_of :: < starpu_data_descr > () - 16usize] ; ["Alignment of starpu_data_descr"] [:: std :: mem :: align_of :: < starpu_data_descr > () - 8usize] ; ["Offset of field: starpu_data_descr::handle"] [:: std :: mem :: offset_of ! (starpu_data_descr , handle) - 0usize] ; ["Offset of field: starpu_data_descr::mode"] [:: std :: mem :: offset_of ! (starpu_data_descr , mode) - 8usize] ; } ; 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)] 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 = "Optional file name where the task was submitted. This can be useful\nfor debugging purposes."] pub file : * const :: std :: os :: raw :: c_char , # [doc = "Optional line number where the task was submitted. This can be useful\nfor debugging purposes."] pub line : :: std :: os :: raw :: c_int , # [doc = "Pointer to the corresponding structure starpu_codelet. This\ndescribes where the kernel should be executed, and supplies\nthe appropriate implementations. When set to NULL,\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 data 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\ndata 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 insufficient, 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 needed 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 insufficient,\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 NULL. 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 pointer which points to the return value of submitted task.\nThe default value is NULL. starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be used to respectively\npack and unpack the return value into and form it. starpu_task::cl_ret\ncan be used for MPI support. The only requirement is that\nthe size of the return value must be set in starpu_task::cl_ret_size ."] pub cl_ret : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field. The buffer of starpu_codelet_pack_arg()\nand starpu_codelet_unpack_arg() can be allocated with\nthe starpu_task::cl_ret_size bytes starting at address starpu_task::cl_ret.\nstarpu_task::cl_ret_size can be used for MPI support."] pub cl_ret_size : usize , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *) which\nspecifies a possible callback. If this pointer is non-NULL,\nthe callback function is executed on the host after the execution of\nthe task. Contrary to starpu_task::callback_func, it is called\nbefore releasing tasks which depend on this task, so those cannot be\nalready executing. The callback is passed\nthe value contained in the starpu_task::epilogue_callback_arg field.\nNo callback is executed if the field is set to NULL.\n\nWith starpu_task_insert() and alike this can be specified thanks to\n::STARPU_EPILOGUE_CALLBACK followed by the function pointer."] pub epilogue_callback_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) > , # [doc = "Optional field, the default value is NULL. This is\nthe pointer passed to the epilogue callback function. This field is\nignored if the field starpu_task::epilogue_callback_func is set to\nNULL."] pub epilogue_callback_arg : * mut :: std :: os :: raw :: c_void , # [doc = "Optional field, the default value is NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, the callback function is executed on the\nhost after the execution of the task. Contrary to\nstarpu_task::epilogue_callback, it is called after releasing\ntasks which depend on this task, so those\nmight 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 NULL.\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 NULL. This is\nthe pointer passed to the callback function. This field is\nignored if the field starpu_task::callback_func is set to\nNULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void *)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 NULL. This is a\nfunction pointer of prototype void (*f)(void*)\nwhich specifies a possible callback. If this pointer is\nnon-NULL, 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 NULL.\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 NULL. 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 NULL.\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 = "Transaction to which the task belongs, if any"] pub transaction : * mut starpu_transaction , # [doc = "Transaction epoch to which the task belongs, if any"] pub trs_epoch : starpu_trs_epoch_t , # [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 this task has failed and will thus have to be retried\n\nSet by StarPU."] pub failed : :: 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\nCall starpu_task_status_get_as_string() to get the status as a string.\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 NULL."] 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 starpu_perfmodel_plot, 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 in microseconds. 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 = "When using hierarchical dags, the job identifier of the\nbubble task which created the current task"] pub bubble_parent : :: std :: os :: raw :: c_ulong , # [doc = "When using hierarchical dags, a pointer to the bubble\ndecision function"] pub bubble_func : starpu_bubble_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble decision function"] pub bubble_func_arg : * mut :: std :: os :: raw :: c_void , # [doc = "When using hierarchical dags, a pointer to the bubble\nDAG generation function"] pub bubble_gen_dag_func : starpu_bubble_gen_dag_func_t , # [doc = "When using hierarchical dags, a pointer to an argument to\nbe given when calling the bubble DAG generation function"] pub bubble_gen_dag_func_arg : * mut :: std :: os :: raw :: c_void , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task"] [:: std :: mem :: size_of :: < starpu_task > () - 552usize] ; ["Alignment of starpu_task"] [:: std :: mem :: align_of :: < starpu_task > () - 8usize] ; ["Offset of field: starpu_task::name"] [:: std :: mem :: offset_of ! (starpu_task , name) - 0usize] ; ["Offset of field: starpu_task::file"] [:: std :: mem :: offset_of ! (starpu_task , file) - 8usize] ; ["Offset of field: starpu_task::line"] [:: std :: mem :: offset_of ! (starpu_task , line) - 16usize] ; ["Offset of field: starpu_task::cl"] [:: std :: mem :: offset_of ! (starpu_task , cl) - 24usize] ; ["Offset of field: starpu_task::where_"] [:: std :: mem :: offset_of ! (starpu_task , where_) - 32usize] ; ["Offset of field: starpu_task::nbuffers"] [:: std :: mem :: offset_of ! (starpu_task , nbuffers) - 36usize] ; ["Offset of field: starpu_task::dyn_handles"] [:: std :: mem :: offset_of ! (starpu_task , dyn_handles) - 40usize] ; ["Offset of field: starpu_task::dyn_interfaces"] [:: std :: mem :: offset_of ! (starpu_task , dyn_interfaces) - 48usize] ; ["Offset of field: starpu_task::dyn_modes"] [:: std :: mem :: offset_of ! (starpu_task , dyn_modes) - 56usize] ; ["Offset of field: starpu_task::handles"] [:: std :: mem :: offset_of ! (starpu_task , handles) - 64usize] ; ["Offset of field: starpu_task::interfaces"] [:: std :: mem :: offset_of ! (starpu_task , interfaces) - 128usize] ; ["Offset of field: starpu_task::modes"] [:: std :: mem :: offset_of ! (starpu_task , modes) - 192usize] ; ["Offset of field: starpu_task::handles_sequential_consistency"] [:: std :: mem :: offset_of ! (starpu_task , handles_sequential_consistency) - 224usize] ; ["Offset of field: starpu_task::cl_arg"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg) - 232usize] ; ["Offset of field: starpu_task::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_arg_size) - 240usize] ; ["Offset of field: starpu_task::cl_ret"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret) - 248usize] ; ["Offset of field: starpu_task::cl_ret_size"] [:: std :: mem :: offset_of ! (starpu_task , cl_ret_size) - 256usize] ; ["Offset of field: starpu_task::epilogue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_func) - 264usize] ; ["Offset of field: starpu_task::epilogue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , epilogue_callback_arg) - 272usize] ; ["Offset of field: starpu_task::callback_func"] [:: std :: mem :: offset_of ! (starpu_task , callback_func) - 280usize] ; ["Offset of field: starpu_task::callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , callback_arg) - 288usize] ; ["Offset of field: starpu_task::prologue_callback_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_func) - 296usize] ; ["Offset of field: starpu_task::prologue_callback_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_arg) - 304usize] ; ["Offset of field: starpu_task::prologue_callback_pop_func"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_func) - 312usize] ; ["Offset of field: starpu_task::prologue_callback_pop_arg"] [:: std :: mem :: offset_of ! (starpu_task , prologue_callback_pop_arg) - 320usize] ; ["Offset of field: starpu_task::transaction"] [:: std :: mem :: offset_of ! (starpu_task , transaction) - 328usize] ; ["Offset of field: starpu_task::trs_epoch"] [:: std :: mem :: offset_of ! (starpu_task , trs_epoch) - 336usize] ; ["Offset of field: starpu_task::tag_id"] [:: std :: mem :: offset_of ! (starpu_task , tag_id) - 344usize] ; ["Offset of field: starpu_task::mf_skip"] [:: std :: mem :: offset_of ! (starpu_task , mf_skip) - 354usize] ; ["Offset of field: starpu_task::failed"] [:: std :: mem :: offset_of ! (starpu_task , failed) - 355usize] ; ["Offset of field: starpu_task::scheduled"] [:: std :: mem :: offset_of ! (starpu_task , scheduled) - 356usize] ; ["Offset of field: starpu_task::prefetched"] [:: std :: mem :: offset_of ! (starpu_task , prefetched) - 357usize] ; ["Offset of field: starpu_task::workerid"] [:: std :: mem :: offset_of ! (starpu_task , workerid) - 360usize] ; ["Offset of field: starpu_task::workerorder"] [:: std :: mem :: offset_of ! (starpu_task , workerorder) - 364usize] ; ["Offset of field: starpu_task::workerids"] [:: std :: mem :: offset_of ! (starpu_task , workerids) - 368usize] ; ["Offset of field: starpu_task::workerids_len"] [:: std :: mem :: offset_of ! (starpu_task , workerids_len) - 376usize] ; ["Offset of field: starpu_task::priority"] [:: std :: mem :: offset_of ! (starpu_task , priority) - 380usize] ; ["Offset of field: starpu_task::status"] [:: std :: mem :: offset_of ! (starpu_task , status) - 384usize] ; ["Offset of field: starpu_task::magic"] [:: std :: mem :: offset_of ! (starpu_task , magic) - 388usize] ; ["Offset of field: starpu_task::type_"] [:: std :: mem :: offset_of ! (starpu_task , type_) - 392usize] ; ["Offset of field: starpu_task::color"] [:: std :: mem :: offset_of ! (starpu_task , color) - 396usize] ; ["Offset of field: starpu_task::sched_ctx"] [:: std :: mem :: offset_of ! (starpu_task , sched_ctx) - 400usize] ; ["Offset of field: starpu_task::hypervisor_tag"] [:: std :: mem :: offset_of ! (starpu_task , hypervisor_tag) - 404usize] ; ["Offset of field: starpu_task::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_task , possibly_parallel) - 408usize] ; ["Offset of field: starpu_task::bundle"] [:: std :: mem :: offset_of ! (starpu_task , bundle) - 416usize] ; ["Offset of field: starpu_task::profiling_info"] [:: std :: mem :: offset_of ! (starpu_task , profiling_info) - 424usize] ; ["Offset of field: starpu_task::flops"] [:: std :: mem :: offset_of ! (starpu_task , flops) - 432usize] ; ["Offset of field: starpu_task::predicted"] [:: std :: mem :: offset_of ! (starpu_task , predicted) - 440usize] ; ["Offset of field: starpu_task::predicted_transfer"] [:: std :: mem :: offset_of ! (starpu_task , predicted_transfer) - 448usize] ; ["Offset of field: starpu_task::predicted_start"] [:: std :: mem :: offset_of ! (starpu_task , predicted_start) - 456usize] ; ["Offset of field: starpu_task::prev"] [:: std :: mem :: offset_of ! (starpu_task , prev) - 464usize] ; ["Offset of field: starpu_task::next"] [:: std :: mem :: offset_of ! (starpu_task , next) - 472usize] ; ["Offset of field: starpu_task::starpu_private"] [:: std :: mem :: offset_of ! (starpu_task , starpu_private) - 480usize] ; ["Offset of field: starpu_task::omp_task"] [:: std :: mem :: offset_of ! (starpu_task , omp_task) - 488usize] ; ["Offset of field: starpu_task::bubble_parent"] [:: std :: mem :: offset_of ! (starpu_task , bubble_parent) - 496usize] ; ["Offset of field: starpu_task::bubble_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func) - 504usize] ; ["Offset of field: starpu_task::bubble_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_func_arg) - 512usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func) - 520usize] ; ["Offset of field: starpu_task::bubble_gen_dag_func_arg"] [:: std :: mem :: offset_of ! (starpu_task , bubble_gen_dag_func_arg) - 528usize] ; ["Offset of field: starpu_task::nb_termination_call_required"] [:: std :: mem :: offset_of ! (starpu_task , nb_termination_call_required) - 536usize] ; ["Offset of field: starpu_task::sched_data"] [:: std :: mem :: offset_of ! (starpu_task , sched_data) - 544usize] ; } ; 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 unsafe fn cl_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 0usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 0usize , 1u8 , val as u64 ,) } } # [inline] pub fn cl_ret_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (1usize , 1u8) as u32) } } # [inline] pub fn set_cl_ret_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 unsafe fn cl_ret_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 1usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_cl_ret_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 1usize , 1u8 , val as u64 ,) } } # [inline] pub fn 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_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 unsafe fn callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 2usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 2usize , 1u8 , val as u64 ,) } } # [inline] pub fn epilogue_callback_arg_free (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (3usize , 1u8) as u32) } } # [inline] pub fn set_epilogue_callback_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 unsafe fn epilogue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 3usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_epilogue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 3usize , 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 (4usize , 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 (4usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 4usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 4usize , 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 (5usize , 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 (5usize , 1u8 , val as u64) } } # [inline] pub unsafe fn prologue_callback_pop_arg_free_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 5usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_prologue_callback_pop_arg_free_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 5usize , 1u8 , val as u64 ,) } } # [inline] pub fn use_tag (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (6usize , 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 (6usize , 1u8 , val as u64) } } # [inline] pub unsafe fn use_tag_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 6usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_use_tag_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 6usize , 1u8 , val as u64 ,) } } # [inline] pub fn sequential_consistency (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (7usize , 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 (7usize , 1u8 , val as u64) } } # [inline] pub unsafe fn sequential_consistency_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 7usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_sequential_consistency_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 7usize , 1u8 , val as u64 ,) } } # [inline] pub fn synchronous (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (8usize , 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 (8usize , 1u8 , val as u64) } } # [inline] pub unsafe fn synchronous_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 8usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_synchronous_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 8usize , 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 (9usize , 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 (9usize , 1u8 , val as u64) } } # [inline] pub unsafe fn execute_on_a_specific_worker_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 9usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_execute_on_a_specific_worker_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 9usize , 1u8 , val as u64 ,) } } # [inline] pub fn detach (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (10usize , 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 (10usize , 1u8 , val as u64) } } # [inline] pub unsafe fn detach_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 10usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_detach_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 10usize , 1u8 , val as u64 ,) } } # [inline] pub fn destroy (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (11usize , 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 (11usize , 1u8 , val as u64) } } # [inline] pub unsafe fn destroy_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 11usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_destroy_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 11usize , 1u8 , val as u64 ,) } } # [inline] pub fn regenerate (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (12usize , 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 (12usize , 1u8 , val as u64) } } # [inline] pub unsafe fn regenerate_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 12usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_regenerate_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 12usize , 1u8 , val as u64 ,) } } # [inline] pub fn no_submitorder (& self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (13usize , 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 (13usize , 1u8 , val as u64) } } # [inline] pub unsafe fn no_submitorder_raw (this : * const Self) -> :: std :: os :: raw :: c_uint { unsafe { :: std :: mem :: transmute (< __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_get (:: std :: ptr :: addr_of ! ((* this) . _bitfield_1) , 13usize , 1u8 ,) as u32) } } # [inline] pub unsafe fn set_no_submitorder_raw (this : * mut Self , val : :: std :: os :: raw :: c_uint) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; < __BindgenBitfieldUnit < [u8 ; 2usize] > > :: raw_set (:: std :: ptr :: addr_of_mut ! ((* this) . _bitfield_1) , 13usize , 1u8 , val as u64 ,) } } # [inline] pub fn new_bitfield_1 (cl_arg_free : :: std :: os :: raw :: c_uint , cl_ret_free : :: std :: os :: raw :: c_uint , callback_arg_free : :: std :: os :: raw :: c_uint , epilogue_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 cl_ret_free : u32 = unsafe { :: std :: mem :: transmute (cl_ret_free) } ; cl_ret_free as u64 }) ; __bindgen_bitfield_unit . set (2usize , 1u8 , { let callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (callback_arg_free) } ; callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (3usize , 1u8 , { let epilogue_callback_arg_free : u32 = unsafe { :: std :: mem :: transmute (epilogue_callback_arg_free) } ; epilogue_callback_arg_free as u64 }) ; __bindgen_bitfield_unit . set (4usize , 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 (5usize , 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 (6usize , 1u8 , { let use_tag : u32 = unsafe { :: std :: mem :: transmute (use_tag) } ; use_tag as u64 }) ; __bindgen_bitfield_unit . set (7usize , 1u8 , { let sequential_consistency : u32 = unsafe { :: std :: mem :: transmute (sequential_consistency) } ; sequential_consistency as u64 }) ; __bindgen_bitfield_unit . set (8usize , 1u8 , { let synchronous : u32 = unsafe { :: std :: mem :: transmute (synchronous) } ; synchronous as u64 }) ; __bindgen_bitfield_unit . set (9usize , 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 (10usize , 1u8 , { let detach : u32 = unsafe { :: std :: mem :: transmute (detach) } ; detach as u64 }) ; __bindgen_bitfield_unit . set (11usize , 1u8 , { let destroy : u32 = unsafe { :: std :: mem :: transmute (destroy) } ; destroy as u64 }) ; __bindgen_bitfield_unit . set (12usize , 1u8 , { let regenerate : u32 = unsafe { :: std :: mem :: transmute (regenerate) } ; regenerate as u64 }) ; __bindgen_bitfield_unit . set (13usize , 1u8 , { let no_submitorder : u32 = unsafe { :: std :: mem :: transmute (no_submitorder) } ; no_submitorder as u64 }) ; __bindgen_bitfield_unit } } unsafe 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.\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_init (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref PerformanceModelCalibration for more details."] pub fn starpu_task_clean (task : * mut starpu_task) ; } unsafe 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().\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_create () -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Allocate a task structure that does nothing but accesses data \\p handle\nwith mode \\p mode. This allows to synchronize with the task graph, according\nto the sequential consistency, against tasks submitted before or after\nsubmitting this task. One can then use starpu_task_declare_deps_array() or\nstarpu_task_end_dep_add() / starpu_task_end_dep_release() to add dependencies\nagainst this task before submitting it.\nSee \\ref SynchronizationTasks for more details."] pub fn starpu_task_create_sync (handle : starpu_data_handle_t , mode : starpu_data_access_mode) -> * mut starpu_task ; } unsafe 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.\nSee \\ref Per-taskFeedback and \\ref PerformanceModelExample for more details."] pub fn starpu_task_destroy (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Tell StarPU to free the resources associated with \\p task when the task is\nover. This is equivalent to having set task->destroy = 1 before submission,\nthe difference is that this can be called after submission and properly deals\nwith concurrency with the task execution.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_set_destroy (task : * mut starpu_task) ; } unsafe 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-ENODEV 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_submit (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Submit \\p task to StarPU with dependency bypass.\n\nThis can only be called on behalf of another task which has already taken the\nproper dependencies, e.g. this task is just an attempt of doing the actual\ncomputation of that task.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_submit_nodeps (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingTasksToAContext for more details."] pub fn starpu_task_submit_to_ctx (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if \\p task is terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_finished (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe 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, -EINVAL indicates that the\nspecified task was either synchronous or detached.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Allow to wait for an array of tasks. Upon successful completion,\nthis function returns 0. Otherwise, -EINVAL indicates that\none of the tasks was either synchronous or detached.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_array (tasks : * mut * mut starpu_task , nb_tasks : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SubmittingATask for more details."] pub fn starpu_task_wait_for_all () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref HowtoReuseMemory for more details."] pub fn starpu_task_wait_for_n_submitted (n : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait until all the tasks that were already submitted to the context\n\\p sched_ctx_id have been terminated.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_all_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] 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 ; } unsafe extern "C" { # [doc = "Wait until there is no more ready task.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_wait_for_no_ready () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nready () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of submitted tasks which have not completed yet.\nSee \\ref WaitingForTasks for more details."] pub fn starpu_task_nsubmitted () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_push (iteration : :: std :: os :: raw :: c_ulong) ; } unsafe 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.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_iteration_pop () ; } unsafe extern "C" { # [doc = "See \\ref GraphScheduling for more details."] pub fn starpu_do_schedule () ; } unsafe 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++.\nSee \\ref DefiningACodelet for more details."] pub fn starpu_codelet_init (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Output on \\c stderr some statistics on the codelet \\p cl.\nSee \\ref Per-codeletFeedback for more details."] pub fn starpu_codelet_display_stats (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Return the task currently executed by the worker, or NULL 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.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_task_get_current () -> * mut starpu_task ; } unsafe 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.\n\nSee \\ref SpecifyingATargetNode for more details."] pub fn starpu_task_get_current_data_node (i : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the name of the performance model of \\p task.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_get_model_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe 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.\nSee \\ref TraceTaskDetails for more details."] pub fn starpu_task_get_name (task : * mut starpu_task) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Allocate a task structure which is the exact duplicate of \\p task.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_dup (task : * mut starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "This function should be called by schedulers to specify the\ncodelet implementation to be executed when executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_set_implementation (task : * mut starpu_task , impl_ : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Return the codelet implementation to be executed\nwhen executing \\p task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_get_implementation (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Create and submit an empty task that unlocks a tag once all its\ndependencies are fulfilled.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Create and submit an empty task with the given callback.\nSee \\ref SynchronizationTasks for more details."] 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) ; } unsafe extern "C" { # [doc = "Function to be used as a prologue callback to enable fault tolerance for the\ntask. This prologue will create a try-task, i.e a duplicate of the task,\nwhich will to the actual computation.\n\nThe prologue argument can be set to a check_ft function that will be\ncalled on termination of the duplicate, which can check the result of the\ntask, and either confirm success, or resubmit another attempt.\nIf it is not set, the default implementation is to just resubmit a new\ntry-task.\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_prologue (check_ft : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Create a try-task for a \\p meta_task, given a \\p template_task task\ntemplate. The meta task can be passed as template on the first call, but\nsince it is mangled by starpu_task_ft_create_retry(), further calls\n(typically made by the check_ft callback) need to be passed the previous\ntry-task as template task.\n\n\\p check_ft is similar to the prologue argument of\nstarpu_task_ft_prologue(), and is typically set to the very function calling\nstarpu_task_ft_create_retry().\n\nThe try-task is returned, and can be modified (e.g. to change scheduling\nparameters) before being submitted with starpu_task_submit_nodeps().\n\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_create_retry (meta_task : * const starpu_task , template_task : * const starpu_task , check_ft : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut :: std :: os :: raw :: c_void) >) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Record that this task failed, and should thus be retried.\nThis is usually called from the task codelet function itself, after checking\nthe result and noticing that the computation went wrong, and thus the task\nshould be retried. The performance of this task execution will not be\nrecorded for performance models.\n\nThis can only be called for a task whose data access modes are either\n::STARPU_R and ::STARPU_W."] pub fn starpu_task_ft_failed (task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Notify that the try-task was successful and thus the meta-task was\nsuccessful.\nSee \\ref TaskRetry for more details."] pub fn starpu_task_ft_success (meta_task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Set the function to call when the watchdog detects that StarPU has\nnot finished any task for \\ref STARPU_WATCHDOG_TIMEOUT seconds.\nSee \\ref WatchdogSupport for more details."] 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) ; } unsafe extern "C" { # [doc = "Return the given status as a string"] pub fn starpu_task_status_get_as_string (status : starpu_task_status) -> * mut :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Specify a minimum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MIN_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_min_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Specify a maximum number of submitted tasks allowed at a given\ntime, this allows to control the task submission flow. The value\ncan also be specified with the environment variable \\ref\nSTARPU_LIMIT_MAX_SUBMITTED_TASKS.\nSee \\ref HowToReduceTheMemoryFootprintOfInternalDataStructures for more details."] pub fn starpu_set_limit_max_submitted_tasks (limit_min : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Function to open a new transaction object and start the first transaction epoch.\n\n@return A pointer to an initializes struct starpu_transaction\nor \\c NULL if submitting the transaction begin task failed with \\c ENODEV.\nSee \\ref TransactionsCreation for more details."] pub fn starpu_transaction_open (do_start_func : :: std :: option :: Option < unsafe extern "C" fn (buffer : * mut :: std :: os :: raw :: c_void , arg : * mut :: std :: os :: raw :: c_void) -> :: std :: os :: raw :: c_int > , do_start_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_transaction ; } unsafe extern "C" { # [doc = "Function to mark the end of the current transaction epoch and start a new epoch.\nSee \\ref TransactionsEpochNext for more details."] pub fn starpu_transaction_next_epoch (p_trs : * mut starpu_transaction , do_start_arg : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Function to mark the end of the last transaction epoch and free the transaction object.\nSee \\ref TransactionsClosing for more details."] pub fn starpu_transaction_close (p_trs : * mut starpu_transaction) ; } pub const STARPU_UNUSED : starpu_node_kind = 0 ; # [doc = "< CPU core"] pub const STARPU_CPU_RAM : starpu_node_kind = 1 ; # [doc = "< NVIDIA CUDA device"] pub const STARPU_CUDA_RAM : starpu_node_kind = 2 ; # [doc = "< OpenCL device"] pub const STARPU_OPENCL_RAM : starpu_node_kind = 3 ; # [doc = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_RAM : starpu_node_kind = 4 ; # [doc = "< Disk memory"] pub const STARPU_DISK_RAM : starpu_node_kind = 5 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_RAM : starpu_node_kind = 6 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_RAM : starpu_node_kind = 7 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_RAM : starpu_node_kind = 8 ; # [doc = "< Maximum value of memory types"] pub const STARPU_MAX_RAM : starpu_node_kind = 8 ; # [doc = "< Number of memory types"] pub const STARPU_NRAM : starpu_node_kind = 9 ; # [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 = "< Maxeler FPGA device"] pub const STARPU_MAX_FPGA_WORKER : starpu_worker_archtype = 4 ; # [doc = "< MPI Slave device"] pub const STARPU_MPI_MS_WORKER : starpu_worker_archtype = 5 ; # [doc = "< TCPIP Slave device"] pub const STARPU_TCPIP_MS_WORKER : starpu_worker_archtype = 6 ; # [doc = "< NVIDIA/AMD HIP device"] pub const STARPU_HIP_WORKER : starpu_worker_archtype = 7 ; # [doc = "< Number of arch types"] pub const STARPU_NARCH : starpu_worker_archtype = 8 ; # [doc = "< any worker, used in the hypervisor"] pub const STARPU_ANY_WORKER : starpu_worker_archtype = 255 ; # [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)] 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 ; 48usize] , pub possibly_parallel : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_ctx_iterator"] [:: std :: mem :: size_of :: < starpu_sched_ctx_iterator > () - 80usize] ; ["Alignment of starpu_sched_ctx_iterator"] [:: std :: mem :: align_of :: < starpu_sched_ctx_iterator > () - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::cursor"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , cursor) - 0usize] ; ["Offset of field: starpu_sched_ctx_iterator::value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , value) - 8usize] ; ["Offset of field: starpu_sched_ctx_iterator::possible_value"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possible_value) - 16usize] ; ["Offset of field: starpu_sched_ctx_iterator::visited"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , visited) - 24usize] ; ["Offset of field: starpu_sched_ctx_iterator::possibly_parallel"] [:: std :: mem :: offset_of ! (starpu_sched_ctx_iterator , possibly_parallel) - 72usize] ; } ; 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)] 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 ; 48usize] , pub is_unblocked : [:: std :: os :: raw :: c_char ; 48usize] , pub is_master : [:: std :: os :: raw :: c_char ; 48usize] , # [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 collection"] 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) > , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_worker_collection"] [:: std :: mem :: size_of :: < starpu_worker_collection > () - 264usize] ; ["Alignment of starpu_worker_collection"] [:: std :: mem :: align_of :: < starpu_worker_collection > () - 8usize] ; ["Offset of field: starpu_worker_collection::workerids"] [:: std :: mem :: offset_of ! (starpu_worker_collection , workerids) - 0usize] ; ["Offset of field: starpu_worker_collection::collection_private"] [:: std :: mem :: offset_of ! (starpu_worker_collection , collection_private) - 8usize] ; ["Offset of field: starpu_worker_collection::nworkers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nworkers) - 16usize] ; ["Offset of field: starpu_worker_collection::unblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , unblocked_workers) - 24usize] ; ["Offset of field: starpu_worker_collection::nunblocked_workers"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nunblocked_workers) - 32usize] ; ["Offset of field: starpu_worker_collection::masters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , masters) - 40usize] ; ["Offset of field: starpu_worker_collection::nmasters"] [:: std :: mem :: offset_of ! (starpu_worker_collection , nmasters) - 48usize] ; ["Offset of field: starpu_worker_collection::present"] [:: std :: mem :: offset_of ! (starpu_worker_collection , present) - 52usize] ; ["Offset of field: starpu_worker_collection::is_unblocked"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_unblocked) - 100usize] ; ["Offset of field: starpu_worker_collection::is_master"] [:: std :: mem :: offset_of ! (starpu_worker_collection , is_master) - 148usize] ; ["Offset of field: starpu_worker_collection::type_"] [:: std :: mem :: offset_of ! (starpu_worker_collection , type_) - 196usize] ; ["Offset of field: starpu_worker_collection::has_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , has_next) - 200usize] ; ["Offset of field: starpu_worker_collection::get_next"] [:: std :: mem :: offset_of ! (starpu_worker_collection , get_next) - 208usize] ; ["Offset of field: starpu_worker_collection::add"] [:: std :: mem :: offset_of ! (starpu_worker_collection , add) - 216usize] ; ["Offset of field: starpu_worker_collection::remove"] [:: std :: mem :: offset_of ! (starpu_worker_collection , remove) - 224usize] ; ["Offset of field: starpu_worker_collection::init"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init) - 232usize] ; ["Offset of field: starpu_worker_collection::deinit"] [:: std :: mem :: offset_of ! (starpu_worker_collection , deinit) - 240usize] ; ["Offset of field: starpu_worker_collection::init_iterator"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator) - 248usize] ; ["Offset of field: starpu_worker_collection::init_iterator_for_parallel_tasks"] [:: std :: mem :: offset_of ! (starpu_worker_collection , init_iterator_for_parallel_tasks) - 256usize] ; } ; 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 () } } } unsafe extern "C" { pub static mut starpu_worker_list : starpu_worker_collection ; } unsafe extern "C" { pub static mut starpu_worker_tree : starpu_worker_collection ; } unsafe extern "C" { # [doc = "Wait for all workers to be initialised. Calling this function is\nnormally not necessary. It is called for example in\ntools/starpu_machine_display to make sure all workers\ninformation are correctly set before printing their information.\nSee \\ref PauseResume for more details."] pub fn starpu_worker_wait_for_initialisation () ; } unsafe extern "C" { # [doc = "Return true if type matches one of StarPU's defined worker architectures.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_archtype_is_valid (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Convert a mask of architectures to a worker archtype.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_arch_mask_to_worker_archtype (mask : :: std :: os :: raw :: c_uint) -> starpu_worker_archtype ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CPUs controlled by StarPU. The return value\nshould be at most \\ref STARPU_MAXCPUS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cpu_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of CUDA devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXCUDADEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_cuda_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of HIP devices controlled by StarPU. The return\nvalue should be at most \\ref STARPU_MAXHIPDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_hip_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of OpenCL devices controlled by StarPU. The\nreturn value should be at most \\ref STARPU_MAXOPENCLDEVS.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_opencl_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of MPI Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_mpi_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of TCPIP Master Slave workers controlled by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_tcpip_ms_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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).\nSee \\ref HowToInitializeAComputationLibraryOnceForEachWorker for more details."] pub fn starpu_worker_get_id_check () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_bindid (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_sched_find_all_worker_combinations () ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type (id : :: std :: os :: raw :: c_int) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the number of workers of \\p type. A positive (or\nNULL) value is returned in case of success, -EINVAL\nindicates that \\p type is not valid otherwise.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_count_by_type (type_ : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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-ERANGE 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_type (type_ : starpu_worker_archtype , num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_by_devid (type_ : starpu_worker_archtype , devid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return true if worker type can execute this task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_type_can_execute_task (worker_type : starpu_worker_archtype , task : * const starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_name (id : :: std :: os :: raw :: c_int , dst : * mut :: std :: os :: raw :: c_char , maxlen : usize) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all workers.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_all (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Display on \\p output the list (if any) of all the workers of the\ngiven \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_names (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe extern "C" { # [doc = "Display on \\p output the number of workers of the given \\p type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_display_count (output : * mut FILE , type_ : starpu_worker_archtype) ; } unsafe 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 hwloc in case it is available.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_devnum (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_subworkerid (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] pub fn starpu_workers_get_tree () -> * mut starpu_tree ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return when the current task is expected to be finished.\n\nNote: the returned date should be used with caution since the task might very\nwell end just after this function returns.\n\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_worker_get_current_task_exp_end (workerid : :: std :: os :: raw :: c_uint , date : * mut timespec) ; } unsafe extern "C" { # [doc = "Return whether worker \\p workerid is currently blocked in a parallel task.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_blocked_in_parallel (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_slave_somewhere (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_string (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return worker \\p type from a string.\nReturns STARPU_UNKNOWN_WORKER if the string doesn't match a worker type.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_from_string (type_ : * const :: std :: os :: raw :: c_char) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return worker \\p type as a string suitable for environment variable names (CPU, CUDA, etc.).\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_type_as_env_var (type_ : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "See \\ref TopologyWorkers for more details."] 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 ; } unsafe 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().\nSee \\ref InteroperabilityHWLOC for more details."] pub fn starpu_worker_get_hwloc_cpuset (workerid : :: std :: os :: raw :: c_int) -> hwloc_cpuset_t ; } unsafe extern "C" { # [doc = "If StarPU was compiled with \\c hwloc support, return the \\c hwloc\nobject corresponding to the worker \\p workerid.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_hwloc_obj (workerid : :: std :: os :: raw :: c_int) -> hwloc_obj_t ; } unsafe extern "C" { # [doc = "See \\ref TopologyMemory for more details."] pub fn starpu_memory_node_get_devid (node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the memory node associated to the current worker.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_local_memory_node () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the worker\nidentified by \\p workerid.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node (workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the number of memory nodes of a given \\p kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_count_by_kind (kind : starpu_node_kind) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Get the list of memory nodes of kind \\p kind.\nFill the array \\p memory_nodes_ids with the memory nodes numbers.\nThe argument \\p maxsize indicates the size of the array\n\\p memory_nodes_ids. The return value gives the number of node numbers\nthat were put in the array. -ERANGE is returned if \\p maxsize\nis lower than the number of memory nodes with the appropriate kind: in that\ncase, the array is filled with the \\p maxsize first elements. To avoid such\noverflows, the value of maxsize can be chosen by the means of function\nstarpu_memory_nodes_get_count_by_kind(), or by passing a value greater or\nequal to \\ref STARPU_MAXNODES.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_ids_by_type (kind : starpu_node_kind , memory_nodes_ids : * mut :: std :: os :: raw :: c_uint , maxsize : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of NUMA nodes used by StarPU.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_get_numa_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the memory node associated to the NUMA\nnode identified by \\p osid by the Operating System.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_id_to_devid (osid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the Operating System identifier of the memory node whose\nStarPU identifier is \\p id.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_nodes_numa_devid_to_id (id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_node_get_kind (node : :: std :: os :: raw :: c_uint) -> starpu_node_kind ; } unsafe extern "C" { # [doc = "Return the type of worker which operates on memory node kind \\p node_kind.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_memory_node_get_worker_archtype (node_kind : starpu_node_kind) -> starpu_worker_archtype ; } unsafe extern "C" { # [doc = "Return the type of memory node that arch type \\p type operates on.\nSee \\ref TopologyWorkers for more details."] pub fn starpu_worker_get_memory_node_kind (type_ : starpu_worker_archtype) -> starpu_node_kind ; } unsafe 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 ; } unsafe 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 UINT_MAX-1 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_on () ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_relax_off () ; } unsafe extern "C" { # [doc = "Return \\c !0 if the current worker \\c state_relax_refcnt!=0 and \\c\n0 otherwise.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_get_relax_state () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock (workerid : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_trylock (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Release the previously acquired sched mutex of \\p workerid. Restore\nthe relax state of the caller worker if needed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock (workerid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Acquire the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_lock_self () ; } unsafe extern "C" { # [doc = "Release the current worker sched mutex.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_worker_unlock_self () ; } unsafe extern "C" { # [doc = "Return the number of different combined workers.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_count () -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "See \\ref SchedulingHelpers for more details."] pub fn starpu_worker_is_combined_worker (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Return the identifier of the current combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_combined_worker_get_id () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref Fork-modeParallelTasks and \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_size () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref SPMD-modeParallelTasks for more details."] pub fn starpu_combined_worker_get_rank () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Register a new combined worker and get its identifier.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Get the description of a combined worker.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Variant of starpu_worker_can_execute_task() compatible with\ncombined workers.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Initialise the barrier for the parallel task, and dispatch the task\nbetween the different workers of the given combined worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_parallel_task_barrier_init (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_int) ; } unsafe 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).\nSee \\ref SchedulingHelpers for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_device"] [:: std :: mem :: size_of :: < starpu_perfmodel_device > () - 12usize] ; ["Alignment of starpu_perfmodel_device"] [:: std :: mem :: align_of :: < starpu_perfmodel_device > () - 4usize] ; ["Offset of field: starpu_perfmodel_device::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , type_) - 0usize] ; ["Offset of field: starpu_perfmodel_device::devid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , devid) - 4usize] ; ["Offset of field: starpu_perfmodel_device::ncores"] [:: std :: mem :: offset_of ! (starpu_perfmodel_device , ncores) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_arch > () - 16usize] ; ["Alignment of starpu_perfmodel_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_arch::ndevices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , ndevices) - 0usize] ; ["Offset of field: starpu_perfmodel_arch::devices"] [:: std :: mem :: offset_of ! (starpu_perfmodel_arch , devices) - 8usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_entry"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_entry > () - 88usize] ; ["Alignment of starpu_perfmodel_history_entry"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_entry > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::mean"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , mean) - 0usize] ; ["Offset of field: starpu_perfmodel_history_entry::deviation"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , deviation) - 8usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum) - 16usize] ; ["Offset of field: starpu_perfmodel_history_entry::sum2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , sum2) - 24usize] ; ["Offset of field: starpu_perfmodel_history_entry::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nsample) - 32usize] ; ["Offset of field: starpu_perfmodel_history_entry::nerror"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , nerror) - 36usize] ; ["Offset of field: starpu_perfmodel_history_entry::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel_history_entry::size"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , size) - 48usize] ; ["Offset of field: starpu_perfmodel_history_entry::flops"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , flops) - 56usize] ; ["Offset of field: starpu_perfmodel_history_entry::duration"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , duration) - 64usize] ; ["Offset of field: starpu_perfmodel_history_entry::tag"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , tag) - 72usize] ; ["Offset of field: starpu_perfmodel_history_entry::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_entry , parameters) - 80usize] ; } ; 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 () } } } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perfmodel_history_list { pub next : * mut starpu_perfmodel_history_list , pub entry : * mut starpu_perfmodel_history_entry , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_history_list"] [:: std :: mem :: size_of :: < starpu_perfmodel_history_list > () - 16usize] ; ["Alignment of starpu_perfmodel_history_list"] [:: std :: mem :: align_of :: < starpu_perfmodel_history_list > () - 8usize] ; ["Offset of field: starpu_perfmodel_history_list::next"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , next) - 0usize] ; ["Offset of field: starpu_perfmodel_history_list::entry"] [:: std :: mem :: offset_of ! (starpu_perfmodel_history_list , entry) - 8usize] ; } ; 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_regression_model"] [:: std :: mem :: size_of :: < starpu_perfmodel_regression_model > () - 120usize] ; ["Alignment of starpu_perfmodel_regression_model"] [:: std :: mem :: align_of :: < starpu_perfmodel_regression_model > () - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlny) - 0usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx) - 8usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnx2"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnx2) - 16usize] ; ["Offset of field: starpu_perfmodel_regression_model::minx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , minx) - 24usize] ; ["Offset of field: starpu_perfmodel_regression_model::maxx"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , maxx) - 32usize] ; ["Offset of field: starpu_perfmodel_regression_model::sumlnxlny"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , sumlnxlny) - 40usize] ; ["Offset of field: starpu_perfmodel_regression_model::alpha"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , alpha) - 48usize] ; ["Offset of field: starpu_perfmodel_regression_model::beta"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , beta) - 56usize] ; ["Offset of field: starpu_perfmodel_regression_model::valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , valid) - 64usize] ; ["Offset of field: starpu_perfmodel_regression_model::a"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , a) - 72usize] ; ["Offset of field: starpu_perfmodel_regression_model::b"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , b) - 80usize] ; ["Offset of field: starpu_perfmodel_regression_model::c"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , c) - 88usize] ; ["Offset of field: starpu_perfmodel_regression_model::nl_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nl_valid) - 96usize] ; ["Offset of field: starpu_perfmodel_regression_model::nsample"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , nsample) - 100usize] ; ["Offset of field: starpu_perfmodel_regression_model::coeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , coeff) - 104usize] ; ["Offset of field: starpu_perfmodel_regression_model::ncoeff"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , ncoeff) - 112usize] ; ["Offset of field: starpu_perfmodel_regression_model::multi_valid"] [:: std :: mem :: offset_of ! (starpu_perfmodel_regression_model , multi_valid) - 116usize] ; } ; 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)] 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] , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel_per_arch"] [:: std :: mem :: size_of :: < starpu_perfmodel_per_arch > () - 408usize] ; ["Alignment of starpu_perfmodel_per_arch"] [:: std :: mem :: align_of :: < starpu_perfmodel_per_arch > () - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , cost_function) - 0usize] ; ["Offset of field: starpu_perfmodel_per_arch::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , size_base) - 8usize] ; ["Offset of field: starpu_perfmodel_per_arch::history"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , history) - 16usize] ; ["Offset of field: starpu_perfmodel_per_arch::list"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , list) - 24usize] ; ["Offset of field: starpu_perfmodel_per_arch::regression"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , regression) - 32usize] ; ["Offset of field: starpu_perfmodel_per_arch::debug_path"] [:: std :: mem :: offset_of ! (starpu_perfmodel_per_arch , debug_path) - 152usize] ; } ; 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-worker cost model function"] pub const STARPU_PER_WORKER : starpu_perfmodel_type = 1 ; # [doc = "< Application-provided per-arch cost model function"] pub const STARPU_PER_ARCH : starpu_perfmodel_type = 2 ; # [doc = "< Application-provided common cost model function, with per-arch factor"] pub const STARPU_COMMON : starpu_perfmodel_type = 3 ; # [doc = "< Automatic history-based cost model"] pub const STARPU_HISTORY_BASED : starpu_perfmodel_type = 4 ; # [doc = "< Automatic linear regression-based cost model (alpha * size ^ beta)"] pub const STARPU_REGRESSION_BASED : starpu_perfmodel_type = 5 ; # [doc = "< Automatic non-linear regression-based cost model (a * size ^ b + c)"] pub const STARPU_NL_REGRESSION_BASED : starpu_perfmodel_type = 6 ; # [doc = "< Automatic multiple linear regression-based cost model. Application\nprovides parameters, their combinations and exponents."] pub const STARPU_MULTIPLE_REGRESSION_BASED : starpu_perfmodel_type = 7 ; # [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)] pub struct starpu_perfmodel { # [doc = "type of performance model\n\n- \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
\n- \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
\n- \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
\n- \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
\n
"] 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_PER_ARCH. 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_PER_WORKER. Take a task, a worker id and implementation\nnumber, and must return a task duration estimation in\nmicro-seconds on that worker."] pub worker_cost_function : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 > , # [doc = "Used by ::STARPU_HISTORY_BASED, ::STARPU_REGRESSION_BASED and\n::STARPU_NL_REGRESSION_BASED. If not NULL, 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 NULL, 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 = "name of the file storing the performance model. It is non\nNULL if the model has been loaded or stored in a file."] pub path : * mut :: 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_perfmodel"] [:: std :: mem :: size_of :: < starpu_perfmodel > () - 128usize] ; ["Alignment of starpu_perfmodel"] [:: std :: mem :: align_of :: < starpu_perfmodel > () - 8usize] ; ["Offset of field: starpu_perfmodel::type_"] [:: std :: mem :: offset_of ! (starpu_perfmodel , type_) - 0usize] ; ["Offset of field: starpu_perfmodel::cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , cost_function) - 8usize] ; ["Offset of field: starpu_perfmodel::arch_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , arch_cost_function) - 16usize] ; ["Offset of field: starpu_perfmodel::worker_cost_function"] [:: std :: mem :: offset_of ! (starpu_perfmodel , worker_cost_function) - 24usize] ; ["Offset of field: starpu_perfmodel::size_base"] [:: std :: mem :: offset_of ! (starpu_perfmodel , size_base) - 32usize] ; ["Offset of field: starpu_perfmodel::footprint"] [:: std :: mem :: offset_of ! (starpu_perfmodel , footprint) - 40usize] ; ["Offset of field: starpu_perfmodel::symbol"] [:: std :: mem :: offset_of ! (starpu_perfmodel , symbol) - 48usize] ; ["Offset of field: starpu_perfmodel::path"] [:: std :: mem :: offset_of ! (starpu_perfmodel , path) - 56usize] ; ["Offset of field: starpu_perfmodel::is_loaded"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_loaded) - 64usize] ; ["Offset of field: starpu_perfmodel::benchmarking"] [:: std :: mem :: offset_of ! (starpu_perfmodel , benchmarking) - 68usize] ; ["Offset of field: starpu_perfmodel::is_init"] [:: std :: mem :: offset_of ! (starpu_perfmodel , is_init) - 72usize] ; ["Offset of field: starpu_perfmodel::parameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters) - 80usize] ; ["Offset of field: starpu_perfmodel::parameters_names"] [:: std :: mem :: offset_of ! (starpu_perfmodel , parameters_names) - 88usize] ; ["Offset of field: starpu_perfmodel::nparameters"] [:: std :: mem :: offset_of ! (starpu_perfmodel , nparameters) - 96usize] ; ["Offset of field: starpu_perfmodel::combinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , combinations) - 104usize] ; ["Offset of field: starpu_perfmodel::ncombinations"] [:: std :: mem :: offset_of ! (starpu_perfmodel , ncombinations) - 112usize] ; ["Offset of field: starpu_perfmodel::state"] [:: std :: mem :: offset_of ! (starpu_perfmodel , state) - 120usize] ; } ; 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 () } } } unsafe 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) ; } unsafe extern "C" { # [doc = "Deinitialize the \\p model performance model structure. You need to call this\nbefore deallocating the structure. You will probably want to call\nstarpu_perfmodel_unload_model() before calling this function, to save the perfmodel."] pub fn starpu_perfmodel_deinit (model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_start - start counting hardware events in an event set\n\n- \\p workerid is the worker on which calibration is to be performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration will be run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_start (workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "starpu_energy_stop - stop counting hardware events in an event set\n\n- \\p model is the energy performance model to be filled with the result\n- \\p task is a task specimen, so the performance model folds the result according to the parameter sizes of the task.\n- \\p nimpl is the implementation number run during calibration\n- \\p ntasks is the number of tasks run during calibration\n- \\p workerid is the worker on which calibration was performed (in the case of GPUs, use -1 for CPUs)\n- \\p archi is the type of architecture on which calibration was run\n\nSee \\ref MeasuringEnergyandPower for more details."] pub fn starpu_energy_stop (model : * mut starpu_perfmodel , task : * mut starpu_task , nimpl : :: std :: os :: raw :: c_uint , ntasks : :: std :: os :: raw :: c_uint , workerid : :: std :: os :: raw :: c_int , archi : starpu_worker_archtype) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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$STARPU_HOME/.starpu. 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 ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Save the performance model in its file."] pub fn starpu_save_history_based_model (model : * mut starpu_perfmodel) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Dump performance model \\p model to output stream \\p output, in XML format.\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_perfmodel_dump_xml (output : * mut FILE , model : * mut starpu_perfmodel) ; } unsafe 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 tools/starpu_perfmodel_display.c."] pub fn starpu_perfmodel_free_sampling () ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_get_narch_combs () -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_arch_comb_fetch (comb : :: std :: os :: raw :: c_int) -> * mut starpu_perfmodel_arch ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_perfmodel_get_archtype_name (archtype : starpu_worker_archtype) -> * const :: std :: os :: raw :: c_char ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the estimated time in µs 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 ; } unsafe 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 () ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_perfmodel_print_estimations (model : * mut starpu_perfmodel , footprint : u32 , output : * mut FILE) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_perfmodel_list_combs (output : * mut FILE , model : * mut starpu_perfmodel) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with one explicit\nmeasurement (in µs or J), 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.\n\nNote that this records only one measurement, and StarPU would ignore\nthe first measurement (since it is usually disturbed by library loading\netc.). Make sure to call this function several times to record all your\nmeasurements.\n\nYou can also call starpu_perfmodel_update_history_n() to directly provide an\naverage performed on several tasks.\n\nSee \\ref PerformanceModelCalibration for more details."] 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) ; } unsafe extern "C" { # [doc = "Feed the performance model \\p model with an explicit average measurement (in µs or J).\n\nThis is similar to starpu_perfmodel_update_history(), but records a batch of\n\\p number measurements provided as the average of the measurements \\p average_measured."] pub fn starpu_perfmodel_update_history_n (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 , average_measured : f64 , number : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Print the directory name storing performance models on \\p output"] pub fn starpu_perfmodel_directory (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Print a matrix of bus bandwidths on \\p f."] pub fn starpu_bus_print_bandwidth (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Print the affinity devices on \\p f."] pub fn starpu_bus_print_affinity (f : * mut FILE) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the bandwidth of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_bandwidth (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the latency of data transfer between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_latency (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return the estimated time to transfer a given size between two memory nodes.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_transfer_predict (src_node : :: std :: os :: raw :: c_uint , dst_node : :: std :: os :: raw :: c_uint , size : usize) -> f64 ; } unsafe 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_task_list"] [:: std :: mem :: size_of :: < starpu_task_list > () - 16usize] ; ["Alignment of starpu_task_list"] [:: std :: mem :: align_of :: < starpu_task_list > () - 8usize] ; ["Offset of field: starpu_task_list::head"] [:: std :: mem :: offset_of ! (starpu_task_list , head) - 0usize] ; ["Offset of field: starpu_task_list::tail"] [:: std :: mem :: offset_of ! (starpu_task_list , tail) - 8usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize a list structure.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_init (list : * mut starpu_task_list) ; } unsafe extern "C" { # [doc = "Push \\p task at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_front (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Push \\p task at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_push_back (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Get the front of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_front (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the back of \\p list (without removing it).\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_back (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test if \\p list is empty.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_empty (list : * const starpu_task_list) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Remove \\p task from \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_erase (list : * mut starpu_task_list , task : * mut starpu_task) ; } unsafe extern "C" { # [doc = "Remove the element at the front of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_front (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Remove the element at the back of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_pop_back (list : * mut starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the first task of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_begin (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the end of \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_end (list : * const starpu_task_list) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Get the next task of \\p list. This is not erase-safe.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_next (task : * const starpu_task) -> * mut starpu_task ; } unsafe extern "C" { # [doc = "Test whether the given task \\p look is contained in the \\p list.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_ismember (list : * const starpu_task_list , look : * const starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Move list from one head \\p lsrc to another \\p ldst.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_list_move (ldst : * mut starpu_task_list , lsrc : * mut starpu_task_list) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_set (task : * mut starpu_task , cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] pub fn starpu_task_build (cl : * mut starpu_codelet , ...) -> * mut starpu_task ; } unsafe 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\n- ::STARPU_R, ::STARPU_W, ::STARPU_RW, ::STARPU_SCRATCH,\n::STARPU_REDUX an access mode followed by a data handle;\n
- ::STARPU_DATA_ARRAY followed by an array of data handles and\nits number of elements;\n
- ::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
- ::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
- 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
\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.\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_task_insert (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Identical to starpu_task_insert(). Kept to avoid breaking old codes."] pub fn starpu_insert_task (cl : * mut starpu_codelet , ...) -> :: std :: os :: raw :: c_int ; } unsafe 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\ntask->dyn_handles array has size \\p *allocated_buffers, this\nfunction makes room for \\p room other data handles, allocating or\nreallocating task->dyn_handles 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe extern "C" { # [doc = "Store \\p nb_handles data handles \\p handles into task \\p task,\nupdating \\p *allocated_buffers and \\p *current_buffer accordingly.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref OtherTaskUtility for more details."] 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) ; } unsafe 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().\n\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_args (arg_buffer : * mut * mut :: std :: os :: raw :: c_void , arg_buffer_size : * mut usize , ...) ; } # [doc = "Structure to be used for starpu_codelet_pack_arg_init() & co, and\nstarpu_codelet_unpack_arg_init() & co. The contents is public,\nhowever users should not directly access it, but only use as a\nparameter to the appropriate functions."] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_codelet_pack_arg_data { pub arg_buffer : * mut :: std :: os :: raw :: c_char , pub arg_buffer_size : usize , pub arg_buffer_used : usize , pub current_offset : usize , pub nargs : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_codelet_pack_arg_data"] [:: std :: mem :: size_of :: < starpu_codelet_pack_arg_data > () - 40usize] ; ["Alignment of starpu_codelet_pack_arg_data"] [:: std :: mem :: align_of :: < starpu_codelet_pack_arg_data > () - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer) - 0usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_size"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_size) - 8usize] ; ["Offset of field: starpu_codelet_pack_arg_data::arg_buffer_used"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , arg_buffer_used) - 16usize] ; ["Offset of field: starpu_codelet_pack_arg_data::current_offset"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , current_offset) - 24usize] ; ["Offset of field: starpu_codelet_pack_arg_data::nargs"] [:: std :: mem :: offset_of ! (starpu_codelet_pack_arg_data , nargs) - 32usize] ; } ; 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 () } } } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg_init (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * const :: std :: os :: raw :: c_void , ptr_size : usize) ; } unsafe extern "C" { # [doc = "Finish packing data, after calling starpu_codelet_pack_arg_init()\nonce and starpu_codelet_pack_arg() several times.\nSee \\ref InsertTaskUtility for more details."] 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) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_args (cl_arg : * mut :: std :: os :: raw :: c_void , ...) ; } unsafe extern "C" { # [doc = "Initialize \\p state with \\p cl_arg and \\p cl_arg_size. This has to\nbe called before calling starpu_codelet_unpack_arg().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_init (state : * mut starpu_codelet_pack_arg_data , cl_arg : * mut :: std :: os :: raw :: c_void , cl_arg_size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of size \\p size from \\p state into \\p ptr with a copy.\n\\p state has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut :: std :: os :: raw :: c_void , size : usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr\nwith a copy. \\p ptr is allocated before copying in it the value of\nthe argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_dup_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Unpack the next argument of unknown size from \\p state into \\p ptr.\n\\p ptr will be a pointer to the memory of the argument.\nThe size of the argument is returned in \\p size.\n\\p has to be initialized before with starpu_codelet_unpack_arg_init().\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_pick_arg (state : * mut starpu_codelet_pack_arg_data , ptr : * mut * mut :: std :: os :: raw :: c_void , size : * mut usize) ; } unsafe extern "C" { # [doc = "Finish unpacking data, after calling starpu_codelet_unpack_arg_init()\nonce and starpu_codelet_unpack_arg() or starpu_codelet_dup_arg() or\nstarpu_codelet_pick_arg() several times.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_arg_fini (state : * mut starpu_codelet_pack_arg_data) ; } unsafe extern "C" { # [doc = "Call this function during unpacking to skip saving the argument in ptr.\nSee \\ref InsertTaskUtility for more details."] pub fn starpu_codelet_unpack_discard_arg (state : * mut starpu_codelet_pack_arg_data) ; } unsafe 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.\nSee \\ref InsertTaskUtility for more details."] 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\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- starpu_sched_policy::push_task when the task becomes ready. The\nscheduler is here given the task
\n- starpu_sched_policy::pop_task when the worker is idle. The\nscheduler here gives back the task to the core. It must not\naccess this task any more
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
\n\nFor each task not going through the scheduler (because\nstarpu_task::execute_on_a_specific_worker was set), these get\ncalled:\n\n\n- starpu_sched_policy::submit_hook when the task is\nsubmitted
\n- 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.
\n- starpu_sched_policy::pre_exec_hook right before the worker\nactually starts the task computation (after transferring any\nmissing data).
\n- starpu_sched_policy::post_exec_hook right after the worker\nactually completes the task computation.
\n
"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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.\n\nNote: to get an estimation of the task duration, \\p perf_workerid\nneeds to be used rather than \\p workerid, for the case of parallel\ntasks."] 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 NULL, 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 = "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 = " Whether this scheduling policy does data prefetching, and thus the\ncore should not try to do it opportunistically."] pub prefetches : :: std :: os :: raw :: c_int , # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_sched_policy"] [:: std :: mem :: size_of :: < starpu_sched_policy > () - 128usize] ; ["Alignment of starpu_sched_policy"] [:: std :: mem :: align_of :: < starpu_sched_policy > () - 8usize] ; ["Offset of field: starpu_sched_policy::init_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , init_sched) - 0usize] ; ["Offset of field: starpu_sched_policy::deinit_sched"] [:: std :: mem :: offset_of ! (starpu_sched_policy , deinit_sched) - 8usize] ; ["Offset of field: starpu_sched_policy::push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task) - 16usize] ; ["Offset of field: starpu_sched_policy::simulate_push_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , simulate_push_task) - 24usize] ; ["Offset of field: starpu_sched_policy::push_task_notify"] [:: std :: mem :: offset_of ! (starpu_sched_policy , push_task_notify) - 32usize] ; ["Offset of field: starpu_sched_policy::pop_task"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pop_task) - 40usize] ; ["Offset of field: starpu_sched_policy::submit_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , submit_hook) - 48usize] ; ["Offset of field: starpu_sched_policy::pre_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , pre_exec_hook) - 56usize] ; ["Offset of field: starpu_sched_policy::post_exec_hook"] [:: std :: mem :: offset_of ! (starpu_sched_policy , post_exec_hook) - 64usize] ; ["Offset of field: starpu_sched_policy::do_schedule"] [:: std :: mem :: offset_of ! (starpu_sched_policy , do_schedule) - 72usize] ; ["Offset of field: starpu_sched_policy::add_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , add_workers) - 80usize] ; ["Offset of field: starpu_sched_policy::remove_workers"] [:: std :: mem :: offset_of ! (starpu_sched_policy , remove_workers) - 88usize] ; ["Offset of field: starpu_sched_policy::prefetches"] [:: std :: mem :: offset_of ! (starpu_sched_policy , prefetches) - 96usize] ; ["Offset of field: starpu_sched_policy::policy_name"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_name) - 104usize] ; ["Offset of field: starpu_sched_policy::policy_description"] [:: std :: mem :: offset_of ! (starpu_sched_policy , policy_description) - 112usize] ; ["Offset of field: starpu_sched_policy::worker_type"] [:: std :: mem :: offset_of ! (starpu_sched_policy , worker_type) - 120usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Return an NULL-terminated array of all the predefined\nscheduling policies.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_predefined_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a scheduling policy to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policy (name : * const :: std :: os :: raw :: c_char) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Allow an external library to return a list of scheduling policies to be\nloaded dynamically.\nSee \\ref UsingaNewSchedulingPolicy for more details."] pub fn starpu_get_sched_lib_policies () -> * mut * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the default context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy_in_ctx (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe extern "C" { # [doc = "Return the scheduler policy of the given context.\nSee \\ref TaskSchedulingPolicy for more details."] pub fn starpu_sched_get_sched_policy () -> * mut starpu_sched_policy ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Return the job identifier associated with the task.\nSee \\ref TraceSchedTaskDetails for more details."] pub fn starpu_task_get_job_id (task : * mut starpu_task) -> :: std :: os :: raw :: c_ulong ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current minimum priority level supported by the scheduling\npolicy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_min_priority () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "TODO: check if this is correct\nReturn the current maximum priority level supported by the\nscheduling policy.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_get_max_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_min_priority (min_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_set_max_priority (max_prio : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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 impl_mask == NULL to check for at\nleast one implementation without determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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\nimpl_mask == NULL to check for at least one implementation\nwithout determining which.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe 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. \\p back is ignored: the task priority is\nused to order tasks in this queue.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] 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 ; } unsafe extern "C" { # [doc = "Must be called by a scheduler to notify that the given\ntask has just been pushed.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_push_task_end (task : * mut starpu_task) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Whether \\ref STARPU_PREFETCH was set.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_get_prefetch_flag () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p node when the bus is\nidle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_on_node (task : * mut starpu_task , node : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker with a given\npriority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle with a given priority.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Prefetch data for a given p task on a given p worker when the bus\nis idle.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_idle_prefetch_task_input_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the footprint for a given task, taking into account\nuser-provided perfmodel footprint or size_base functions.\nSee \\ref PerformanceModelExample for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the raw footprint for the data of a given task (without\ntaking into account user-provided functions).\nSee \\ref PerformanceModelExample for more details."] pub fn starpu_task_data_footprint (task : * mut starpu_task) -> u32 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds on a given architecture \\p arch using given implementation \\p nimpl.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_length() but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_length (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task duration in micro-seconds, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the durations using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the durations.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_length_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return an estimated speedup factor relative to CPU speed.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_worker_get_relative_speedup (perf_arch : * mut starpu_perfmodel_arch) -> f64 ; } unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time (memory_node : :: std :: os :: raw :: c_uint , task : * mut starpu_task) -> f64 ; } unsafe extern "C" { # [doc = "Return expected data transfer time in micro-seconds for the given\n\\p worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_data_transfer_time_for (task : * mut starpu_task , worker : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Predict the transfer time (in micro-seconds) to move \\p handle to a\nmemory node.\nSee \\ref SchedulingHelpers for more details."] 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 ; } unsafe extern "C" { # [doc = "Return expected energy use in J.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy (task : * mut starpu_task , arch : * mut starpu_perfmodel_arch , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Same as starpu_task_expected_energy but for a precise worker.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_worker_expected_energy (task : * mut starpu_task , workerid : :: std :: os :: raw :: c_uint , sched_ctx_id : :: std :: os :: raw :: c_uint , nimpl : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected task energy use in J, averaged over the different workers driven by the scheduler \\p sched_ctx_id\nNote: this is not just the average of the energy uses using the number of\nprocessing units as coefficients, but their efficiency at processing the\ntask, thus the harmonic average of the energy uses.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_expected_energy_average (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Return expected conversion time in ms (multiformat interface only).\nSee \\ref SchedulingHelpers for more details."] 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) > ; unsafe 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.\nSee \\ref SchedulingHelpers for more details."] pub fn starpu_task_notify_ready_soon_register (f : starpu_notify_ready_soon_func , data : * mut :: std :: os :: raw :: c_void) ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_worker_shares_tasks_lists (workerid : :: std :: os :: raw :: c_int , sched_ctx_id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "The scheduling policy should call this when it makes a scheduling decision\nfor a task. This will possibly stop execution at this point, and then the\nprogrammer can inspect local variables etc. to determine why this scheduling\ndecision was done.\n\nSee \\ref STARPU_TASK_BREAK_ON_SCHED\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_task_break (task : * mut starpu_task) ; } unsafe 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).\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_no_relax (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Version of starpu_wake_worker_no_relax() which assumes that the\nsched mutex is locked\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_locked (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_wake_worker_relax_light (workerid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n- ::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
\n- ::STARPU_SCHED_CTX_POLICY_STRUCT, followed by a pointer to a\ncustom scheduling policy (struct starpu_sched_policy *)\n
\n- ::STARPU_SCHED_CTX_POLICY_MIN_PRIO, followed by a integer\nrepresenting the minimum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_MAX_PRIO, followed by a integer\nrepresenting the maximum priority value to be defined for the\nscheduling policy.\n
\n- ::STARPU_SCHED_CTX_POLICY_INIT, followed by a function pointer\n(ie. void init_sched(void)) allowing to initialize the scheduling policy.\n
\n- ::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
\n
\nSee \\ref CreatingAContext for more details."] 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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.\nSee \\ref ModifyingAContext for more details."] 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) ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Delete scheduling context \\p sched_ctx_id and transfer remaining\nworkers to the inheritor scheduling context.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_delete (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_set_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint , inheritor : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_inheritor (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_hierarchy_level (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { # [doc = "Set the scheduling context the subsequent tasks will be submitted\nto.\nSee \\ref SubmittingTasksToAContext and \\ref TmpCTXS for more details."] pub fn starpu_sched_ctx_set_context (sched_ctx_id : * mut :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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.\nSee \\ref EmptyingAContext for more details."] pub fn starpu_sched_ctx_stop_task_submission () ; } unsafe 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.\nSee \\ref DeletingAContext for more details."] pub fn starpu_sched_ctx_finished_submit (sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_ctx_for_task (task : * mut starpu_task) -> :: std :: os :: raw :: c_uint ; } unsafe extern "C" { pub fn starpu_worker_get_sched_ctx_id_stream (stream_workerid : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_uint ; } unsafe 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 ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Allocate the scheduling policy data (private information of the\nscheduler like queues, variables, additional condition variables)\nthe context.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_set_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint , policy_data : * mut :: std :: os :: raw :: c_void) ; } unsafe extern "C" { # [doc = "Return the scheduling policy data (private information of the\nscheduler) of the contexts previously assigned to.\nSee \\ref DefiningANewBasicSchedulingPolicy for more details."] pub fn starpu_sched_ctx_get_policy_data (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_sched_policy (sched_ctx_id : :: std :: os :: raw :: c_uint) -> * mut starpu_sched_policy ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_tasks (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nready_flops (sched_ctx_id : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_list_task_counters_reset_all (task : * mut starpu_task , sched_ctx_id : :: std :: os :: raw :: c_uint) ; } unsafe 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) ; } unsafe 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 ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_bind_current_thread_to_cpuid (cpuid : :: std :: os :: raw :: c_uint) ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_revert_task_counters_ctx_locked (sched_ctx_id : :: std :: os :: raw :: c_uint , flops : f64) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_worker_rank (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the function associated with the scheduler context \\p\nsched_ctx_id which was given through the field\nstarpu_conf::sched_policy_callback"] pub fn starpu_sched_ctx_get_sched_policy_callback (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: option :: Option < unsafe extern "C" fn (sched_ctx_id : :: std :: os :: raw :: c_uint) > ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_stream_worker (sub_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_get_nsms (sched_ctx : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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) ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_sched_ctx_min_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { pub fn starpu_sched_ctx_max_priority_is_set (sched_ctx_id : :: std :: os :: raw :: c_uint) -> :: std :: os :: raw :: c_int ; } unsafe 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 ; } unsafe 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) ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Wake all the workers, so they can inspect data requests and task\nsubmissions again."] pub fn starpu_wake_all_blocked_workers () ; } unsafe 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 ; } unsafe extern "C" { # [doc = "Unregister a given progression hook."] pub fn starpu_progression_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } unsafe 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 ; } unsafe extern "C" { pub fn starpu_idle_hook_deregister (hook_id : :: std :: os :: raw :: c_int) ; } pub type starpu_drand48_data = drand48_data ; unsafe extern "C" { # [doc = "Initialize HIPBLAS on every HIPdevice. The\nHIPBLAS library must be initialized prior to any HIPBLAS call. Calling\nstarpu_hipblas_init() will initialize HIPBLAS on every HIP device\ncontrolled by StarPU. This call blocks until HIPBLAS has been properly\ninitialized on every device."] pub fn starpu_hipblas_init () ; } pub type hipblasHandle_t = * mut :: std :: os :: raw :: c_void ; unsafe extern "C" { # [doc = "Return the HIPBLAS handle to be used to queue HIPBLAS kernels. It\nis properly initialized and configured for multistream by\nstarpu_hipblas_init()."] pub fn starpu_hipblas_get_local_handle () -> hipblasHandle_t ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the HIPBLAS library on\nevery HIP device."] pub fn starpu_hipblas_shutdown () ; } unsafe 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. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_init () ; } unsafe 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().\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_set_stream () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUBLAS library on\nevery CUDA device.\nSee \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cublas_shutdown () ; } unsafe extern "C" { # [doc = "Initialize CUSPARSE on every CUDA device\ncontrolled by StarPU. This call blocks until CUSPARSE has been properly\ninitialized on every device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_init () ; } unsafe extern "C" { # [doc = "Synchronously deinitialize the CUSPARSE library on\nevery CUDA device. See \\ref CUDA-specificOptimizations for more details."] pub fn starpu_cusparse_shutdown () ; } unsafe extern "C" { # [doc = "Start recording tasks (resets stats). \\p deps tells whether\ndependencies should be recorded too (this is quite expensive)\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_start (deps : :: std :: os :: raw :: c_int , prio : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Stop recording tasks\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_stop () ; } unsafe extern "C" { # [doc = "Emit the DAG that was recorded on \\p output.\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_dot (output : * mut FILE) ; } unsafe 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. \\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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_compute (res : * mut f64 , integer_res : * mut f64 , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the lp format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_lp (output : * mut FILE) ; } unsafe extern "C" { # [doc = "Emit the Linear Programming system on \\p output for the recorded\ntasks, in the mps format\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print_mps (output : * mut FILE) ; } unsafe 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).\n\nSee \\ref TheoreticalLowerBoundOnExecutionTime for more details."] pub fn starpu_bound_print (output : * mut FILE , integer : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Compute the CRC of a byte buffer seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_n (input : * const :: std :: os :: raw :: c_void , n : usize , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a pointer value seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be_ptr (input : * mut :: std :: os :: raw :: c_void , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a 32bit number seeded by the \\p inputcrc\ncurrent state. The return value should be considered as the new\ncurrent state for future CRC computation. This is used for computing\ndata size footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] pub fn starpu_hash_crc32c_be (input : u32 , inputcrc : u32) -> u32 ; } unsafe extern "C" { # [doc = "Compute the CRC of a string seeded by the \\p inputcrc current\nstate. The return value should be considered as the new current\nstate for future CRC computation. This is used for computing data\nsize footprint.\nSee \\ref DefiningANewDataInterface_footprint for more details."] 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 , # [doc = " PAPI Events"] pub papi_values : [:: std :: os :: raw :: c_longlong ; 15usize] , pub papi_event_set : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_task_info"] [:: std :: mem :: size_of :: < starpu_profiling_task_info > () - 368usize] ; ["Alignment of starpu_profiling_task_info"] [:: std :: mem :: align_of :: < starpu_profiling_task_info > () - 8usize] ; ["Offset of field: starpu_profiling_task_info::submit_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , submit_time) - 0usize] ; ["Offset of field: starpu_profiling_task_info::push_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_start_time) - 16usize] ; ["Offset of field: starpu_profiling_task_info::push_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , push_end_time) - 32usize] ; ["Offset of field: starpu_profiling_task_info::pop_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_start_time) - 48usize] ; ["Offset of field: starpu_profiling_task_info::pop_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , pop_end_time) - 64usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_start_time) - 80usize] ; ["Offset of field: starpu_profiling_task_info::acquire_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , acquire_data_end_time) - 96usize] ; ["Offset of field: starpu_profiling_task_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , start_time) - 112usize] ; ["Offset of field: starpu_profiling_task_info::end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , end_time) - 128usize] ; ["Offset of field: starpu_profiling_task_info::release_data_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_start_time) - 144usize] ; ["Offset of field: starpu_profiling_task_info::release_data_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , release_data_end_time) - 160usize] ; ["Offset of field: starpu_profiling_task_info::callback_start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_start_time) - 176usize] ; ["Offset of field: starpu_profiling_task_info::callback_end_time"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , callback_end_time) - 192usize] ; ["Offset of field: starpu_profiling_task_info::workerid"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , workerid) - 208usize] ; ["Offset of field: starpu_profiling_task_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , used_cycles) - 216usize] ; ["Offset of field: starpu_profiling_task_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , stall_cycles) - 224usize] ; ["Offset of field: starpu_profiling_task_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , energy_consumed) - 232usize] ; ["Offset of field: starpu_profiling_task_info::papi_values"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_values) - 240usize] ; ["Offset of field: starpu_profiling_task_info::papi_event_set"] [:: std :: mem :: offset_of ! (starpu_profiling_task_info , papi_event_set) - 360usize] ; } ; 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: {:?}, papi_values: {:?}, papi_event_set: {:?} }}" , self . workerid , self . energy_consumed , self . papi_values , self . papi_event_set) } } # [doc = "Profiling information associated to a worker. The timing is\nprovided since the previous call to\nstarpu_profiling_worker_get_info().\n\nThe executing_time, callback_time, waiting_time, sleeping_time, and\nscheduling_time are exclusive to each other, i.e. they can be added up, their\nsum is smaller than total_time. The difference between total_time and the sum\nis the uncategorized runtime overhead."] # [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 by the worker to execute callbacks, while not executing a\n task, during the profiling measurement interval."] pub callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish,\n while not executing a task or a callback, during the profiling\n measurement interval."] pub waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available, and\n not executing a task or a callback or waiting for a data transfer to\n finish, during the profiling measurement interval."] pub sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks, while not executing a\n task or a callback or waiting for a data transfer to finish, and there\n are tasks to be scheduled, during the profiling measurement interval."] pub scheduling_time : timespec , # [doc = " Time spent by the worker to execute tasks during the profiling measurement interval.\n Normally always equal to executing_time."] pub all_executing_time : timespec , # [doc = " Time spent by the worker to execute callbacks during the profiling measurement interval.\n Normally always greater than callback_time."] pub all_callback_time : timespec , # [doc = " Time spent by the worker waiting for a data transfer to finish during the profiling measurement interval.\n Normally always greater than waiting_time."] pub all_waiting_time : timespec , # [doc = " Time spent idling by the worker because no task were available during the profiling measurement interval.\n Normally always greater than sleeping_time."] pub all_sleeping_time : timespec , # [doc = " Time spent by the worker scheduling tasks during the profiling measurement interval.\n Normally always greater than scheduling_time."] pub all_scheduling_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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_worker_info"] [:: std :: mem :: size_of :: < starpu_profiling_worker_info > () - 232usize] ; ["Alignment of starpu_profiling_worker_info"] [:: std :: mem :: align_of :: < starpu_profiling_worker_info > () - 8usize] ; ["Offset of field: starpu_profiling_worker_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_worker_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_worker_info::executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executing_time) - 32usize] ; ["Offset of field: starpu_profiling_worker_info::callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , callback_time) - 48usize] ; ["Offset of field: starpu_profiling_worker_info::waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , waiting_time) - 64usize] ; ["Offset of field: starpu_profiling_worker_info::sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , sleeping_time) - 80usize] ; ["Offset of field: starpu_profiling_worker_info::scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , scheduling_time) - 96usize] ; ["Offset of field: starpu_profiling_worker_info::all_executing_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_executing_time) - 112usize] ; ["Offset of field: starpu_profiling_worker_info::all_callback_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_callback_time) - 128usize] ; ["Offset of field: starpu_profiling_worker_info::all_waiting_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_waiting_time) - 144usize] ; ["Offset of field: starpu_profiling_worker_info::all_sleeping_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_sleeping_time) - 160usize] ; ["Offset of field: starpu_profiling_worker_info::all_scheduling_time"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , all_scheduling_time) - 176usize] ; ["Offset of field: starpu_profiling_worker_info::executed_tasks"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , executed_tasks) - 192usize] ; ["Offset of field: starpu_profiling_worker_info::used_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , used_cycles) - 200usize] ; ["Offset of field: starpu_profiling_worker_info::stall_cycles"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , stall_cycles) - 208usize] ; ["Offset of field: starpu_profiling_worker_info::energy_consumed"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , energy_consumed) - 216usize] ; ["Offset of field: starpu_profiling_worker_info::flops"] [:: std :: mem :: offset_of ! (starpu_profiling_worker_info , flops) - 224usize] ; } ; 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) } } # [doc = "todo"] # [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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_profiling_bus_info"] [:: std :: mem :: size_of :: < starpu_profiling_bus_info > () - 48usize] ; ["Alignment of starpu_profiling_bus_info"] [:: std :: mem :: align_of :: < starpu_profiling_bus_info > () - 8usize] ; ["Offset of field: starpu_profiling_bus_info::start_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , start_time) - 0usize] ; ["Offset of field: starpu_profiling_bus_info::total_time"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , total_time) - 16usize] ; ["Offset of field: starpu_profiling_bus_info::transferred_bytes"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transferred_bytes) - 32usize] ; ["Offset of field: starpu_profiling_bus_info::transfer_count"] [:: std :: mem :: offset_of ! (starpu_profiling_bus_info , transfer_count) - 40usize] ; } ; 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) } } unsafe extern "C" { # [doc = "Reset performance counters and enable profiling if the\nenvironment variable \\ref STARPU_PROFILING is set to a positive value.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_init () ; } unsafe extern "C" { # [doc = "Set the ID used for profiling trace filename. Has to be called before starpu_init().\nSee \\ref TraceMpi for more details."] pub fn starpu_profiling_set_id (new_id : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_set (status : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the current profiling status or a negative value in case\nthere was an error.\nSee \\ref EnablingOn-linePerformanceMonitoring for more details."] pub fn starpu_profiling_status_get () -> :: std :: os :: raw :: c_int ; } unsafe 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 NULL, only reset the counters associated to worker\n\\p workerid. Upon successful completion, this function returns 0.\nOtherwise, a negative value is returned.\nSee \\ref Per-workerFeedback for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the number of buses in the machine.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_count () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the identifier of the bus between \\p src and \\p dst.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_id (src : :: std :: os :: raw :: c_int , dst : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the source point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_src (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the destination point of bus \\p busid.\nSee \\ref HardwareTopology for more details."] pub fn starpu_bus_get_dst (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_direct (busid : :: std :: os :: raw :: c_int , direct : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_direct (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_set_ngpus (busid : :: std :: os :: raw :: c_int , ngpus : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "See \\ref HardwareTopology for more details."] pub fn starpu_bus_get_ngpus (busid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\nSee \\ref FeedBackFigures for more details."] 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 ; } unsafe extern "C" { # [doc = "Return the time elapsed between \\p start and \\p end in microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_delay_us (start : * mut timespec , end : * mut timespec) -> f64 ; } unsafe extern "C" { # [doc = "Convert the given timespec \\p ts into microseconds.\nSee \\ref Per-taskFeedback for more details."] pub fn starpu_timing_timespec_to_us (ts : * mut timespec) -> f64 ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_bus_helper_display_summary () ; } unsafe 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().\nSee \\ref DataStatistics for more details."] pub fn starpu_profiling_worker_helper_display_summary () ; } unsafe 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).\nSee \\ref MemoryFeedback for more details."] pub fn starpu_data_display_memory_stats () ; } pub const starpu_prof_tool_event_none : starpu_prof_tool_event = 0 ; pub const starpu_prof_tool_event_init : starpu_prof_tool_event = 1 ; pub const starpu_prof_tool_event_terminate : starpu_prof_tool_event = 2 ; pub const starpu_prof_tool_event_init_begin : starpu_prof_tool_event = 3 ; pub const starpu_prof_tool_event_init_end : starpu_prof_tool_event = 4 ; pub const starpu_prof_tool_event_driver_init : starpu_prof_tool_event = 5 ; pub const starpu_prof_tool_event_driver_deinit : starpu_prof_tool_event = 6 ; pub const starpu_prof_tool_event_driver_init_start : starpu_prof_tool_event = 7 ; pub const starpu_prof_tool_event_driver_init_end : starpu_prof_tool_event = 8 ; pub const starpu_prof_tool_event_start_cpu_exec : starpu_prof_tool_event = 9 ; pub const starpu_prof_tool_event_end_cpu_exec : starpu_prof_tool_event = 10 ; pub const starpu_prof_tool_event_start_gpu_exec : starpu_prof_tool_event = 11 ; pub const starpu_prof_tool_event_end_gpu_exec : starpu_prof_tool_event = 12 ; pub const starpu_prof_tool_event_start_transfer : starpu_prof_tool_event = 13 ; pub const starpu_prof_tool_event_end_transfer : starpu_prof_tool_event = 14 ; pub const starpu_prof_tool_event_user_start : starpu_prof_tool_event = 15 ; pub const starpu_prof_tool_event_user_end : starpu_prof_tool_event = 16 ; # [doc = "Event type"] pub type starpu_prof_tool_event = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_driver_cpu : starpu_prof_tool_driver_type = 0 ; pub const starpu_prof_tool_driver_gpu : starpu_prof_tool_driver_type = 1 ; pub const starpu_prof_tool_driver_hip : starpu_prof_tool_driver_type = 2 ; pub const starpu_prof_tool_driver_ocl : starpu_prof_tool_driver_type = 3 ; # [doc = "todo"] pub type starpu_prof_tool_driver_type = :: std :: os :: raw :: c_uint ; pub const starpu_prof_tool_command_reg : starpu_prof_tool_command = 0 ; pub const starpu_prof_tool_command_toggle : starpu_prof_tool_command = 1 ; pub const starpu_prof_tool_command_toggle_per_thread : starpu_prof_tool_command = 2 ; # [doc = "todo"] pub type starpu_prof_tool_command = :: std :: os :: raw :: c_uint ; # [doc = "General information"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_prof_tool_info { pub conf : * mut starpu_conf , pub event_type : starpu_prof_tool_event , pub starpu_version : [:: std :: os :: raw :: c_uint ; 3usize] , pub thread_id : :: std :: os :: raw :: c_int , pub worker_id : :: std :: os :: raw :: c_int , pub device_number : :: std :: os :: raw :: c_int , pub driver_type : starpu_prof_tool_driver_type , pub memnode : :: std :: os :: raw :: c_uint , pub bytes_to_transfer : :: std :: os :: raw :: c_uint , pub bytes_transfered : :: std :: os :: raw :: c_uint , pub fun_ptr : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_info > () - 64usize] ; ["Alignment of starpu_prof_tool_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_info > () - 8usize] ; ["Offset of field: starpu_prof_tool_info::conf"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , conf) - 0usize] ; ["Offset of field: starpu_prof_tool_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , event_type) - 8usize] ; ["Offset of field: starpu_prof_tool_info::starpu_version"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , starpu_version) - 12usize] ; ["Offset of field: starpu_prof_tool_info::thread_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , thread_id) - 24usize] ; ["Offset of field: starpu_prof_tool_info::worker_id"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , worker_id) - 28usize] ; ["Offset of field: starpu_prof_tool_info::device_number"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , device_number) - 32usize] ; ["Offset of field: starpu_prof_tool_info::driver_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , driver_type) - 36usize] ; ["Offset of field: starpu_prof_tool_info::memnode"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , memnode) - 40usize] ; ["Offset of field: starpu_prof_tool_info::bytes_to_transfer"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_to_transfer) - 44usize] ; ["Offset of field: starpu_prof_tool_info::bytes_transfered"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , bytes_transfered) - 48usize] ; ["Offset of field: starpu_prof_tool_info::fun_ptr"] [:: std :: mem :: offset_of ! (starpu_prof_tool_info , fun_ptr) - 56usize] ; } ; impl Default for starpu_prof_tool_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 () } } } # [doc = "Event info"] # [repr (C)] # [derive (Copy , Clone)] pub union starpu_prof_tool_event_info { pub event_type : starpu_prof_tool_event , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_event_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Alignment of starpu_prof_tool_event_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_event_info > () - 4usize] ; ["Offset of field: starpu_prof_tool_event_info::event_type"] [:: std :: mem :: offset_of ! (starpu_prof_tool_event_info , event_type) - 0usize] ; } ; impl Default for starpu_prof_tool_event_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_prof_tool_event_info { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { write ! (f , "starpu_prof_tool_event_info {{ union }}") } } # [doc = "API info"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_prof_tool_api_info { } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_prof_tool_api_info"] [:: std :: mem :: size_of :: < starpu_prof_tool_api_info > () - 0usize] ; ["Alignment of starpu_prof_tool_api_info"] [:: std :: mem :: align_of :: < starpu_prof_tool_api_info > () - 1usize] ; } ; pub type starpu_prof_tool_cb_func = :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut starpu_prof_tool_info , arg2 : * mut starpu_prof_tool_event_info , arg3 : * mut starpu_prof_tool_api_info) > ; # [doc = "Register / unregister events"] pub type starpu_prof_tool_entry_register_func = :: std :: option :: Option < unsafe extern "C" fn (event_type : starpu_prof_tool_event , cb : starpu_prof_tool_cb_func , info : starpu_prof_tool_command) > ; # [doc = "A function with this signature must be implemented by external tools that want to use the callbacks"] pub type starpu_prof_tool_entry_func = :: std :: option :: Option < unsafe extern "C" fn (reg : starpu_prof_tool_entry_register_func , unreg : starpu_prof_tool_entry_register_func) > ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_fxt_codelet_event { pub symbol : [:: std :: os :: raw :: c_char ; 2048usize] , 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_codelet_event"] [:: std :: mem :: size_of :: < starpu_fxt_codelet_event > () - 2328usize] ; ["Alignment of starpu_fxt_codelet_event"] [:: std :: mem :: align_of :: < starpu_fxt_codelet_event > () - 8usize] ; ["Offset of field: starpu_fxt_codelet_event::symbol"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , symbol) - 0usize] ; ["Offset of field: starpu_fxt_codelet_event::workerid"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , workerid) - 2048usize] ; ["Offset of field: starpu_fxt_codelet_event::perfmodel_archname"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , perfmodel_archname) - 2052usize] ; ["Offset of field: starpu_fxt_codelet_event::hash"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , hash) - 2308usize] ; ["Offset of field: starpu_fxt_codelet_event::size"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , size) - 2312usize] ; ["Offset of field: starpu_fxt_codelet_event::time"] [:: std :: mem :: offset_of ! (starpu_fxt_codelet_event , time) - 2320usize] ; } ; 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 () } } } # [doc = "Store information related to clock synchronizations: mainly the offset to apply to each time."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_fxt_mpi_offset { # [doc = "< node time for the barrier at the beginning of the program"] pub local_time_start : u64 , # [doc = "< offset to apply to node time, computed at the beginning of the program"] pub offset_start : i64 , # [doc = "< node time for the barrier at the end of the program (optional)"] pub local_time_end : u64 , # [doc = "< offset to apply to node time, computed at the end of the program (optional)"] pub offset_end : i64 , # [doc = "< number of barriers to synchronize clocks during the execution of the program\n(can be 0, 1 or 2)"] pub nb_barriers : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_mpi_offset"] [:: std :: mem :: size_of :: < starpu_fxt_mpi_offset > () - 40usize] ; ["Alignment of starpu_fxt_mpi_offset"] [:: std :: mem :: align_of :: < starpu_fxt_mpi_offset > () - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_start) - 0usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_start"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_start) - 8usize] ; ["Offset of field: starpu_fxt_mpi_offset::local_time_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , local_time_end) - 16usize] ; ["Offset of field: starpu_fxt_mpi_offset::offset_end"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , offset_end) - 24usize] ; ["Offset of field: starpu_fxt_mpi_offset::nb_barriers"] [:: std :: mem :: offset_of ! (starpu_fxt_mpi_offset , nb_barriers) - 32usize] ; } ; # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 sched_tasks_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 papi_path : * mut :: std :: os :: raw :: c_char , pub comms_path : * mut :: std :: os :: raw :: c_char , pub number_events_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 , pub worker_names : [[:: std :: os :: raw :: c_char ; 256usize] ; 48usize] , pub nworkers : :: std :: os :: raw :: c_int , pub worker_archtypes : [starpu_perfmodel_arch ; 48usize] , # [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 synchronize clocks and apply an offset."] pub file_offset : starpu_fxt_mpi_offset , # [doc = "In case we are going to gather multiple traces (e.g in the case of\nMPI processes), this variable stores the MPI rank of the trace file."] pub file_rank : :: 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, number\nof dumped codelets."] pub dumped_codelets_count : :: std :: os :: raw :: c_long , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_fxt_options"] [:: std :: mem :: size_of :: < starpu_fxt_options > () - 13800usize] ; ["Alignment of starpu_fxt_options"] [:: std :: mem :: align_of :: < starpu_fxt_options > () - 8usize] ; ["Offset of field: starpu_fxt_options::per_task_colour"] [:: std :: mem :: offset_of ! (starpu_fxt_options , per_task_colour) - 0usize] ; ["Offset of field: starpu_fxt_options::no_events"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_events) - 4usize] ; ["Offset of field: starpu_fxt_options::no_counter"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_counter) - 8usize] ; ["Offset of field: starpu_fxt_options::no_bus"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_bus) - 12usize] ; ["Offset of field: starpu_fxt_options::no_flops"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_flops) - 16usize] ; ["Offset of field: starpu_fxt_options::ninputfiles"] [:: std :: mem :: offset_of ! (starpu_fxt_options , ninputfiles) - 20usize] ; ["Offset of field: starpu_fxt_options::no_smooth"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_smooth) - 24usize] ; ["Offset of field: starpu_fxt_options::no_acquire"] [:: std :: mem :: offset_of ! (starpu_fxt_options , no_acquire) - 28usize] ; ["Offset of field: starpu_fxt_options::memory_states"] [:: std :: mem :: offset_of ! (starpu_fxt_options , memory_states) - 32usize] ; ["Offset of field: starpu_fxt_options::internal"] [:: std :: mem :: offset_of ! (starpu_fxt_options , internal) - 36usize] ; ["Offset of field: starpu_fxt_options::label_deps"] [:: std :: mem :: offset_of ! (starpu_fxt_options , label_deps) - 40usize] ; ["Offset of field: starpu_fxt_options::filenames"] [:: std :: mem :: offset_of ! (starpu_fxt_options , filenames) - 48usize] ; ["Offset of field: starpu_fxt_options::out_paje_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , out_paje_path) - 560usize] ; ["Offset of field: starpu_fxt_options::distrib_time_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , distrib_time_path) - 568usize] ; ["Offset of field: starpu_fxt_options::activity_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , activity_path) - 576usize] ; ["Offset of field: starpu_fxt_options::sched_tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , sched_tasks_path) - 584usize] ; ["Offset of field: starpu_fxt_options::dag_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dag_path) - 592usize] ; ["Offset of field: starpu_fxt_options::tasks_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , tasks_path) - 600usize] ; ["Offset of field: starpu_fxt_options::data_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , data_path) - 608usize] ; ["Offset of field: starpu_fxt_options::papi_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , papi_path) - 616usize] ; ["Offset of field: starpu_fxt_options::comms_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , comms_path) - 624usize] ; ["Offset of field: starpu_fxt_options::number_events_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , number_events_path) - 632usize] ; ["Offset of field: starpu_fxt_options::anim_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , anim_path) - 640usize] ; ["Offset of field: starpu_fxt_options::states_path"] [:: std :: mem :: offset_of ! (starpu_fxt_options , states_path) - 648usize] ; ["Offset of field: starpu_fxt_options::dir"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dir) - 656usize] ; ["Offset of field: starpu_fxt_options::worker_names"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_names) - 664usize] ; ["Offset of field: starpu_fxt_options::nworkers"] [:: std :: mem :: offset_of ! (starpu_fxt_options , nworkers) - 12952usize] ; ["Offset of field: starpu_fxt_options::worker_archtypes"] [:: std :: mem :: offset_of ! (starpu_fxt_options , worker_archtypes) - 12960usize] ; ["Offset of field: starpu_fxt_options::file_prefix"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_prefix) - 13728usize] ; ["Offset of field: starpu_fxt_options::file_offset"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_offset) - 13736usize] ; ["Offset of field: starpu_fxt_options::file_rank"] [:: std :: mem :: offset_of ! (starpu_fxt_options , file_rank) - 13776usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets) - 13784usize] ; ["Offset of field: starpu_fxt_options::dumped_codelets_count"] [:: std :: mem :: offset_of ! (starpu_fxt_options , dumped_codelets_count) - 13792usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_fxt_options_init (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_options_shutdown (options : * mut starpu_fxt_options) ; } unsafe extern "C" { pub fn starpu_fxt_generate_trace (options : * mut starpu_fxt_options) ; } unsafe 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.\nThis function has to be called before starpu_init().\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_autostart_profiling (autostart : :: std :: os :: raw :: c_int) ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_start_profiling () ; } unsafe 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.\nSee \\ref LimitingScopeTrace for more details."] pub fn starpu_fxt_stop_profiling () ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace (filename_in : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_fxt_write_data_trace_in_dir (filename_in : * mut :: std :: os :: raw :: c_char , dir : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Wrapper to get value of env variable STARPU_FXT_TRACE"] pub fn starpu_fxt_is_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Add an event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event (code : :: std :: os :: raw :: c_ulong) ; } unsafe extern "C" { # [doc = "Add a string event in the execution trace if FxT is enabled.\nSee \\ref CreatingAGanttDiagram for more details."] pub fn starpu_fxt_trace_user_event_string (s : * const :: std :: os :: raw :: c_char) ; } unsafe extern "C" { # [doc = "Pre-initialize drivers\nSo as to register information on device types, memory types, etc.\nOnly use internally by StarPU."] pub fn starpu_drivers_preinit () ; } # [doc = "structure for designating a given driver. See \\ref UsingTheDriverAPI for more details."] # [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 hip_id : __BindgenUnionField < :: std :: os :: raw :: c_uint > , pub opencl_id : __BindgenUnionField < cl_device_id > , pub bindgen_union_field : u64 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver__bindgen_ty_1"] [:: std :: mem :: size_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Alignment of starpu_driver__bindgen_ty_1"] [:: std :: mem :: align_of :: < starpu_driver__bindgen_ty_1 > () - 8usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cpu_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cpu_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::cuda_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , cuda_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::hip_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , hip_id) - 0usize] ; ["Offset of field: starpu_driver__bindgen_ty_1::opencl_id"] [:: std :: mem :: offset_of ! (starpu_driver__bindgen_ty_1 , opencl_id) - 0usize] ; } ; 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 }}") } } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_driver"] [:: std :: mem :: size_of :: < starpu_driver > () - 16usize] ; ["Alignment of starpu_driver"] [:: std :: mem :: align_of :: < starpu_driver > () - 8usize] ; ["Offset of field: starpu_driver::type_"] [:: std :: mem :: offset_of ! (starpu_driver , type_) - 0usize] ; ["Offset of field: starpu_driver::id"] [:: std :: mem :: offset_of ! (starpu_driver , id) - 8usize] ; } ; 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) } } unsafe 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-EINVAL 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().\n\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Notify all running drivers that they should terminate.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_drivers_request_termination () ; } unsafe extern "C" { # [doc = "Initialize the given driver. Return 0 on success, -EINVAL\nif starpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_init (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Run the driver once, then return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_run_once (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Deinitialize the given driver. Return 0 on success, -EINVAL if\nstarpu_driver::type is not a valid ::starpu_worker_archtype.\nSee \\ref UsingTheDriverAPI for more details."] pub fn starpu_driver_deinit (d : * mut starpu_driver) -> :: std :: os :: raw :: c_int ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_tree"] [:: std :: mem :: size_of :: < starpu_tree > () - 32usize] ; ["Alignment of starpu_tree"] [:: std :: mem :: align_of :: < starpu_tree > () - 8usize] ; ["Offset of field: starpu_tree::nodes"] [:: std :: mem :: offset_of ! (starpu_tree , nodes) - 0usize] ; ["Offset of field: starpu_tree::father"] [:: std :: mem :: offset_of ! (starpu_tree , father) - 8usize] ; ["Offset of field: starpu_tree::arity"] [:: std :: mem :: offset_of ! (starpu_tree , arity) - 16usize] ; ["Offset of field: starpu_tree::id"] [:: std :: mem :: offset_of ! (starpu_tree , id) - 20usize] ; ["Offset of field: starpu_tree::level"] [:: std :: mem :: offset_of ! (starpu_tree , level) - 24usize] ; ["Offset of field: starpu_tree::is_pu"] [:: std :: mem :: offset_of ! (starpu_tree , is_pu) - 28usize] ; } ; 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 () } } } unsafe extern "C" { pub fn starpu_tree_reset_visited (tree : * mut starpu_tree , visited : * mut :: std :: os :: raw :: c_char) ; } unsafe extern "C" { pub fn starpu_tree_prepare_children (arity : :: std :: os :: raw :: c_uint , father : * mut starpu_tree) ; } unsafe 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) ; } unsafe extern "C" { pub fn starpu_tree_get (tree : * mut starpu_tree , id : :: std :: os :: raw :: c_int) -> * mut starpu_tree ; } unsafe 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 ; } unsafe 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)] pub struct starpu_omp_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_lock_t > () - 8usize] ; ["Alignment of starpu_omp_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_lock_t , internal) - 0usize] ; } ; 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)] pub struct starpu_omp_nest_lock_t { # [doc = "< opaque pointer for internal use"] pub internal : * mut :: std :: os :: raw :: c_void , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_nest_lock_t"] [:: std :: mem :: size_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Alignment of starpu_omp_nest_lock_t"] [:: std :: mem :: align_of :: < starpu_omp_nest_lock_t > () - 8usize] ; ["Offset of field: starpu_omp_nest_lock_t::internal"] [:: std :: mem :: offset_of ! (starpu_omp_nest_lock_t , internal) - 0usize] ; } ; 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 chosen 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)] 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 pragma omp parallel 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_parallel_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_parallel_region_attr > () - 872usize] ; ["Alignment of starpu_omp_parallel_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_parallel_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_parallel_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_parallel_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_parallel_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , if_clause) - 860usize] ; ["Offset of field: starpu_omp_parallel_region_attr::num_threads"] [:: std :: mem :: offset_of ! (starpu_omp_parallel_region_attr , num_threads) - 864usize] ; } ; 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)] 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 pragma omp task is true or false."] pub if_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b final clause of the\ncorresponding pragma omp task is true or false."] pub final_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b untied clause of the\ncorresponding pragma omp task is true or false."] pub untied_clause : :: std :: os :: raw :: c_int , # [doc = "Boolean indicating whether the \\b mergeable clause of the\ncorresponding pragma omp task 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_omp_task_region_attr"] [:: std :: mem :: size_of :: < starpu_omp_task_region_attr > () - 936usize] ; ["Alignment of starpu_omp_task_region_attr"] [:: std :: mem :: align_of :: < starpu_omp_task_region_attr > () - 8usize] ; ["Offset of field: starpu_omp_task_region_attr::cl"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl) - 0usize] ; ["Offset of field: starpu_omp_task_region_attr::handles"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , handles) - 832usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg) - 840usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_size"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_size) - 848usize] ; ["Offset of field: starpu_omp_task_region_attr::cl_arg_free"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , cl_arg_free) - 856usize] ; ["Offset of field: starpu_omp_task_region_attr::priority"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , priority) - 860usize] ; ["Offset of field: starpu_omp_task_region_attr::if_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , if_clause) - 864usize] ; ["Offset of field: starpu_omp_task_region_attr::final_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , final_clause) - 868usize] ; ["Offset of field: starpu_omp_task_region_attr::untied_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , untied_clause) - 872usize] ; ["Offset of field: starpu_omp_task_region_attr::mergeable_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , mergeable_clause) - 876usize] ; ["Offset of field: starpu_omp_task_region_attr::is_loop"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , is_loop) - 880usize] ; ["Offset of field: starpu_omp_task_region_attr::nogroup_clause"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nogroup_clause) - 884usize] ; ["Offset of field: starpu_omp_task_region_attr::collapse"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , collapse) - 888usize] ; ["Offset of field: starpu_omp_task_region_attr::num_tasks"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , num_tasks) - 892usize] ; ["Offset of field: starpu_omp_task_region_attr::nb_iterations"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , nb_iterations) - 896usize] ; ["Offset of field: starpu_omp_task_region_attr::grainsize"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , grainsize) - 904usize] ; ["Offset of field: starpu_omp_task_region_attr::begin_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , begin_i) - 912usize] ; ["Offset of field: starpu_omp_task_region_attr::end_i"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , end_i) - 920usize] ; ["Offset of field: starpu_omp_task_region_attr::chunk"] [:: std :: mem :: offset_of ! (starpu_omp_task_region_attr , chunk) - 928usize] ; } ; 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 () } } } unsafe extern "C" { # [doc = "Initialize StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_init () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Shutdown StarPU and its OpenMP Runtime support. See \\ref OMPInitExit for more details."] pub fn starpu_omp_shutdown () ; } unsafe 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 \\#pragma omp parallel.\nSee \\ref OMPParallel for more details."] pub fn starpu_omp_parallel_region (attr : * const starpu_omp_parallel_region_attr) ; } unsafe 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 \\#pragma omp master.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp master without code\noutlining.\n\\return !0 if called by the region's master thread.\n\\return 0 if not called by the region's master thread.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_master_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp barrier.\nSee \\ref OMPBarrier for more details."] pub fn starpu_omp_barrier () ; } unsafe 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 name == NULL, the selected critical\nsection is the unique anonymous critical section.\n\nThis function can be used to implement \\#pragma omp\ncritical.\n\nSee \\ref OMPCritical for more details."] 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) ; } unsafe 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 name == NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_begin (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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\nname==NULL, 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 \\#pragma omp critical without code outlining.\n\nSee \\ref OMPCritical for more details."] pub fn starpu_omp_critical_inline_end (name : * const :: std :: os :: raw :: c_char) ; } unsafe 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(nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp single.\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single without code\noutlining.\n\\return !0 if the calling thread has won the election.\n\\return 0 if the calling thread has lost the election.\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_inline () -> :: std :: os :: raw :: c_int ; } unsafe 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 \\#pragma omp single 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\n\nSee \\ref OMPSingle for more details."] 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) ; } unsafe 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 \\#pragma omp single with a copyprivate\nclause without code outlining.\n\n\\sa starpu_omp_single_copyprivate_inline\n\\sa starpu_omp_single_copyprivate_inline_end\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_begin (data : * mut :: std :: os :: raw :: c_void) -> * mut :: std :: os :: raw :: c_void ; } unsafe extern "C" { # [doc = "Complete the execution of a single section and return the\nbroadcasted copyprivate pointer for tasks that lost the election and NULL for\nthe task that won the election. This function can be used to implement\n\\#pragma omp single with a copyprivate clause without code outlining.\n\nReturn the copyprivate pointer for tasks that lost the election and therefore did not execute the code of the single section.\nReturn NULL 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\n\nSee \\ref OMPSingle for more details."] pub fn starpu_omp_single_copyprivate_inline_end () ; } unsafe 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 \\#pragma omp for 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(ordered==!0) or not (ordered==0). \\p nowait is a flag\nindicating whether an implicit barrier is requested after the for section\n(nowait==0) or not (nowait==!0).\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 \\#pragma omp for.\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\return !0 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 0 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\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for.\n\n\\sa starpu_omp_for\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_first\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp for without code outlining.\n\n\\sa starpu_omp_for\n\\sa starpu_omp_for_alt\n\\sa starpu_omp_for_inline_next\n\nSee \\ref OMPFor for more details."] 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 ; } unsafe 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 \\#pragma omp ordered.\n\nSee \\ref OMPFor for more details."] 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) ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_begin () ; } unsafe 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 \\#pragma omp ordered without code code outlining.\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_ordered_inline_end () ; } unsafe 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 (nowait==0) or not (nowait==!0).\n\nThis function can be used to implement \\#pragma omp sections and \\#pragma omp section.\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp sections and \\#pragma omp section.\n\n\\sa starpu_omp_sections\n\nSee \\ref OMPSections for more details."] 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) ; } unsafe 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 \\#pragma omp task.\n\nSee \\ref OMPTaskExplicit for more details."] pub fn starpu_omp_task_region (attr : * const starpu_omp_task_region_attr) ; } unsafe 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 \\#pragma omp taskwait.\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskwait () ; } unsafe 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 \\#pragma omp taskgroup.\n\n\\sa starpu_omp_taskgroup_inline_begin\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] 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) ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_end\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_begin () ; } unsafe 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 \\#pragma omp taskgroup without code outlining.\n\n\\sa starpu_omp_taskgroup\n\\sa starpu_omp_taskgroup_inline_begin\n\nSee \\ref OMPTaskSyncs for more details."] pub fn starpu_omp_taskgroup_inline_end () ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_begin (attr : * mut starpu_omp_task_region_attr) ; } unsafe extern "C" { pub fn starpu_omp_taskloop_inline_end (attr : * const starpu_omp_task_region_attr) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_num_threads (threads : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_num () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_threads () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_procs () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return whether it is called from the scope of a parallel region or not.\n\n\\return !0 if called from a parallel region scope.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_parallel () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_dynamic (dynamic_threads : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the state of dynamic thread number adjustment.\n\n\\return !0 if dynamic thread number adjustment is enabled.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_dynamic\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_dynamic () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_nested (nested : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return whether nested parallel sections are enabled or not.\n\n\\return !0 if nested parallel sections are enabled.\n\\return 0 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_nested () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the state of the cancel ICVS var.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_cancellation () -> :: std :: os :: raw :: c_int ; } unsafe 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 information such as the chunk size,\nin accordance with the OpenMP specification.\n\n\\sa starpu_omp_get_schedule\n\nSee \\ref OMPFor for more details."] pub fn starpu_omp_set_schedule (kind : starpu_omp_sched_value , modifier : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the kind and the modifier of the current default loop scheduler.\n\n\\sa starpu_omp_set_schedule\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_schedule (kind : * mut starpu_omp_sched_value , modifier : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the number of StarPU CPU workers.\n\n\\return the number of StarPU CPU workers.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_thread_limit () -> :: std :: os :: raw :: c_int ; } unsafe 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 1 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_max_active_levels (max_levels : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_active_levels () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_level () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_ancestor_thread_num (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_size (level : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_active_level () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current task is final or not.\n\n\\return !0 if called from a final task.\n\\return 0 otherwise.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_in_final () -> :: std :: os :: raw :: c_int ; } unsafe 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.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_proc_bind () -> starpu_omp_proc_bind_value ; } unsafe extern "C" { # [doc = "Return the number of places available to the execution environment in the place list.\n\n\\return the number of places available to the execution environment in the place list.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of processors available to the execution environment in the specified place.\n\n\\return the number of processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num_procs (place_num : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the numerical identifiers of the processors available to the execution environment in the specified place.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_proc_ids (place_num : :: std :: os :: raw :: c_int , ids : * mut :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the place number of the place to which the encountering thread is bound.\n\n\\return the place number of the place to which the encountering thread is bound.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_place_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of places in the place partition of the innermost implicit task.\n\n\\return the number of places in the place partition of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_num_places () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_partition_place_nums (place_nums : * mut :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_set_default_device (device_num : :: std :: os :: raw :: c_int) ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_default_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the number of the devices.\n\n\\return the number of the devices.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_devices () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_num_teams () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_team_num () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Check whether the current device is the initial device or not.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_is_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return a device number that represents the host device.\n\n\\return a device number that represents the host device.\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_initial_device () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the maximum value that can be specified in the priority\nclause.\n\n\\return !0 if called from the host device.\n\\return 0 otherwise.\n\n\\sa starpu_omp_set_default_device\n\\sa starpu_omp_get_default_device\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_max_task_priority () -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_init_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_destroy_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_set_lock (lock : * mut starpu_omp_lock_t) ; } unsafe 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_unset_lock (lock : * mut starpu_omp_lock_t) ; } unsafe extern "C" { # [doc = "Unblockingly attempt to lock a lock object and return whether\nit succeeded or not.\n\n\\return !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPSimpleLock for more details."] pub fn starpu_omp_test_lock (lock : * mut starpu_omp_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_init_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_destroy_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_set_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_unset_nest_lock (lock : * mut starpu_omp_nest_lock_t) ; } unsafe 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 !0 if the function succeeded in acquiring the lock.\n\\return 0 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\n\nSee \\ref OMPNestableLock for more details."] pub fn starpu_omp_test_nest_lock (lock : * mut starpu_omp_nest_lock_t) -> :: std :: os :: raw :: c_int ; } unsafe 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 () ; } unsafe 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 () ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtime () -> f64 ; } unsafe 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\n\nSee \\ref OMPStandard for more details."] pub fn starpu_omp_get_wtick () -> f64 ; } unsafe 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) ; } unsafe extern "C" { # [doc = "Only use internally by StarPU."] pub fn starpu_omp_get_default_arbiter () -> * mut starpu_arbiter ; } unsafe extern "C" { # [doc = "Register a handle for ptr->handle data lookup.\n\n\\sa starpu_omp_handle_unregister\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_register (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Unregister a handle from ptr->handle data lookup.\n\n\\sa starpu_omp_handle_register\n\\sa starpu_omp_data_lookup\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_handle_unregister (handle : starpu_data_handle_t) ; } unsafe extern "C" { # [doc = "Return the handle corresponding to the data pointed to by the \\p ptr host pointer.\n\n\\return the handle or \\c NULL if not found.\n\nSee \\ref OMPDataDependencies for more details."] pub fn starpu_omp_data_lookup (ptr : * const :: std :: os :: raw :: c_void) -> starpu_data_handle_t ; } # [doc = "todo"] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_bitmap { pub bits : [:: std :: os :: raw :: c_ulong ; 1usize] , pub cardinal : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_bitmap"] [:: std :: mem :: size_of :: < starpu_bitmap > () - 16usize] ; ["Alignment of starpu_bitmap"] [:: std :: mem :: align_of :: < starpu_bitmap > () - 8usize] ; ["Offset of field: starpu_bitmap::bits"] [:: std :: mem :: offset_of ! (starpu_bitmap , bits) - 0usize] ; ["Offset of field: starpu_bitmap::cardinal"] [:: std :: mem :: offset_of ! (starpu_bitmap , cardinal) - 8usize] ; } ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_OPENMP : starpu_parallel_worker_types = 0 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_INTEL_OPENMP_MKL : starpu_parallel_worker_types = 1 ; # [doc = "< todo"] pub const STARPU_PARALLEL_WORKER_GNU_OPENMP_MKL : starpu_parallel_worker_types = 2 ; # [doc = "These represent the default available functions to enforce parallel_worker\nuse by the sub-runtime"] pub type starpu_parallel_worker_types = :: std :: os :: raw :: c_uint ; # [doc = "Parallel_Worker configuration"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_parallel_worker_config { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Create parallel_workers on the machine with the given parameters.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_init (parallel_worker_level : hwloc_obj_type_t , ...) -> * mut starpu_parallel_worker_config ; } unsafe extern "C" { # [doc = "Delete the given parallel_workers configuration"] pub fn starpu_parallel_worker_shutdown (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print the given parallel_workers configuration.\nSee \\ref CreatingParallel for more details."] pub fn starpu_parallel_worker_print (parallel_workers : * mut starpu_parallel_worker_config) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " Prologue functions"] pub fn starpu_parallel_worker_openmp_prologue (arg1 : * mut :: std :: os :: raw :: c_void) ; } # [doc = "< deprecated"] pub const STARPU_CLUSTER_OPENMP : starpu_cluster_types = 0 ; # [doc = "< deprecated"] pub const STARPU_CLUSTER_INTEL_OPENMP_MKL : starpu_cluster_types = 1 ; # [doc = "@deprecated Use ::starpu_parallel_worker_types"] pub type starpu_cluster_types = :: std :: os :: raw :: c_uint ; # [doc = " @deprecated Use starpu_parallel_worker_config"] # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_cluster_machine { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_init()"] pub fn starpu_cluster_machine (cluster_level : hwloc_obj_type_t , ...) -> * mut starpu_cluster_machine ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_shutdown()"] pub fn starpu_uncluster_machine (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = " @deprecated Use starpu_parallel_worker_print()"] pub fn starpu_cluster_print (clusters : * mut starpu_cluster_machine) -> :: std :: os :: raw :: c_int ; } # [doc = "< undefined scope"] pub const starpu_perf_counter_scope_undefined : starpu_perf_counter_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_counter_scope_global : starpu_perf_counter_scope = 2 ; # [doc = "< per-worker scope"] pub const starpu_perf_counter_scope_per_worker : starpu_perf_counter_scope = 4 ; # [doc = "< per-codelet scope"] pub const starpu_perf_counter_scope_per_codelet : starpu_perf_counter_scope = 6 ; # [doc = "Enum of all possible performance counter scopes."] pub type starpu_perf_counter_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_counter_type_undefined : starpu_perf_counter_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_counter_type_int32 : starpu_perf_counter_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_counter_type_int64 : starpu_perf_counter_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_counter_type_float : starpu_perf_counter_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_counter_type_double : starpu_perf_counter_type = 4 ; # [doc = "Enum of all possible performance counter value type."] pub type starpu_perf_counter_type = :: std :: os :: raw :: c_uint ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_listener { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_sample { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct starpu_perf_counter_set { _unused : [u8 ; 0] , } unsafe extern "C" { # [doc = "Start collecting performance counter values."] pub fn starpu_perf_counter_collection_start () ; } unsafe extern "C" { # [doc = "Stop collecting performance counter values."] pub fn starpu_perf_counter_collection_stop () ; } unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_counter_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_counter_scope_id_to_name (scope : starpu_perf_counter_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_counter_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_counter_type_id_to_name (type_ : starpu_perf_counter_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance counters for the given scope."] pub fn starpu_perf_counter_nb (scope : starpu_perf_counter_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter name to its id."] pub fn starpu_perf_counter_name_to_id (scope : starpu_perf_counter_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance counter rank in its scope to its counter id."] pub fn starpu_perf_counter_nth_to_id (scope : starpu_perf_counter_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a counter id to its name constant string."] pub fn starpu_perf_counter_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the counter's type id."] pub fn starpu_perf_counter_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the counter's help string."] pub fn starpu_perf_counter_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of counters defined in the given scope."] pub fn starpu_perf_counter_list_avail (scope : starpu_perf_counter_scope) ; } unsafe extern "C" { # [doc = "Display the list of counters defined in all scopes."] pub fn starpu_perf_counter_list_all_avail () ; } unsafe extern "C" { # [doc = "Allocate a new performance counter set."] pub fn starpu_perf_counter_set_alloc (scope : starpu_perf_counter_scope) -> * mut starpu_perf_counter_set ; } unsafe extern "C" { # [doc = "Free a performance counter set."] pub fn starpu_perf_counter_set_free (set : * mut starpu_perf_counter_set) ; } unsafe extern "C" { # [doc = "Enable a given counter in the set."] pub fn starpu_perf_counter_set_enable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Disable a given counter in the set."] pub fn starpu_perf_counter_set_disable_id (set : * mut starpu_perf_counter_set , id : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Initialize a new performance counter listener."] pub fn starpu_perf_counter_listener_init (set : * mut starpu_perf_counter_set , callback : :: std :: option :: Option < unsafe extern "C" fn (listener : * mut starpu_perf_counter_listener , sample : * mut starpu_perf_counter_sample , context : * mut :: std :: os :: raw :: c_void) > , user_arg : * mut :: std :: os :: raw :: c_void) -> * mut starpu_perf_counter_listener ; } unsafe extern "C" { # [doc = "End a performance counter listener."] pub fn starpu_perf_counter_listener_exit (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the global scope."] pub fn starpu_perf_counter_set_global_listener (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a listener for the per_worker scope on a given worker."] pub fn starpu_perf_counter_set_per_worker_listener (workerid : :: std :: os :: raw :: c_uint , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a common listener for all workers."] pub fn starpu_perf_counter_set_all_per_worker_listeners (listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Set a per_codelet listener for a codelet."] pub fn starpu_perf_counter_set_per_codelet_listener (cl : * mut starpu_codelet , listener : * mut starpu_perf_counter_listener) ; } unsafe extern "C" { # [doc = "Unset the global listener."] pub fn starpu_perf_counter_unset_global_listener () ; } unsafe extern "C" { # [doc = "Unset the per_worker listener."] pub fn starpu_perf_counter_unset_per_worker_listener (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Unset all per_worker listeners."] pub fn starpu_perf_counter_unset_all_per_worker_listeners () ; } unsafe extern "C" { # [doc = "Unset a per_codelet listener."] pub fn starpu_perf_counter_unset_per_codelet_listener (cl : * mut starpu_codelet) ; } unsafe extern "C" { # [doc = "Read an int32 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int32_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Read an int64 counter value from a sample."] pub fn starpu_perf_counter_sample_get_int64_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Read a float counter value from a sample."] pub fn starpu_perf_counter_sample_get_float_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Read a double counter value from a sample."] pub fn starpu_perf_counter_sample_get_double_value (sample : * mut starpu_perf_counter_sample , counter_id : :: std :: os :: raw :: c_int) -> f64 ; } # [doc = "< undefined scope"] pub const starpu_perf_knob_scope_undefined : starpu_perf_knob_scope = 0 ; # [doc = "< global scope"] pub const starpu_perf_knob_scope_global : starpu_perf_knob_scope = 1 ; # [doc = "< per-worker scope"] pub const starpu_perf_knob_scope_per_worker : starpu_perf_knob_scope = 3 ; # [doc = "< per-scheduler scope"] pub const starpu_perf_knob_scope_per_scheduler : starpu_perf_knob_scope = 5 ; # [doc = "Enum of all possible performance knob scopes."] pub type starpu_perf_knob_scope = :: std :: os :: raw :: c_uint ; # [doc = "< undefined value type"] pub const starpu_perf_knob_type_undefined : starpu_perf_knob_type = 0 ; # [doc = "< signed 32-bit integer value"] pub const starpu_perf_knob_type_int32 : starpu_perf_knob_type = 1 ; # [doc = "< signed 64-bit integer value"] pub const starpu_perf_knob_type_int64 : starpu_perf_knob_type = 2 ; # [doc = "< 32-bit single precision floating-point value"] pub const starpu_perf_knob_type_float : starpu_perf_knob_type = 3 ; # [doc = "< 64-bit double precision floating-point value"] pub const starpu_perf_knob_type_double : starpu_perf_knob_type = 4 ; # [doc = "Enum of all possible performance knob value type."] pub type starpu_perf_knob_type = :: std :: os :: raw :: c_uint ; unsafe extern "C" { # [doc = "Translate scope name constant string to scope id."] pub fn starpu_perf_knob_scope_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate scope id to scope name constant string."] pub fn starpu_perf_knob_scope_id_to_name (scope : starpu_perf_knob_scope) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate type name constant string to type id."] pub fn starpu_perf_knob_type_name_to_id (name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate type id to type name constant string."] pub fn starpu_perf_knob_type_id_to_name (type_ : starpu_perf_knob_type) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Return the number of performance steering knobs for the given scope."] pub fn starpu_perf_knob_nb (scope : starpu_perf_knob_scope) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_name_to_id (scope : starpu_perf_knob_scope , name : * const :: std :: os :: raw :: c_char) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob name to its id."] pub fn starpu_perf_knob_nth_to_id (scope : starpu_perf_knob_scope , nth : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Translate a performance knob rank in its scope to its knob id."] pub fn starpu_perf_knob_id_to_name (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Translate a knob id to its name constant string."] pub fn starpu_perf_knob_get_type_id (id : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return the knob's help string."] pub fn starpu_perf_knob_get_help_string (id : :: std :: os :: raw :: c_int) -> * const :: std :: os :: raw :: c_char ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in the given scope."] pub fn starpu_perf_knob_list_avail (scope : starpu_perf_knob_scope) ; } unsafe extern "C" { # [doc = "Display the list of knobs defined in all scopes."] pub fn starpu_perf_knob_list_all_avail () ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int32_value (knob_id : :: std :: os :: raw :: c_int) -> i32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_int64_value (knob_id : :: std :: os :: raw :: c_int) -> i64 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_float_value (knob_id : :: std :: os :: raw :: c_int) -> f32 ; } unsafe extern "C" { # [doc = "Get knob value for Global scope."] pub fn starpu_perf_knob_get_global_double_value (knob_id : :: std :: os :: raw :: c_int) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int32_value (knob_id : :: std :: os :: raw :: c_int , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 knob value for Global scope."] pub fn starpu_perf_knob_set_global_int64_value (knob_id : :: std :: os :: raw :: c_int , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float knob value for Global scope."] pub fn starpu_perf_knob_set_global_float_value (knob_id : :: std :: os :: raw :: c_int , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double knob value for Global scope."] pub fn starpu_perf_knob_set_global_double_value (knob_id : :: std :: os :: raw :: c_int , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for Per_worker scope."] pub fn starpu_perf_knob_get_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int32_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_int64_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_float_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for Per_worker scope."] pub fn starpu_perf_knob_set_per_worker_double_value (knob_id : :: std :: os :: raw :: c_int , workerid : :: std :: os :: raw :: c_uint , new_value : f64) ; } unsafe extern "C" { # [doc = "Get int32 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i32 ; } unsafe extern "C" { # [doc = "Get int64 value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> i64 ; } unsafe extern "C" { # [doc = "Get float value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f32 ; } unsafe extern "C" { # [doc = "Get double value for per_scheduler scope."] pub fn starpu_perf_knob_get_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char) -> f64 ; } unsafe extern "C" { # [doc = "Set int32 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int32_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i32) ; } unsafe extern "C" { # [doc = "Set int64 value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_int64_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : i64) ; } unsafe extern "C" { # [doc = "Set float value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_float_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f32) ; } unsafe extern "C" { # [doc = "Set double value for per_scheduler scope."] pub fn starpu_perf_knob_set_per_scheduler_double_value (knob_id : :: std :: os :: raw :: c_int , sched_policy_name : * const :: std :: os :: raw :: c_char , new_value : f64) ; } # [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 unless\nstarpu_conf::precedence_over_environment_variables is set."] # [repr (C)] # [derive (Debug , Copy , Clone)] 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 =\nNULL)."] 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 = NULL)"] pub sched_policy : * mut starpu_sched_policy , # [doc = "Callback function that can later be used by the scheduler.\nThe scheduler can retrieve this function by calling\nstarpu_sched_ctx_get_sched_policy_callback()"] pub sched_policy_callback : :: 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 = \\c -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 = \\c -1)"] pub ncuda : :: std :: os :: raw :: c_int , # [doc = "Number of HIP devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NHIP.\n(default = \\c -1)"] pub nhip : :: 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 = \\c -1)"] pub nopencl : :: std :: os :: raw :: c_int , # [doc = "Number of Maxeler FPGA devices that StarPU can use. This can also\nbe specified with the environment variable \\ref\nSTARPU_NMAX_FPGA.\n(default = -1)"] pub nmax_fpga : :: 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 = \\c -1)"] pub nmpi_ms : :: std :: os :: raw :: c_int , # [doc = "Number of TCP/IP Master Slave devices that StarPU can use.\nThis can also be specified with the environment variable\n\\ref STARPU_NTCPIP_MS.\n(default = \\c -1)"] pub ntcpip_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 = \\c 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 \\c hwloc library in case it is available."] pub workers_bindid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the HIP workers will be attached to\nthe HIP devices specified in the\nstarpu_conf::workers_hip_gpuid array. Otherwise, StarPU\naffects the HIP devices in a round-robin fashion. This can\nalso be specified with the environment variable \\ref\nSTARPU_WORKERS_HIPID.\n(default = \\c 0)"] pub use_explicit_workers_hip_gpuid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_hip_gpuid flag is\nset, this array contains the logical identifiers of the\nHIP devices (as used by \\c hipGetDevice())."] pub workers_hip_gpuid : [:: std :: os :: raw :: c_uint ; 48usize] , # [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 = \\c 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 ; 48usize] , # [doc = "If this flag is set, the Maxeler FPGA workers will be attached to\nthe Maxeler FPGA devices specified in the\nstarpu_conf::workers_max_fpga_deviceid array. Otherwise, StarPU\naffects the Maxeler FPGA devices in a round-robin fashion. This\ncan also be specified with the environment variable \\ref\nSTARPU_WORKERS_MAX_FPGAID.\n(default = 0)"] pub use_explicit_workers_max_fpga_deviceid : :: std :: os :: raw :: c_uint , # [doc = "If the starpu_conf::use_explicit_workers_max_fpga_deviceid flag\nis set, this array contains the logical identifiers of the\nMaxeler FPGA devices to be used."] pub workers_max_fpga_deviceid : [:: std :: os :: raw :: c_uint ; 48usize] , pub max_fpga_load : * mut :: std :: os :: raw :: c_void , # [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 = \\c 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 ; 48usize] , # [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 = \\c 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 = \\c 0)"] pub calibrate : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to enforce data locality when\nchoosing a worker to execute a task.\nThis can also be specified with the environment variable\n\\ref STARPU_DATA_LOCALITY_ENFORCE.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\nenable-data-locality-enforce \"--enable-data-locality-enforce\".\n(default = \\c 0)"] pub data_locality_enforce : :: 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 = \\c 0)"] pub single_combined_worker : :: std :: os :: raw :: c_int , # [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 = \\c 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 = \\c 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 HIP accelerators.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_HIP_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-hip-copy\n\"--disable-asynchronous-hip-copy\".\n(default = \\c 0)"] pub disable_asynchronous_hip_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 = \\c 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 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 = \\c 0)."] pub disable_asynchronous_mpi_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and TCP/IP Master Slave devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_TCPIP_MS_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-tcpip-master-slave-copy\n\"--disable-asynchronous-tcpip-master-slave-copy\".\n(default = \\c 0)."] pub disable_asynchronous_tcpip_ms_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable asynchronous copies\nbetween CPUs and Maxeler FPGA devices.\nThis can also be specified with the environment variable\n\\ref STARPU_DISABLE_ASYNCHRONOUS_MAX_FPGA_COPY.\nThis can also be specified at compilation time by giving to\nthe configure script the option \\ref\ndisable-asynchronous-fpga-copy\n\"--disable-asynchronous-fpga-copy\".\n(default = 0)."] pub disable_asynchronous_max_fpga_copy : :: std :: os :: raw :: c_int , # [doc = "This flag should be set to 1 to disable memory mapping\nsupport between memory nodes. This can also be specified\nwith the environment variable \\ref STARPU_ENABLE_MAP."] pub enable_map : :: 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 = NULL)"] 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 = NULL)"] 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 = \\c 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 , # [doc = "Set the minimum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MIN_PRIO"] pub global_sched_ctx_min_priority : :: std :: os :: raw :: c_int , # [doc = "Set the maximum priority used by priorities-aware\nschedulers.\nThis also can be specified with the environment variable \\ref\nSTARPU_MAX_PRIO"] pub global_sched_ctx_max_priority : :: std :: os :: raw :: c_int , # [doc = "Specify if StarPU should catch \\c SIGINT, \\c SIGSEGV and \\c 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 caught. 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 = "Specify whether StarPU should automatically start to collect\nperformance counters after initialization"] pub start_perf_counter_collection : :: std :: os :: raw :: c_uint , # [doc = "Minimum spinning backoff of drivers (default = \\c 1)"] pub driver_spinning_backoff_min : :: std :: os :: raw :: c_uint , # [doc = "Maximum spinning backoff of drivers. (default = \\c 32)"] pub driver_spinning_backoff_max : :: std :: os :: raw :: c_uint , # [doc = "Specify if CUDA workers should do only fast allocations\nwhen running the datawizard progress of\nother memory nodes. This will pass the interval value\n_STARPU_DATAWIZARD_ONLY_FAST_ALLOC to the allocation method.\nDefault value is 0, allowing CUDA workers to do slow\nallocations.\nThis can also be specified with the environment variable\n\\ref STARPU_CUDA_ONLY_FAST_ALLOC_OTHER_MEMNODES."] pub cuda_only_fast_alloc_other_memnodes : :: std :: os :: raw :: c_int , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of starpu_conf"] [:: std :: mem :: size_of :: < starpu_conf > () - 1376usize] ; ["Alignment of starpu_conf"] [:: std :: mem :: align_of :: < starpu_conf > () - 8usize] ; ["Offset of field: starpu_conf::magic"] [:: std :: mem :: offset_of ! (starpu_conf , magic) - 0usize] ; ["Offset of field: starpu_conf::will_use_mpi"] [:: std :: mem :: offset_of ! (starpu_conf , will_use_mpi) - 4usize] ; ["Offset of field: starpu_conf::sched_policy_name"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_name) - 8usize] ; ["Offset of field: starpu_conf::sched_policy"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy) - 16usize] ; ["Offset of field: starpu_conf::sched_policy_callback"] [:: std :: mem :: offset_of ! (starpu_conf , sched_policy_callback) - 24usize] ; ["Offset of field: starpu_conf::precedence_over_environment_variables"] [:: std :: mem :: offset_of ! (starpu_conf , precedence_over_environment_variables) - 32usize] ; ["Offset of field: starpu_conf::ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , ncpus) - 36usize] ; ["Offset of field: starpu_conf::reserve_ncpus"] [:: std :: mem :: offset_of ! (starpu_conf , reserve_ncpus) - 40usize] ; ["Offset of field: starpu_conf::ncuda"] [:: std :: mem :: offset_of ! (starpu_conf , ncuda) - 44usize] ; ["Offset of field: starpu_conf::nhip"] [:: std :: mem :: offset_of ! (starpu_conf , nhip) - 48usize] ; ["Offset of field: starpu_conf::nopencl"] [:: std :: mem :: offset_of ! (starpu_conf , nopencl) - 52usize] ; ["Offset of field: starpu_conf::nmax_fpga"] [:: std :: mem :: offset_of ! (starpu_conf , nmax_fpga) - 56usize] ; ["Offset of field: starpu_conf::nmpi_ms"] [:: std :: mem :: offset_of ! (starpu_conf , nmpi_ms) - 60usize] ; ["Offset of field: starpu_conf::ntcpip_ms"] [:: std :: mem :: offset_of ! (starpu_conf , ntcpip_ms) - 64usize] ; ["Offset of field: starpu_conf::use_explicit_workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_bindid) - 68usize] ; ["Offset of field: starpu_conf::workers_bindid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_bindid) - 72usize] ; ["Offset of field: starpu_conf::use_explicit_workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_cuda_gpuid) - 264usize] ; ["Offset of field: starpu_conf::workers_cuda_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_cuda_gpuid) - 268usize] ; ["Offset of field: starpu_conf::use_explicit_workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_hip_gpuid) - 460usize] ; ["Offset of field: starpu_conf::workers_hip_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_hip_gpuid) - 464usize] ; ["Offset of field: starpu_conf::use_explicit_workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_opencl_gpuid) - 656usize] ; ["Offset of field: starpu_conf::workers_opencl_gpuid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_opencl_gpuid) - 660usize] ; ["Offset of field: starpu_conf::use_explicit_workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_max_fpga_deviceid) - 852usize] ; ["Offset of field: starpu_conf::workers_max_fpga_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_max_fpga_deviceid) - 856usize] ; ["Offset of field: starpu_conf::max_fpga_load"] [:: std :: mem :: offset_of ! (starpu_conf , max_fpga_load) - 1048usize] ; ["Offset of field: starpu_conf::use_explicit_workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , use_explicit_workers_mpi_ms_deviceid) - 1056usize] ; ["Offset of field: starpu_conf::workers_mpi_ms_deviceid"] [:: std :: mem :: offset_of ! (starpu_conf , workers_mpi_ms_deviceid) - 1060usize] ; ["Offset of field: starpu_conf::bus_calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , bus_calibrate) - 1252usize] ; ["Offset of field: starpu_conf::calibrate"] [:: std :: mem :: offset_of ! (starpu_conf , calibrate) - 1256usize] ; ["Offset of field: starpu_conf::data_locality_enforce"] [:: std :: mem :: offset_of ! (starpu_conf , data_locality_enforce) - 1260usize] ; ["Offset of field: starpu_conf::single_combined_worker"] [:: std :: mem :: offset_of ! (starpu_conf , single_combined_worker) - 1264usize] ; ["Offset of field: starpu_conf::disable_asynchronous_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_copy) - 1268usize] ; ["Offset of field: starpu_conf::disable_asynchronous_cuda_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_cuda_copy) - 1272usize] ; ["Offset of field: starpu_conf::disable_asynchronous_hip_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_hip_copy) - 1276usize] ; ["Offset of field: starpu_conf::disable_asynchronous_opencl_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_opencl_copy) - 1280usize] ; ["Offset of field: starpu_conf::disable_asynchronous_mpi_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_mpi_ms_copy) - 1284usize] ; ["Offset of field: starpu_conf::disable_asynchronous_tcpip_ms_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_tcpip_ms_copy) - 1288usize] ; ["Offset of field: starpu_conf::disable_asynchronous_max_fpga_copy"] [:: std :: mem :: offset_of ! (starpu_conf , disable_asynchronous_max_fpga_copy) - 1292usize] ; ["Offset of field: starpu_conf::enable_map"] [:: std :: mem :: offset_of ! (starpu_conf , enable_map) - 1296usize] ; ["Offset of field: starpu_conf::cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_opengl_interoperability) - 1304usize] ; ["Offset of field: starpu_conf::n_cuda_opengl_interoperability"] [:: std :: mem :: offset_of ! (starpu_conf , n_cuda_opengl_interoperability) - 1312usize] ; ["Offset of field: starpu_conf::not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , not_launched_drivers) - 1320usize] ; ["Offset of field: starpu_conf::n_not_launched_drivers"] [:: std :: mem :: offset_of ! (starpu_conf , n_not_launched_drivers) - 1328usize] ; ["Offset of field: starpu_conf::trace_buffer_size"] [:: std :: mem :: offset_of ! (starpu_conf , trace_buffer_size) - 1336usize] ; ["Offset of field: starpu_conf::global_sched_ctx_min_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_min_priority) - 1344usize] ; ["Offset of field: starpu_conf::global_sched_ctx_max_priority"] [:: std :: mem :: offset_of ! (starpu_conf , global_sched_ctx_max_priority) - 1348usize] ; ["Offset of field: starpu_conf::catch_signals"] [:: std :: mem :: offset_of ! (starpu_conf , catch_signals) - 1352usize] ; ["Offset of field: starpu_conf::start_perf_counter_collection"] [:: std :: mem :: offset_of ! (starpu_conf , start_perf_counter_collection) - 1356usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_min"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_min) - 1360usize] ; ["Offset of field: starpu_conf::driver_spinning_backoff_max"] [:: std :: mem :: offset_of ! (starpu_conf , driver_spinning_backoff_max) - 1364usize] ; ["Offset of field: starpu_conf::cuda_only_fast_alloc_other_memnodes"] [:: std :: mem :: offset_of ! (starpu_conf , cuda_only_fast_alloc_other_memnodes) - 1368usize] ; } ; 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 () } } } unsafe 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-EINVAL indicates that the argument was NULL."] pub fn starpu_conf_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Set fields of \\p conf so that no worker is enabled, i.e. set\nstarpu_conf::ncpus = 0, starpu_conf::ncuda = 0, etc.\n\nThis allows to portably enable only a given type of worker:\n
\n\nstarpu_conf_noworker(&conf);
\nconf.ncpus = -1;\n\n\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_conf_noworker (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe 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-NULL \\p conf. Default configuration is used if \\p conf\nis NULL. Upon successful completion, this function returns\n0. Otherwise, -ENODEV indicates that no worker was available\n(and thus StarPU was not initialized). See \\ref SubmittingATask for more details."] pub fn starpu_init (conf : * mut starpu_conf) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Similar to starpu_init(), but also take the \\p argc and \\p argv as\ndefined by the application, which is necessary when running in\nSimgrid mode or MPI Master Slave mode.\nDo not call starpu_init() and starpu_initialize() in the same\nprogram. See \\ref SubmittingATask for more details."] 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 ; } unsafe extern "C" { # [doc = "Return 1 if StarPU is already initialized. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_is_initialized () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Wait for starpu_init() call to finish. See \\ref ConfigurationAndInitialization for more details."] pub fn starpu_wait_initialized () ; } unsafe 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. See \\ref SubmittingATask for more details."] pub fn starpu_shutdown () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_pause () ; } unsafe 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. See \\ref KernelThreadsStartedByStarPU and \\ref PauseResume for more details."] pub fn starpu_resume () ; } unsafe extern "C" { # [doc = "Return !0 if task processing by workers is currently paused, 0 otherwise.\nSee \\ref StarPUEatsCPUs for more details."] pub fn starpu_is_paused () -> :: std :: os :: raw :: c_int ; } unsafe 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\n::STARPU_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.\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe 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 \\p cpuid does not produce a warning.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] 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 ; } unsafe extern "C" { # [doc = "Bind the calling thread on the cores corresponding to the \\p workerid .\n\n\\p workerid can be a basic worker or a combined worker.\n\nThis can be used e.g. before initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_worker (workerid : :: std :: os :: raw :: c_uint) ; } unsafe extern "C" { # [doc = "Bind the calling thread back to the core reserved for the main thread.\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_main () ; } unsafe extern "C" { # [doc = "Bind the calling thread on the given \\p cpuid\n\nThis can be used e.g. after initializing a library which records at\ninitialization time the thread binding to be used when running kernels.\n\nSee \\ref KernelThreadsStartedByStarPU and \\ref cpuWorkers for more details."] pub fn starpu_bind_thread_on_cpu (cpuid : :: std :: os :: raw :: c_int) ; } unsafe extern "C" { # [doc = "Return the OS number of a given \\p cpuid\n\nStarPU uses logical numbering (as define by hwloc) all along, but in case\ninteraction is needed with another binding tool that uses numbering as\ndefined by the OS, we need to convert from hwloc logical numbering to hwloc\nphysical numbering."] pub fn starpu_cpu_os_index (cpuid : :: std :: os :: raw :: c_int) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Print a description of the topology on \\p f.\nSee \\ref ConfigurationAndInitialization for more details."] pub fn starpu_topology_print (f : * mut FILE) ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and\naccelerators are disabled.\nSee \\ref Basic for more details."] pub fn starpu_asynchronous_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and CUDA\naccelerators are disabled.\nSee \\ref cudaWorkers for more details."] pub fn starpu_asynchronous_cuda_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and HIP\naccelerators are disabled.\nSee \\ref hipWorkers for more details."] pub fn starpu_asynchronous_hip_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and OpenCL\naccelerators are disabled.\nSee \\ref openclWorkers for more details."] pub fn starpu_asynchronous_opencl_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and Maxeler FPGA\ndevices are disabled.\nSee \\ref maxfpgaWorkers for more details."] pub fn starpu_asynchronous_max_fpga_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and MPI Slave\ndevices are disabled.\nSee \\ref mpimsWorkers for more details."] pub fn starpu_asynchronous_mpi_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers between CPU and TCP/IP Slave\ndevices are disabled.\nSee \\ref tcpipmsWorkers for more details."] pub fn starpu_asynchronous_tcpip_ms_copy_disabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if asynchronous data transfers with a given kind of memory\nare disabled."] pub fn starpu_asynchronous_copy_disabled_for (kind : starpu_node_kind) -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Return 1 if memory mapping support between memory nodes is\nenabled.\nSee \\ref Basic for more details."] pub fn starpu_map_enabled () -> :: std :: os :: raw :: c_int ; } unsafe extern "C" { # [doc = "Call starpu_profiling_bus_helper_display_summary() and\nstarpu_profiling_worker_helper_display_summary().\nSee \\ref DataStatistics for more details."] pub fn starpu_display_stats () ; } unsafe extern "C" { # [doc = "Return as 3 integers the version of StarPU used when running the\napplication.\nSee \\ref ConfigurationAndInitialization for more details."] 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)] 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 , } # [allow (clippy :: unnecessary_operation , clippy :: identity_op)] const _ : () = { ["Size of __va_list_tag"] [:: std :: mem :: size_of :: < __va_list_tag > () - 24usize] ; ["Alignment of __va_list_tag"] [:: std :: mem :: align_of :: < __va_list_tag > () - 8usize] ; ["Offset of field: __va_list_tag::gp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , gp_offset) - 0usize] ; ["Offset of field: __va_list_tag::fp_offset"] [:: std :: mem :: offset_of ! (__va_list_tag , fp_offset) - 4usize] ; ["Offset of field: __va_list_tag::overflow_arg_area"] [:: std :: mem :: offset_of ! (__va_list_tag , overflow_arg_area) - 8usize] ; ["Offset of field: __va_list_tag::reg_save_area"] [:: std :: mem :: offset_of ! (__va_list_tag , reg_save_area) - 16usize] ; } ; 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 () } } } # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_perf_counter_sample_cl_values { pub _address : u8 , } # [doc = "@private\nThis is private to StarPU, do not modify."] # [repr (C)] # [derive (Debug , Default , Copy , Clone)] pub struct starpu_omp_task { pub _address : u8 , }
[WARN] too much data in the log, truncating it