diff --git a/Cargo.lock b/Cargo.lock index 49b550e2f..be32ae4de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,22 +16,13 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ "memchr", ] -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi", -] - [[package]] name = "atty" version = "0.2.14" @@ -45,9 +36,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base64" @@ -57,15 +48,15 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bindgen" -version = "0.59.1" +version = "0.60.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453c49e5950bb0eb63bb3df640e31618846c89d5b7faa54040d76e98e0134375" +checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" dependencies = [ "bitflags", "cexpr", "clang-sys", "clap", - "env_logger 0.8.4", + "env_logger", "lazy_static", "lazycell", "log", @@ -84,23 +75,11 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "bitvec" -version = "0.19.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55f93d0ef3363c364d5976646a38f04cf67cfe1d4c8d160cdea02cab2c116b33" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "bstr" -version = "0.2.15" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" dependencies = [ "lazy_static", "memchr", @@ -110,15 +89,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.8.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytemuck" -version = "1.7.2" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72957246c41db82b8ef88a5486143830adeb8227ef9837740bdec67724cf2c5b" +checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" [[package]] name = "byteorder" @@ -128,36 +107,36 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" [[package]] name = "capnp" -version = "0.14.3" +version = "0.14.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae9b8a7119420b5279ddc2b4ee553ee15bcf4605df6135a26f03ffe153bee97c" +checksum = "2dca085c2c7d9d65ad749d450b19b551efaa8e3476a439bdca07aca8533097f3" [[package]] name = "capnpc" -version = "0.14.4" +version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47bce811162518b5c38f746ed584bd2922ae7bb560ef64f230d2e4ee0d111fe" +checksum = "bdc9f1dc84666d4ff007b1a16c8f97db80764a624625979be05d869bcff43aaa" dependencies = [ "capnp", ] [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cexpr" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db507a7679252d2276ed0dd8113c6875ec56d3089f9225b2b42c30cc1f8e5c89" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ "nom", ] @@ -170,9 +149,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clang-sys" -version = "1.3.0" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa66045b9cb23c2e9c1520732030608b02ee07e5cfaa5a521ec15ded7fa24c90" +checksum = "5a050e2153c5be08febd6734e29298e844fdb0fa21aeddd63b4eb7baa106c69b" dependencies = [ "glob", "libc", @@ -181,17 +160,26 @@ dependencies = [ [[package]] name = "clap" -version = "2.33.3" +version = "3.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "1ed5341b2301a26ab80be5cbdced622e80ed808483c52e45e3310a877d3b37d7" dependencies = [ - "ansi_term", "atty", "bitflags", - "strsim 0.8.0", + "clap_lex", + "indexmap", + "strsim", + "termcolor", "textwrap", - "unicode-width", - "vec_map", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", ] [[package]] @@ -226,7 +214,7 @@ name = "coaster-nn" version = "0.5.0" dependencies = [ "coaster", - "env_logger 0.9.0", + "env_logger", "libc", "log", "num", @@ -244,9 +232,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -260,18 +248,18 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if", "crossbeam-utils", @@ -279,9 +267,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -290,25 +278,26 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" dependencies = [ + "autocfg", "cfg-if", "crossbeam-utils", - "lazy_static", "memoffset", + "once_cell", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ "cfg-if", - "lazy_static", + "once_cell", ] [[package]] @@ -319,7 +308,7 @@ checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" dependencies = [ "bstr", "csv-core", - "itoa", + "itoa 0.4.8", "ryu", "serde", ] @@ -333,15 +322,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ct-logs" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1a816186fa68d9e426e3cb4ae4dff1fcd8e4a2c34b781bf7a822574a0d0aac8" -dependencies = [ - "sct", -] - [[package]] name = "deflate" version = "0.8.6" @@ -361,20 +341,20 @@ dependencies = [ "lazy_static", "regex", "serde", - "strsim 0.10.0", + "strsim", ] [[package]] name = "either" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "encoding_rs" -version = "0.8.29" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ "cfg-if", ] @@ -388,19 +368,6 @@ dependencies = [ "num-traits 0.1.43", ] -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.9.0" @@ -422,7 +389,7 @@ dependencies = [ "coaster-nn", "csv", "docopt", - "env_logger 0.9.0", + "env_logger", "flate2", "futures", "futures-util", @@ -446,7 +413,7 @@ dependencies = [ "coaster-nn", "csv", "docopt", - "env_logger 0.9.0", + "env_logger", "fs-err", "greenglas", "juice", @@ -454,16 +421,23 @@ dependencies = [ "serde", ] +[[package]] +name = "fastrand" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +dependencies = [ + "instant", +] + [[package]] name = "flate2" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if", "crc32fast", - "libc", - "miniz_oxide 0.4.4", + "miniz_oxide 0.5.4", ] [[package]] @@ -489,31 +463,24 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", "percent-encoding", ] [[package]] name = "fs-err" -version = "2.6.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ebd3504ad6116843b8375ad70df74e7bfe83cac77a1f3fe73200c844d43bfe0" - -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" +checksum = "64db3e262960f0662f43a6366788d5f10f7f244b8f7d7d987f560baf5ded5c50" [[package]] name = "futures" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" +checksum = "7f21eda599937fba36daeb58a22e8f5cee2d14c4a17b5b7739c7c8e5e3b8230c" dependencies = [ "futures-channel", "futures-core", @@ -526,9 +493,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" +checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050" dependencies = [ "futures-core", "futures-sink", @@ -536,15 +503,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" +checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf" [[package]] name = "futures-executor" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" +checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab" dependencies = [ "futures-core", "futures-task", @@ -553,18 +520,16 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" +checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68" [[package]] name = "futures-macro" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" +checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" dependencies = [ - "autocfg", - "proc-macro-hack", "proc-macro2", "quote", "syn", @@ -572,23 +537,22 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" +checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56" [[package]] name = "futures-task" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" +checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1" [[package]] name = "futures-util" -version = "0.3.17" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" +checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90" dependencies = [ - "autocfg", "futures-channel", "futures-core", "futures-io", @@ -598,27 +562,25 @@ dependencies = [ "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", "slab", ] [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "gif" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3a7187e78088aead22ceedeee99779455b23fc231fe13ec443f99bb71694e5b" +checksum = "3edd93c6756b4dfaf2709eafcc345ba2636565295c198a9cfbf75fa5e3e00b06" dependencies = [ "color_quant", "weezl", @@ -642,9 +604,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.7" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd819562fcebdac5afc5c113c3ec36f902840b70fd4fc458799c8ce4607ae55" +checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" dependencies = [ "bytes", "fnv", @@ -661,9 +623,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hermit-abi" @@ -676,20 +638,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 1.0.3", ] [[package]] name = "http-body" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", "http", @@ -698,9 +660,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" @@ -716,9 +678,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.15" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436ec0091e4f20e655156a30a0df3770fe2900aa301e548e08446ec794b6953c" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", "futures-channel", @@ -729,7 +691,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 1.0.3", "pin-project-lite", "socket2", "tokio", @@ -740,19 +702,17 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.22.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" dependencies = [ - "ct-logs", - "futures-util", + "http", "hyper", "log", "rustls", "rustls-native-certs", "tokio", "tokio-rustls", - "webpki", ] [[package]] @@ -770,11 +730,10 @@ dependencies = [ [[package]] name = "idna" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] @@ -792,7 +751,7 @@ dependencies = [ "jpeg-decoder", "num-iter", "num-rational 0.3.2", - "num-traits 0.2.14", + "num-traits 0.2.15", "png", "scoped_threadpool", "tiff", @@ -800,19 +759,28 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.7.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg", "hashbrown", ] +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "ipnet" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "itoa" @@ -820,6 +788,12 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +[[package]] +name = "itoa" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" + [[package]] name = "jpeg-decoder" version = "0.1.22" @@ -831,9 +805,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.55" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -847,7 +821,7 @@ dependencies = [ "coaster", "coaster-blas", "coaster-nn", - "env_logger 0.9.0", + "env_logger", "log", "num", "rand", @@ -878,15 +852,15 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.108" +version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119" +checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" [[package]] name = "libloading" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe203d669ec979b7128619bae5a63b7b42e9203c1b29146079ee05e2f604b52" +checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ "cfg-if", "winapi", @@ -894,30 +868,24 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - [[package]] name = "memchr" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] @@ -928,6 +896,12 @@ version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "miniz_oxide" version = "0.3.7" @@ -948,25 +922,24 @@ dependencies = [ ] [[package]] -name = "mio" -version = "0.7.14" +name = "miniz_oxide" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ - "libc", - "log", - "miow", - "ntapi", - "winapi", + "adler", ] [[package]] -name = "miow" -version = "0.3.7" +name = "mio" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" dependencies = [ - "winapi", + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.36.1", ] [[package]] @@ -992,9 +965,9 @@ checksum = "a2983372caf4480544083767bf2d27defafe32af49ab4df3a0b7fc90793a3664" [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ "lazy_static", "libc", @@ -1010,23 +983,12 @@ dependencies = [ [[package]] name = "nom" -version = "6.2.1" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ - "bitvec", - "funty", "memchr", - "version_check", -] - -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", + "minimal-lexical", ] [[package]] @@ -1039,8 +1001,8 @@ dependencies = [ "num-complex", "num-integer", "num-iter", - "num-rational 0.4.0", - "num-traits 0.2.14", + "num-rational 0.4.1", + "num-traits 0.2.15", ] [[package]] @@ -1051,37 +1013,37 @@ checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] name = "num-complex" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26873667bbbb7c5182d4a37c1add32cdf09f841af72da53318fdb81543c15085" +checksum = "7ae39348c8bc5fbd7f40c727a9925f03517afd2ab27d46702108b6a7e5414c19" dependencies = [ - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ "autocfg", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] name = "num-iter" -version = "0.1.42" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" +checksum = "7d03e6c028c5dc5cac6e2dec0efda81fc887605bb3d884578bb6d6bf7514e252" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -1092,19 +1054,19 @@ checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" dependencies = [ "autocfg", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] name = "num-rational" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" +checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" dependencies = [ "autocfg", "num-bigint", "num-integer", - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] @@ -1113,23 +1075,23 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.14", + "num-traits 0.2.15", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", ] [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -1137,35 +1099,47 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.8.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "518915b97df115dd36109bfa429a48b8f737bd05508cf9588977b599648926d2" dependencies = [ "bitflags", "cfg-if", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.71" +version = "0.9.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df13d165e607909b363a4757a6f133f8a818a74e9d3a98d09c6128e15fa4c73" +checksum = "666416d899cf077260dac8698d60a60b435a46d57e82acb1be3d0dad87284e5b" dependencies = [ "autocfg", "cc", @@ -1174,6 +1148,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "os_str_bytes" +version = "6.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -1182,15 +1162,15 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pin-project-lite" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" [[package]] name = "pin-utils" @@ -1200,9 +1180,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.22" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "png" @@ -1218,56 +1198,37 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" +checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.10" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - [[package]] name = "rand" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] @@ -1289,20 +1250,11 @@ dependencies = [ "getrandom", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core", -] - [[package]] name = "rayon" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" +checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" dependencies = [ "autocfg", "crossbeam-deque", @@ -1312,14 +1264,13 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.9.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" +checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", "num_cpus", ] @@ -1328,7 +1279,7 @@ name = "rcublas" version = "0.6.0" dependencies = [ "coaster", - "env_logger 0.9.0", + "env_logger", "lazy_static", "libc", "log", @@ -1350,7 +1301,7 @@ name = "rcudnn" version = "1.8.0" dependencies = [ "coaster", - "env_logger 0.9.0", + "env_logger", "libc", "log", "num", @@ -1369,18 +1320,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.4.6" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -1395,9 +1346,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remove_dir_all" @@ -1410,15 +1361,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.6" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d2927ca2f685faf0fc620ac4834690d29e7abb153add10f5812eef20b5e280" +checksum = "b75aa69a3f06bbcc66ede33af2af253c6f7a86b1ca0033f60c580a27074fbf92" dependencies = [ "base64", "bytes", "encoding_rs", "futures-core", "futures-util", + "h2", "http", "http-body", "hyper", @@ -1433,12 +1385,14 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "tokio", "tokio-native-tls", "tokio-rustls", + "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", @@ -1480,11 +1434,10 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustls" -version = "0.19.1" +version = "0.20.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" dependencies = [ - "base64", "log", "ring", "sct", @@ -1493,30 +1446,39 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.5.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", - "rustls", + "rustls-pemfile", "schannel", "security-framework", ] +[[package]] +name = "rustls-pemfile" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +dependencies = [ + "base64", +] + [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static", - "winapi", + "windows-sys 0.36.1", ] [[package]] @@ -1533,9 +1495,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sct" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" dependencies = [ "ring", "untrusted", @@ -1543,9 +1505,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.4.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ "bitflags", "core-foundation", @@ -1556,9 +1518,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -1566,18 +1528,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.130" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2", "quote", @@ -1586,23 +1548,23 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.71" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063bf466a64011ac24040a49009724ee60a57da1b437617ceb32e53ad61bfb19" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" dependencies = [ - "itoa", + "itoa 1.0.3", "ryu", "serde", ] [[package]] name = "serde_urlencoded" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", + "itoa 1.0.3", "ryu", "serde", ] @@ -1615,15 +1577,18 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "slab" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg", +] [[package]] name = "socket2" -version = "0.4.2" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi", @@ -1635,12 +1600,6 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -[[package]] -name = "strsim" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" - [[package]] name = "strsim" version = "0.10.0" @@ -1649,30 +1608,24 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "1.0.81" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" +checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", "winapi", @@ -1680,36 +1633,33 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] [[package]] name = "textwrap" -version = "0.11.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", -] +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "8c1b05ca9d106ba7d2e31a9dab4a64e7be2cce415321966ea3132c49a656e252" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "e8f2591983642de85c921015f3f070c665a197ed69e417af436115e3a1407487" dependencies = [ "proc-macro2", "quote", @@ -1729,11 +1679,12 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi", ] @@ -1748,9 +1699,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -1763,9 +1714,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.14.0" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg", "bytes", @@ -1774,7 +1725,8 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "winapi", + "socket2", + "windows-sys 0.42.0", ] [[package]] @@ -1789,9 +1741,9 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.22.0" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ "rustls", "tokio", @@ -1800,16 +1752,16 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.9" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", "futures-sink", - "log", "pin-project-lite", "tokio", + "tracing", ] [[package]] @@ -1823,15 +1775,15 @@ dependencies = [ [[package]] name = "tower-service" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.29" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" +checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ "cfg-if", "pin-project-lite", @@ -1840,11 +1792,11 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.21" +version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" +checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -1855,13 +1807,14 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "trybuild" -version = "1.0.53" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d664de8ea7e531ad4c0f5a834f20b8cb2b8e6dfe88d05796ee7887518ed67b9" +checksum = "e7f408301c7480f9e6294eb779cfc907f54bd901a9660ef24d7f233ed5376485" dependencies = [ "glob", - "lazy_static", + "once_cell", "serde", + "serde_derive", "serde_json", "termcolor", "toml", @@ -1869,31 +1822,25 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - [[package]] name = "untrusted" version = "0.7.1" @@ -1902,13 +1849,12 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", "idna", - "matches", "percent-encoding", ] @@ -1918,18 +1864,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - -[[package]] -name = "version_check" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - [[package]] name = "want" version = "0.3.0" @@ -1942,15 +1876,21 @@ dependencies = [ [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1958,13 +1898,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1973,9 +1913,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.28" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if", "js-sys", @@ -1985,9 +1925,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1995,9 +1935,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -2008,15 +1948,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.78" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "web-sys" -version = "0.3.55" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -2024,9 +1964,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.21.4" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" dependencies = [ "ring", "untrusted", @@ -2034,26 +1974,28 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.21.1" +version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" dependencies = [ "webpki", ] [[package]] name = "weezl" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b77fdfd5a253be4ab714e4ffa3c49caf146b4de743e97510c0656cf90f1e8e" +checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" [[package]] name = "which" -version = "3.1.1" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d011071ae14a2f6671d0b74080ae0cd8ebf3a6f8c9589a2cd45f23126fe29724" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ + "either", "libc", + "once_cell", ] [[package]] @@ -2088,16 +2030,110 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "winreg" -version = "0.7.0" +name = "windows-sys" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "winapi", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] -name = "wyz" -version = "0.2.0" +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] diff --git a/coaster-nn/src/frameworks/cuda/mod.rs b/coaster-nn/src/frameworks/cuda/mod.rs index 085b12c30..a37ad268a 100644 --- a/coaster-nn/src/frameworks/cuda/mod.rs +++ b/coaster-nn/src/frameworks/cuda/mod.rs @@ -831,14 +831,17 @@ where fn generate_rnn_weight_description( &self, rnn_config: &Self::CRNN, - batch_size: i32, input_size: i32, ) -> Result, Error> { let cudnn_framework = self.framework().cudnn(); let data_type = ::cudnn_data_type(); - // MiniBatch, LayerSize, 1 - let dim_x = vec![batch_size, input_size, 1]; + // According to cuDNN API reference and examples, xDesc should have a + // least 3 dimensions with batch_size being the first. However, weights + // size does not depend on batch size and we'd like to avoid having to + // specify batch size in advance (as it can change during execution). + // So we use batch_size = 1 as it appers to work well. + let dim_x = vec![1, input_size, 1]; let stride_x = vec![dim_x[2] * dim_x[1], dim_x[2], 1]; // dummy desc to get the param size diff --git a/coaster-nn/src/frameworks/native/mod.rs b/coaster-nn/src/frameworks/native/mod.rs index 934a88044..e4a6aabff 100644 --- a/coaster-nn/src/frameworks/native/mod.rs +++ b/coaster-nn/src/frameworks/native/mod.rs @@ -887,7 +887,6 @@ where fn generate_rnn_weight_description( &self, rnn_config: &Self::CRNN, - batch_size: i32, input_size: i32, ) -> Result, Error> { // This will end up being the tensor descriptor for the weights associated with the RNN pass diff --git a/coaster-nn/src/plugin.rs b/coaster-nn/src/plugin.rs index 4db4cbae3..4489b7410 100644 --- a/coaster-nn/src/plugin.rs +++ b/coaster-nn/src/plugin.rs @@ -329,7 +329,6 @@ pub trait Rnn: NN { fn generate_rnn_weight_description( &self, rnn_config: &Self::CRNN, - batch_size: i32, input_size: i32, ) -> Result, crate::co::error::Error>; diff --git a/coaster-nn/src/tests/rnn.rs b/coaster-nn/src/tests/rnn.rs index 861bb07ab..29bf4687a 100644 --- a/coaster-nn/src/tests/rnn.rs +++ b/coaster-nn/src/tests/rnn.rs @@ -55,7 +55,7 @@ where .unwrap(); let filter_dimensions = backend - .generate_rnn_weight_description(&rnn_config, BATCH_SIZE as i32, INPUT_SIZE as i32) + .generate_rnn_weight_description(&rnn_config, INPUT_SIZE as i32) .unwrap(); let w = uniformly_random_tensor::( diff --git a/juice-examples/mackey-glass-rnn-regression/README.md b/juice-examples/mackey-glass-rnn-regression/README.md index 116dac2c5..fb042dd4e 100644 --- a/juice-examples/mackey-glass-rnn-regression/README.md +++ b/juice-examples/mackey-glass-rnn-regression/README.md @@ -39,13 +39,14 @@ Rustflags must be set to link natively to `cuda.lib` and `cudnn.h` in the patter A generated version of Mackey-Glass is packaged with Juice, and packaged in a way suitable for RNN networks. ```bash +cd juice-examples/mackey-glass-rnn-regression # Train a RNN Network (*nix) -./target/release/example-rnn-regression train --file=SavedRNNNetwork.juice --learningRate=0.01 --batchSize=40 +../../target/release/example-rnn-regression train --learning-rate=0.01 --batch-size=40 SavedRNNNetwork.juice # Train a RNN Network (Windows) -.\target\release\example-rnn-regression.exe train --file=SavedRNNNetwork.juice --learningRate=0.01 --batchSize=40 +..\..\target\release\example-rnn-regression.exe train --learning-rate=0.01 --batch-size=40 SavedRNNNetwork.juice # Test the RNN Network (*nix) -../target/release/example-rnn-regression test --file=SavedRNNNetwork.juice +../../target/release/example-rnn-regression test --batch-size=40 SavedRNNNetwork.juice # Test the RNN Network (Windows) -cd ../target/release/ && example-rnn-regression.exe test --file=SavedRNNNetwork.juice +..\..\target\release\example-rnn-regression.exe test --batch-size=40 SavedRNNNetwork.juice ``` diff --git a/juice-examples/mackey-glass-rnn-regression/rnn.juice b/juice-examples/mackey-glass-rnn-regression/rnn.juice new file mode 100644 index 000000000..75c4dc2a2 Binary files /dev/null and b/juice-examples/mackey-glass-rnn-regression/rnn.juice differ diff --git a/juice-examples/mnist-image-multiclass-classification/Cargo.toml b/juice-examples/mnist-image-multiclass-classification/Cargo.toml index 072068b36..32cc809f6 100644 --- a/juice-examples/mnist-image-multiclass-classification/Cargo.toml +++ b/juice-examples/mnist-image-multiclass-classification/Cargo.toml @@ -18,7 +18,7 @@ juice-utils = {path = "../juice-utils"} csv = "1" hyper = "0.14" -hyper-rustls = "0.22" +hyper-rustls = "0.23" futures = "0.3" futures-util = "0.3" diff --git a/juice/Cargo.toml b/juice/Cargo.toml index 91dfa090a..eb84c13eb 100644 --- a/juice/Cargo.toml +++ b/juice/Cargo.toml @@ -42,6 +42,8 @@ default = ["native", "cuda"] native = ["coaster-blas/native", "coaster-nn/native"] cuda = ["coaster/cuda", "coaster-blas/cuda", "coaster-nn/cuda"] opencl = ["coaster/opencl", "coaster-blas/opencl", "coaster-nn/opencl"] +# When enabled, all weights are initialized in a deterministic way. +deterministic = [] [[bench]] name = "network_benches" diff --git a/juice/src/layer.rs b/juice/src/layer.rs index fe62ff1c3..0fcedf3bf 100644 --- a/juice/src/layer.rs +++ b/juice/src/layer.rs @@ -306,7 +306,15 @@ impl Layer { } else { format!("{}-{}", self.name, weight_id) }; + + let display_name_bias = if !weight_name.is_empty() { + format!("{weight_name}-bias") + } else { + format!("{}-{}-bias", self.name, weight_id) + }; + self.weights_display_names.push(display_name.clone()); + self.weights_display_names.push(display_name_bias.clone()); // create name for registry let registry_name = format!("SHARED_WEIGHT_{}", display_name); @@ -925,6 +933,8 @@ impl<'a, B: IBackend> CapnpWrite<'a> for Layer { let names = self.learnable_weights_names(); let weights_data = self.learnable_weights_data(); + assert_eq!(names.len(), weights_data.len(), "All layers must be named"); + for (i, (name, weight)) in names.iter().zip(weights_data).enumerate() { let mut capnp_weight = weights.reborrow().get(i as u32); capnp_weight.set_name(name); diff --git a/juice/src/layers/common/linear.rs b/juice/src/layers/common/linear.rs index 38d90b993..f2bfffd61 100644 --- a/juice/src/layers/common/linear.rs +++ b/juice/src/layers/common/linear.rs @@ -19,6 +19,8 @@ //! In the context of convolutional neural networks this layer is also //! called a "fully-connected layer" if it is used at the end of the network. +use rand::distributions::Distribution; + use crate::capnp_util::*; use crate::co::backend::IBackend; use crate::co::tensor::SharedTensor; @@ -27,6 +29,7 @@ use crate::juice_capnp::linear_config as capnp_config; use crate::layer::*; use crate::util::{native_scalar, ArcLock, LayerOps}; use crate::weight::FillerType; +use rand::{self, prelude::*}; #[derive(Debug)] /// Linear Layer @@ -112,7 +115,13 @@ impl> ILayer for Linear { weight.write().unwrap().resize(&(1, self.output_size)).unwrap(); // Weight Initialisation for bias is typically a constant, and a suitable initialisation // is stated in https://cs231n.github.io/neural-networks-2/#init for non-LSTM types. - let initialisation_constant = rand::random::(); + + #[cfg(feature = "deterministic")] + let mut rng = rand::rngs::StdRng::seed_from_u64(2301); // Arbitrary seed. + #[cfg(not(feature = "deterministic"))] + let mut rng = thread_rng(); + + let initialisation_constant: f32 = rand::distributions::Standard {}.sample(&mut rng); let filler = FillerType::Constant { value: initialisation_constant * (2.0 / initialisation_constant).sqrt(), }; diff --git a/juice/src/layers/common/rnn.rs b/juice/src/layers/common/rnn.rs index 4b3996db6..cebfc02c7 100644 --- a/juice/src/layers/common/rnn.rs +++ b/juice/src/layers/common/rnn.rs @@ -137,7 +137,7 @@ impl> ILayer for Rnn { .unwrap(); let filter_dimensions: TensorDesc = backend - .generate_rnn_weight_description(&config, batch_size as i32, input_size as i32) + .generate_rnn_weight_description(&config, input_size as i32) .unwrap(); // weights @@ -492,7 +492,6 @@ mod tests { let filter_dimensions = as conn::Rnn>::generate_rnn_weight_description( &backend, &config, - BATCH_SIZE as i32, INPUT_SIZE as i32, ) .unwrap(); diff --git a/juice/src/weight.rs b/juice/src/weight.rs index 9e8af0039..10c362a09 100644 --- a/juice/src/weight.rs +++ b/juice/src/weight.rs @@ -200,7 +200,11 @@ impl FillerType { let native_weight = weight.write_only(native.device()).unwrap(); let init_range = (6.0f32 / (num_inputs as f32 + num_outputs as f32)).sqrt(); + #[cfg(feature = "deterministic")] + let mut rng = rand::rngs::StdRng::seed_from_u64(2301); // Arbitrary seed. + #[cfg(not(feature = "deterministic"))] let mut rng = thread_rng(); + let between = rand::distributions::Uniform::from(-init_range..=init_range); for e in native_weight.as_mut_slice::() { *e = between.sample(&mut rng); diff --git a/rcublas/cublas-sys/Cargo.toml b/rcublas/cublas-sys/Cargo.toml index d00ba339c..e262867d2 100644 --- a/rcublas/cublas-sys/Cargo.toml +++ b/rcublas/cublas-sys/Cargo.toml @@ -19,7 +19,7 @@ libc = "0.2" [build-dependencies] pkg-config = "0.3" -bindgen = { version = "^0.59.1", optional = true } +bindgen = { version = "^0.60.1", optional = true } [features] default = [] diff --git a/rcublas/cublas-sys/src/generated.rs b/rcublas/cublas-sys/src/generated.rs index e413f1227..6ead6e31b 100644 --- a/rcublas/cublas-sys/src/generated.rs +++ b/rcublas/cublas-sys/src/generated.rs @@ -1,4 +1,5 @@ -/* automatically generated by rust-bindgen 0.58.1 */ +/* automatically generated by rust-bindgen 0.60.1 */ + //! Defines the FFI for CUDA cuBLAS. //! @@ -6,11 +7,12 @@ #![allow(non_snake_case)] #![allow(non_upper_case_globals)] + pub const CUBLAS_VER_MAJOR: u32 = 11; -pub const CUBLAS_VER_MINOR: u32 = 5; -pub const CUBLAS_VER_PATCH: u32 = 2; -pub const CUBLAS_VER_BUILD: u32 = 43; -pub const CUBLAS_VERSION: u32 = 11502; +pub const CUBLAS_VER_MINOR: u32 = 10; +pub const CUBLAS_VER_PATCH: u32 = 3; +pub const CUBLAS_VER_BUILD: u32 = 66; +pub const CUBLAS_VERSION: u32 = 111003; #[repr(C)] #[repr(align(8))] #[derive(Debug, Copy, Clone)] @@ -30,16 +32,30 @@ fn bindgen_test_layout_float2() { 8usize, concat!("Alignment of ", stringify!(float2)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(float2), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!("Offset of field: ", stringify!(float2), "::", stringify!(y)) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!("Offset of field: ", stringify!(float2), "::", stringify!(x)) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 4usize, + concat!("Offset of field: ", stringify!(float2), "::", stringify!(y)) + ); + } + test_field_y(); } #[repr(C)] #[repr(align(16))] @@ -60,30 +76,41 @@ fn bindgen_test_layout_double2() { 16usize, concat!("Alignment of ", stringify!(double2)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(double2), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(double2), - "::", - stringify!(y) - ) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(double2), + "::", + stringify!(x) + ) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(double2), + "::", + stringify!(y) + ) + ); + } + test_field_y(); } -#[doc = " *"] -#[doc = " *"] -#[doc = " *"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct dim3 { @@ -103,543 +130,214 @@ fn bindgen_test_layout_dim3() { 4usize, concat!("Alignment of ", stringify!(dim3)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 8usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 4usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) + ); + } + test_field_y(); + fn test_field_z() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize + }, + 8usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) + ); + } + test_field_z(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA error types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaError { - #[doc = " The API call returned with no errors. In the case of query calls, this"] - #[doc = " also means that the operation being queried is complete (see"] - #[doc = " ::cudaEventQuery() and ::cudaStreamQuery())."] cudaSuccess = 0, - #[doc = " This indicates that one or more of the parameters passed to the API call"] - #[doc = " is not within an acceptable range of values."] cudaErrorInvalidValue = 1, - #[doc = " The API call failed because it was unable to allocate enough memory to"] - #[doc = " perform the requested operation."] cudaErrorMemoryAllocation = 2, - #[doc = " The API call failed because the CUDA driver and runtime could not be"] - #[doc = " initialized."] cudaErrorInitializationError = 3, - #[doc = " This indicates that a CUDA Runtime API call cannot be executed because"] - #[doc = " it is being called during process shut down, at a point in time after"] - #[doc = " CUDA driver has been unloaded."] cudaErrorCudartUnloading = 4, - #[doc = " This indicates profiler is not initialized for this run. This can"] - #[doc = " happen when the application is running with external profiling tools"] - #[doc = " like visual profiler."] cudaErrorProfilerDisabled = 5, - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 5.0. It is no longer an error"] - #[doc = " to attempt to enable/disable the profiling via ::cudaProfilerStart or"] - #[doc = " ::cudaProfilerStop without initialization."] cudaErrorProfilerNotInitialized = 6, - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 5.0. It is no longer an error"] - #[doc = " to call cudaProfilerStart() when profiling is already enabled."] cudaErrorProfilerAlreadyStarted = 7, - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 5.0. It is no longer an error"] - #[doc = " to call cudaProfilerStop() when profiling is already disabled."] cudaErrorProfilerAlreadyStopped = 8, - #[doc = " This indicates that a kernel launch is requesting resources that can"] - #[doc = " never be satisfied by the current device. Requesting more shared memory"] - #[doc = " per block than the device supports will trigger this error, as will"] - #[doc = " requesting too many threads or blocks. See ::cudaDeviceProp for more"] - #[doc = " device limitations."] cudaErrorInvalidConfiguration = 9, - #[doc = " This indicates that one or more of the pitch-related parameters passed"] - #[doc = " to the API call is not within the acceptable range for pitch."] cudaErrorInvalidPitchValue = 12, - #[doc = " This indicates that the symbol name/identifier passed to the API call"] - #[doc = " is not a valid name or identifier."] cudaErrorInvalidSymbol = 13, - #[doc = " This indicates that at least one host pointer passed to the API call is"] - #[doc = " not a valid host pointer."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 10.1."] cudaErrorInvalidHostPointer = 16, - #[doc = " This indicates that at least one device pointer passed to the API call is"] - #[doc = " not a valid device pointer."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 10.1."] cudaErrorInvalidDevicePointer = 17, - #[doc = " This indicates that the texture passed to the API call is not a valid"] - #[doc = " texture."] cudaErrorInvalidTexture = 18, - #[doc = " This indicates that the texture binding is not valid. This occurs if you"] - #[doc = " call ::cudaGetTextureAlignmentOffset() with an unbound texture."] cudaErrorInvalidTextureBinding = 19, - #[doc = " This indicates that the channel descriptor passed to the API call is not"] - #[doc = " valid. This occurs if the format is not one of the formats specified by"] - #[doc = " ::cudaChannelFormatKind, or if one of the dimensions is invalid."] cudaErrorInvalidChannelDescriptor = 20, - #[doc = " This indicates that the direction of the memcpy passed to the API call is"] - #[doc = " not one of the types specified by ::cudaMemcpyKind."] cudaErrorInvalidMemcpyDirection = 21, - #[doc = " This indicated that the user has taken the address of a constant variable,"] - #[doc = " which was forbidden up until the CUDA 3.1 release."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Variables in constant"] - #[doc = " memory may now have their address taken by the runtime via"] - #[doc = " ::cudaGetSymbolAddress()."] cudaErrorAddressOfConstant = 22, - #[doc = " This indicated that a texture fetch was not able to be performed."] - #[doc = " This was previously used for device emulation of texture operations."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorTextureFetchFailed = 23, - #[doc = " This indicated that a texture was not bound for access."] - #[doc = " This was previously used for device emulation of texture operations."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorTextureNotBound = 24, - #[doc = " This indicated that a synchronization operation had failed."] - #[doc = " This was previously used for some device emulation functions."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorSynchronizationError = 25, - #[doc = " This indicates that a non-float texture was being accessed with linear"] - #[doc = " filtering. This is not supported by CUDA."] cudaErrorInvalidFilterSetting = 26, - #[doc = " This indicates that an attempt was made to read a non-float texture as a"] - #[doc = " normalized float. This is not supported by CUDA."] cudaErrorInvalidNormSetting = 27, - #[doc = " Mixing of device and device emulation code was not allowed."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorMixedDeviceExecution = 28, - #[doc = " This indicates that the API call is not yet implemented. Production"] - #[doc = " releases of CUDA will never return this error."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 4.1."] cudaErrorNotYetImplemented = 31, - #[doc = " This indicated that an emulated device pointer exceeded the 32-bit address"] - #[doc = " range."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorMemoryValueTooLarge = 32, - #[doc = " This indicates that the CUDA driver that the application has loaded is a"] - #[doc = " stub library. Applications that run with the stub rather than a real"] - #[doc = " driver loaded will result in CUDA API returning this error."] cudaErrorStubLibrary = 34, - #[doc = " This indicates that the installed NVIDIA CUDA driver is older than the"] - #[doc = " CUDA runtime library. This is not a supported configuration. Users should"] - #[doc = " install an updated NVIDIA display driver to allow the application to run."] cudaErrorInsufficientDriver = 35, - #[doc = " This indicates that the API call requires a newer CUDA driver than the one"] - #[doc = " currently installed. Users should install an updated NVIDIA CUDA driver"] - #[doc = " to allow the API call to succeed."] cudaErrorCallRequiresNewerDriver = 36, - #[doc = " This indicates that the surface passed to the API call is not a valid"] - #[doc = " surface."] cudaErrorInvalidSurface = 37, - #[doc = " This indicates that multiple global or constant variables (across separate"] - #[doc = " CUDA source files in the application) share the same string name."] cudaErrorDuplicateVariableName = 43, - #[doc = " This indicates that multiple textures (across separate CUDA source"] - #[doc = " files in the application) share the same string name."] cudaErrorDuplicateTextureName = 44, - #[doc = " This indicates that multiple surfaces (across separate CUDA source"] - #[doc = " files in the application) share the same string name."] cudaErrorDuplicateSurfaceName = 45, - #[doc = " This indicates that all CUDA devices are busy or unavailable at the current"] - #[doc = " time. Devices are often busy/unavailable due to use of"] - #[doc = " ::cudaComputeModeExclusive, ::cudaComputeModeProhibited or when long"] - #[doc = " running CUDA kernels have filled up the GPU and are blocking new work"] - #[doc = " from starting. They can also be unavailable due to memory constraints"] - #[doc = " on a device that already has active CUDA work being performed."] cudaErrorDevicesUnavailable = 46, - #[doc = " This indicates that the current context is not compatible with this"] - #[doc = " the CUDA Runtime. This can only occur if you are using CUDA"] - #[doc = " Runtime/Driver interoperability and have created an existing Driver"] - #[doc = " context using the driver API. The Driver context may be incompatible"] - #[doc = " either because the Driver context was created using an older version"] - #[doc = " of the API, because the Runtime API call expects a primary driver"] - #[doc = " context and the Driver context is not primary, or because the Driver"] - #[doc = " context has been destroyed. Please see \\ref CUDART_DRIVER \"Interactions"] - #[doc = " with the CUDA Driver API\" for more information."] cudaErrorIncompatibleDriverContext = 49, - #[doc = " The device function being invoked (usually via ::cudaLaunchKernel()) was not"] - #[doc = " previously configured via the ::cudaConfigureCall() function."] cudaErrorMissingConfiguration = 52, - #[doc = " This indicated that a previous kernel launch failed. This was previously"] - #[doc = " used for device emulation of kernel launches."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorPriorLaunchFailure = 53, - #[doc = " This error indicates that a device runtime grid launch did not occur"] - #[doc = " because the depth of the child grid would exceed the maximum supported"] - #[doc = " number of nested grid launches."] cudaErrorLaunchMaxDepthExceeded = 65, - #[doc = " This error indicates that a grid launch did not occur because the kernel"] - #[doc = " uses file-scoped textures which are unsupported by the device runtime."] - #[doc = " Kernels launched via the device runtime only support textures created with"] - #[doc = " the Texture Object API's."] cudaErrorLaunchFileScopedTex = 66, - #[doc = " This error indicates that a grid launch did not occur because the kernel"] - #[doc = " uses file-scoped surfaces which are unsupported by the device runtime."] - #[doc = " Kernels launched via the device runtime only support surfaces created with"] - #[doc = " the Surface Object API's."] cudaErrorLaunchFileScopedSurf = 67, - #[doc = " This error indicates that a call to ::cudaDeviceSynchronize made from"] - #[doc = " the device runtime failed because the call was made at grid depth greater"] - #[doc = " than than either the default (2 levels of grids) or user specified device"] - #[doc = " limit ::cudaLimitDevRuntimeSyncDepth. To be able to synchronize on"] - #[doc = " launched grids at a greater depth successfully, the maximum nested"] - #[doc = " depth at which ::cudaDeviceSynchronize will be called must be specified"] - #[doc = " with the ::cudaLimitDevRuntimeSyncDepth limit to the ::cudaDeviceSetLimit"] - #[doc = " api before the host-side launch of a kernel using the device runtime."] - #[doc = " Keep in mind that additional levels of sync depth require the runtime"] - #[doc = " to reserve large amounts of device memory that cannot be used for"] - #[doc = " user allocations."] cudaErrorSyncDepthExceeded = 68, - #[doc = " This error indicates that a device runtime grid launch failed because"] - #[doc = " the launch would exceed the limit ::cudaLimitDevRuntimePendingLaunchCount."] - #[doc = " For this launch to proceed successfully, ::cudaDeviceSetLimit must be"] - #[doc = " called to set the ::cudaLimitDevRuntimePendingLaunchCount to be higher"] - #[doc = " than the upper bound of outstanding launches that can be issued to the"] - #[doc = " device runtime. Keep in mind that raising the limit of pending device"] - #[doc = " runtime launches will require the runtime to reserve device memory that"] - #[doc = " cannot be used for user allocations."] cudaErrorLaunchPendingCountExceeded = 69, - #[doc = " The requested device function does not exist or is not compiled for the"] - #[doc = " proper device architecture."] cudaErrorInvalidDeviceFunction = 98, - #[doc = " This indicates that no CUDA-capable devices were detected by the installed"] - #[doc = " CUDA driver."] cudaErrorNoDevice = 100, - #[doc = " This indicates that the device ordinal supplied by the user does not"] - #[doc = " correspond to a valid CUDA device or that the action requested is"] - #[doc = " invalid for the specified device."] cudaErrorInvalidDevice = 101, - #[doc = " This indicates that the device doesn't have a valid Grid License."] cudaErrorDeviceNotLicensed = 102, - #[doc = " By default, the CUDA runtime may perform a minimal set of self-tests,"] - #[doc = " as well as CUDA driver tests, to establish the validity of both."] - #[doc = " Introduced in CUDA 11.2, this error return indicates that at least one"] - #[doc = " of these tests has failed and the validity of either the runtime"] - #[doc = " or the driver could not be established."] cudaErrorSoftwareValidityNotEstablished = 103, - #[doc = " This indicates an internal startup failure in the CUDA runtime."] cudaErrorStartupFailure = 127, - #[doc = " This indicates that the device kernel image is invalid."] cudaErrorInvalidKernelImage = 200, - #[doc = " This most frequently indicates that there is no context bound to the"] - #[doc = " current thread. This can also be returned if the context passed to an"] - #[doc = " API call is not a valid handle (such as a context that has had"] - #[doc = " ::cuCtxDestroy() invoked on it). This can also be returned if a user"] - #[doc = " mixes different API versions (i.e. 3010 context with 3020 API calls)."] - #[doc = " See ::cuCtxGetApiVersion() for more details."] cudaErrorDeviceUninitialized = 201, - #[doc = " This indicates that the buffer object could not be mapped."] cudaErrorMapBufferObjectFailed = 205, - #[doc = " This indicates that the buffer object could not be unmapped."] cudaErrorUnmapBufferObjectFailed = 206, - #[doc = " This indicates that the specified array is currently mapped and thus"] - #[doc = " cannot be destroyed."] cudaErrorArrayIsMapped = 207, - #[doc = " This indicates that the resource is already mapped."] cudaErrorAlreadyMapped = 208, - #[doc = " This indicates that there is no kernel image available that is suitable"] - #[doc = " for the device. This can occur when a user specifies code generation"] - #[doc = " options for a particular CUDA source file that do not include the"] - #[doc = " corresponding device configuration."] cudaErrorNoKernelImageForDevice = 209, - #[doc = " This indicates that a resource has already been acquired."] cudaErrorAlreadyAcquired = 210, - #[doc = " This indicates that a resource is not mapped."] cudaErrorNotMapped = 211, - #[doc = " This indicates that a mapped resource is not available for access as an"] - #[doc = " array."] cudaErrorNotMappedAsArray = 212, - #[doc = " This indicates that a mapped resource is not available for access as a"] - #[doc = " pointer."] cudaErrorNotMappedAsPointer = 213, - #[doc = " This indicates that an uncorrectable ECC error was detected during"] - #[doc = " execution."] cudaErrorECCUncorrectable = 214, - #[doc = " This indicates that the ::cudaLimit passed to the API call is not"] - #[doc = " supported by the active device."] cudaErrorUnsupportedLimit = 215, - #[doc = " This indicates that a call tried to access an exclusive-thread device that"] - #[doc = " is already in use by a different thread."] cudaErrorDeviceAlreadyInUse = 216, - #[doc = " This error indicates that P2P access is not supported across the given"] - #[doc = " devices."] cudaErrorPeerAccessUnsupported = 217, - #[doc = " A PTX compilation failed. The runtime may fall back to compiling PTX if"] - #[doc = " an application does not contain a suitable binary for the current device."] cudaErrorInvalidPtx = 218, - #[doc = " This indicates an error with the OpenGL or DirectX context."] cudaErrorInvalidGraphicsContext = 219, - #[doc = " This indicates that an uncorrectable NVLink error was detected during the"] - #[doc = " execution."] cudaErrorNvlinkUncorrectable = 220, - #[doc = " This indicates that the PTX JIT compiler library was not found. The JIT Compiler"] - #[doc = " library is used for PTX compilation. The runtime may fall back to compiling PTX"] - #[doc = " if an application does not contain a suitable binary for the current device."] cudaErrorJitCompilerNotFound = 221, - #[doc = " This indicates that the provided PTX was compiled with an unsupported toolchain."] - #[doc = " The most common reason for this, is the PTX was generated by a compiler newer"] - #[doc = " than what is supported by the CUDA driver and PTX JIT compiler."] cudaErrorUnsupportedPtxVersion = 222, - #[doc = " This indicates that the JIT compilation was disabled. The JIT compilation compiles"] - #[doc = " PTX. The runtime may fall back to compiling PTX if an application does not contain"] - #[doc = " a suitable binary for the current device."] cudaErrorJitCompilationDisabled = 223, - #[doc = " This indicates that the provided execution affinity is not supported by the device."] cudaErrorUnsupportedExecAffinity = 224, - #[doc = " This indicates that the device kernel source is invalid."] cudaErrorInvalidSource = 300, - #[doc = " This indicates that the file specified was not found."] cudaErrorFileNotFound = 301, - #[doc = " This indicates that a link to a shared object failed to resolve."] cudaErrorSharedObjectSymbolNotFound = 302, - #[doc = " This indicates that initialization of a shared object failed."] cudaErrorSharedObjectInitFailed = 303, - #[doc = " This error indicates that an OS call failed."] cudaErrorOperatingSystem = 304, - #[doc = " This indicates that a resource handle passed to the API call was not"] - #[doc = " valid. Resource handles are opaque types like ::cudaStream_t and"] - #[doc = " ::cudaEvent_t."] cudaErrorInvalidResourceHandle = 400, - #[doc = " This indicates that a resource required by the API call is not in a"] - #[doc = " valid state to perform the requested operation."] cudaErrorIllegalState = 401, - #[doc = " This indicates that a named symbol was not found. Examples of symbols"] - #[doc = " are global/constant variable names, driver function names, texture names,"] - #[doc = " and surface names."] cudaErrorSymbolNotFound = 500, - #[doc = " This indicates that asynchronous operations issued previously have not"] - #[doc = " completed yet. This result is not actually an error, but must be indicated"] - #[doc = " differently than ::cudaSuccess (which indicates completion). Calls that"] - #[doc = " may return this value include ::cudaEventQuery() and ::cudaStreamQuery()."] cudaErrorNotReady = 600, - #[doc = " The device encountered a load or store instruction on an invalid memory address."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorIllegalAddress = 700, - #[doc = " This indicates that a launch did not occur because it did not have"] - #[doc = " appropriate resources. Although this error is similar to"] - #[doc = " ::cudaErrorInvalidConfiguration, this error usually indicates that the"] - #[doc = " user has attempted to pass too many arguments to the device kernel, or the"] - #[doc = " kernel launch specifies too many threads for the kernel's register count."] cudaErrorLaunchOutOfResources = 701, - #[doc = " This indicates that the device kernel took too long to execute. This can"] - #[doc = " only occur if timeouts are enabled - see the device property"] - #[doc = " \\ref ::cudaDeviceProp::kernelExecTimeoutEnabled \"kernelExecTimeoutEnabled\""] - #[doc = " for more information."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorLaunchTimeout = 702, - #[doc = " This error indicates a kernel launch that uses an incompatible texturing"] - #[doc = " mode."] cudaErrorLaunchIncompatibleTexturing = 703, - #[doc = " This error indicates that a call to ::cudaDeviceEnablePeerAccess() is"] - #[doc = " trying to re-enable peer addressing on from a context which has already"] - #[doc = " had peer addressing enabled."] cudaErrorPeerAccessAlreadyEnabled = 704, - #[doc = " This error indicates that ::cudaDeviceDisablePeerAccess() is trying to"] - #[doc = " disable peer addressing which has not been enabled yet via"] - #[doc = " ::cudaDeviceEnablePeerAccess()."] cudaErrorPeerAccessNotEnabled = 705, - #[doc = " This indicates that the user has called ::cudaSetValidDevices(),"] - #[doc = " ::cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(),"] - #[doc = " ::cudaD3D10SetDirect3DDevice, ::cudaD3D11SetDirect3DDevice(), or"] - #[doc = " ::cudaVDPAUSetVDPAUDevice() after initializing the CUDA runtime by"] - #[doc = " calling non-device management operations (allocating memory and"] - #[doc = " launching kernels are examples of non-device management operations)."] - #[doc = " This error can also be returned if using runtime/driver"] - #[doc = " interoperability and there is an existing ::CUcontext active on the"] - #[doc = " host thread."] cudaErrorSetOnActiveProcess = 708, - #[doc = " This error indicates that the context current to the calling thread"] - #[doc = " has been destroyed using ::cuCtxDestroy, or is a primary context which"] - #[doc = " has not yet been initialized."] cudaErrorContextIsDestroyed = 709, - #[doc = " An assert triggered in device code during kernel execution. The device"] - #[doc = " cannot be used again. All existing allocations are invalid. To continue"] - #[doc = " using CUDA, the process must be terminated and relaunched."] cudaErrorAssert = 710, - #[doc = " This error indicates that the hardware resources required to enable"] - #[doc = " peer access have been exhausted for one or more of the devices"] - #[doc = " passed to ::cudaEnablePeerAccess()."] cudaErrorTooManyPeers = 711, - #[doc = " This error indicates that the memory range passed to ::cudaHostRegister()"] - #[doc = " has already been registered."] cudaErrorHostMemoryAlreadyRegistered = 712, - #[doc = " This error indicates that the pointer passed to ::cudaHostUnregister()"] - #[doc = " does not correspond to any currently registered memory region."] cudaErrorHostMemoryNotRegistered = 713, - #[doc = " Device encountered an error in the call stack during kernel execution,"] - #[doc = " possibly due to stack corruption or exceeding the stack size limit."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorHardwareStackError = 714, - #[doc = " The device encountered an illegal instruction during kernel execution"] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorIllegalInstruction = 715, - #[doc = " The device encountered a load or store instruction"] - #[doc = " on a memory address which is not aligned."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorMisalignedAddress = 716, - #[doc = " While executing a kernel, the device encountered an instruction"] - #[doc = " which can only operate on memory locations in certain address spaces"] - #[doc = " (global, shared, or local), but was supplied a memory address not"] - #[doc = " belonging to an allowed address space."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorInvalidAddressSpace = 717, - #[doc = " The device encountered an invalid program counter."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorInvalidPc = 718, - #[doc = " An exception occurred on the device while executing a kernel. Common"] - #[doc = " causes include dereferencing an invalid device pointer and accessing"] - #[doc = " out of bounds shared memory. Less common cases can be system specific - more"] - #[doc = " information about these cases can be found in the system specific user guide."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorLaunchFailure = 719, - #[doc = " This error indicates that the number of blocks launched per grid for a kernel that was"] - #[doc = " launched via either ::cudaLaunchCooperativeKernel or ::cudaLaunchCooperativeKernelMultiDevice"] - #[doc = " exceeds the maximum number of blocks as allowed by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor"] - #[doc = " or ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors"] - #[doc = " as specified by the device attribute ::cudaDevAttrMultiProcessorCount."] cudaErrorCooperativeLaunchTooLarge = 720, - #[doc = " This error indicates the attempted operation is not permitted."] cudaErrorNotPermitted = 800, - #[doc = " This error indicates the attempted operation is not supported"] - #[doc = " on the current system or device."] cudaErrorNotSupported = 801, - #[doc = " This error indicates that the system is not yet ready to start any CUDA"] - #[doc = " work. To continue using CUDA, verify the system configuration is in a"] - #[doc = " valid state and all required driver daemons are actively running."] - #[doc = " More information about this error can be found in the system specific"] - #[doc = " user guide."] cudaErrorSystemNotReady = 802, - #[doc = " This error indicates that there is a mismatch between the versions of"] - #[doc = " the display driver and the CUDA driver. Refer to the compatibility documentation"] - #[doc = " for supported versions."] cudaErrorSystemDriverMismatch = 803, - #[doc = " This error indicates that the system was upgraded to run with forward compatibility"] - #[doc = " but the visible hardware detected by CUDA does not support this configuration."] - #[doc = " Refer to the compatibility documentation for the supported hardware matrix or ensure"] - #[doc = " that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES"] - #[doc = " environment variable."] cudaErrorCompatNotSupportedOnDevice = 804, - #[doc = " This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."] cudaErrorMpsConnectionFailed = 805, - #[doc = " This error indicates that the remote procedural call between the MPS server and the MPS client failed."] cudaErrorMpsRpcFailure = 806, - #[doc = " This error indicates that the MPS server is not ready to accept new MPS client requests."] - #[doc = " This error can be returned when the MPS server is in the process of recovering from a fatal failure."] cudaErrorMpsServerNotReady = 807, - #[doc = " This error indicates that the hardware resources required to create MPS client have been exhausted."] cudaErrorMpsMaxClientsReached = 808, - #[doc = " This error indicates the the hardware resources required to device connections have been exhausted."] cudaErrorMpsMaxConnectionsReached = 809, - #[doc = " The operation is not permitted when the stream is capturing."] cudaErrorStreamCaptureUnsupported = 900, - #[doc = " The current capture sequence on the stream has been invalidated due to"] - #[doc = " a previous error."] cudaErrorStreamCaptureInvalidated = 901, - #[doc = " The operation would have resulted in a merge of two independent capture"] - #[doc = " sequences."] cudaErrorStreamCaptureMerge = 902, - #[doc = " The capture was not initiated in this stream."] cudaErrorStreamCaptureUnmatched = 903, - #[doc = " The capture sequence contains a fork that was not joined to the primary"] - #[doc = " stream."] cudaErrorStreamCaptureUnjoined = 904, - #[doc = " A dependency would have been created which crosses the capture sequence"] - #[doc = " boundary. Only implicit in-stream ordering dependencies are allowed to"] - #[doc = " cross the boundary."] cudaErrorStreamCaptureIsolation = 905, - #[doc = " The operation would have resulted in a disallowed implicit dependency on"] - #[doc = " a current capture sequence from cudaStreamLegacy."] cudaErrorStreamCaptureImplicit = 906, - #[doc = " The operation is not permitted on an event which was last recorded in a"] - #[doc = " capturing stream."] cudaErrorCapturedEvent = 907, - #[doc = " A stream capture sequence not initiated with the ::cudaStreamCaptureModeRelaxed"] - #[doc = " argument to ::cudaStreamBeginCapture was passed to ::cudaStreamEndCapture in a"] - #[doc = " different thread."] cudaErrorStreamCaptureWrongThread = 908, - #[doc = " This indicates that the wait operation has timed out."] cudaErrorTimeout = 909, - #[doc = " This error indicates that the graph update was not performed because it included"] - #[doc = " changes which violated constraints specific to instantiated graph update."] cudaErrorGraphExecUpdateFailure = 910, - #[doc = " This indicates that an unknown internal error has occurred."] + cudaErrorExternalDevice = 911, cudaErrorUnknown = 999, - #[doc = " Any unhandled CUDA driver error is added to this value and returned via"] - #[doc = " the runtime. Production releases of CUDA should not return such errors."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 4.1."] cudaErrorApiFailureBase = 10000, } #[repr(u32)] #[non_exhaustive] -#[doc = " Channel format kind"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaChannelFormatKind { - #[doc = "< Signed channel format"] cudaChannelFormatKindSigned = 0, - #[doc = "< Unsigned channel format"] cudaChannelFormatKindUnsigned = 1, - #[doc = "< Float channel format"] cudaChannelFormatKindFloat = 2, - #[doc = "< No channel format"] cudaChannelFormatKindNone = 3, cudaChannelFormatKindNV12 = 4, + cudaChannelFormatKindUnsignedNormalized8X1 = 5, + cudaChannelFormatKindUnsignedNormalized8X2 = 6, + cudaChannelFormatKindUnsignedNormalized8X4 = 7, + cudaChannelFormatKindUnsignedNormalized16X1 = 8, + cudaChannelFormatKindUnsignedNormalized16X2 = 9, + cudaChannelFormatKindUnsignedNormalized16X4 = 10, + cudaChannelFormatKindSignedNormalized8X1 = 11, + cudaChannelFormatKindSignedNormalized8X2 = 12, + cudaChannelFormatKindSignedNormalized8X4 = 13, + cudaChannelFormatKindSignedNormalized16X1 = 14, + cudaChannelFormatKindSignedNormalized16X2 = 15, + cudaChannelFormatKindSignedNormalized16X4 = 16, + cudaChannelFormatKindUnsignedBlockCompressed1 = 17, + cudaChannelFormatKindUnsignedBlockCompressed1SRGB = 18, + cudaChannelFormatKindUnsignedBlockCompressed2 = 19, + cudaChannelFormatKindUnsignedBlockCompressed2SRGB = 20, + cudaChannelFormatKindUnsignedBlockCompressed3 = 21, + cudaChannelFormatKindUnsignedBlockCompressed3SRGB = 22, + cudaChannelFormatKindUnsignedBlockCompressed4 = 23, + cudaChannelFormatKindSignedBlockCompressed4 = 24, + cudaChannelFormatKindUnsignedBlockCompressed5 = 25, + cudaChannelFormatKindSignedBlockCompressed5 = 26, + cudaChannelFormatKindUnsignedBlockCompressed6H = 27, + cudaChannelFormatKindSignedBlockCompressed6H = 28, + cudaChannelFormatKindUnsignedBlockCompressed7 = 29, + cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30, } -#[doc = " CUDA Channel format descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaChannelFormatDesc { - #[doc = "< x"] pub x: ::libc::c_int, - #[doc = "< y"] pub y: ::libc::c_int, - #[doc = "< z"] pub z: ::libc::c_int, - #[doc = "< w"] pub w: ::libc::c_int, - #[doc = "< Channel format kind"] pub f: cudaChannelFormatKind, } #[test] @@ -654,96 +352,120 @@ fn bindgen_test_layout_cudaChannelFormatDesc() { 4usize, concat!("Alignment of ", stringify!(cudaChannelFormatDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(z) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(f) - ) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(x) + ) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(y) + ) + ); + } + test_field_y(); + fn test_field_z() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(z) + ) + ); + } + test_field_z(); + fn test_field_w() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(w) + ) + ); + } + test_field_w(); + fn test_field_f() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(f) + ) + ); + } + test_field_f(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaArray { _unused: [u8; 0], } -#[doc = " CUDA array"] pub type cudaArray_t = *mut cudaArray; -#[doc = " CUDA array (as source copy argument)"] pub type cudaArray_const_t = *const cudaArray; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMipmappedArray { _unused: [u8; 0], } -#[doc = " CUDA mipmapped array"] pub type cudaMipmappedArray_t = *mut cudaMipmappedArray; -#[doc = " CUDA mipmapped array (as source argument)"] pub type cudaMipmappedArray_const_t = *const cudaMipmappedArray; -#[doc = " Sparse CUDA array and CUDA mipmapped array properties"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaArraySparseProperties { pub tileExtent: cudaArraySparseProperties__bindgen_ty_1, - #[doc = "< First mip level at which the mip tail begins"] pub miptailFirstLevel: ::libc::c_uint, - #[doc = "< Total size of the mip tail."] pub miptailSize: ::libc::c_ulonglong, - #[doc = "< Flags will either be zero or ::cudaArraySparsePropertiesSingleMipTail"] pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 4usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaArraySparseProperties__bindgen_ty_1 { - #[doc = "< Tile width in elements"] pub width: ::libc::c_uint, - #[doc = "< Tile height in elements"] pub height: ::libc::c_uint, - #[doc = "< Tile depth in elements"] pub depth: ::libc::c_uint, } #[test] @@ -764,45 +486,60 @@ fn bindgen_test_layout_cudaArraySparseProperties__bindgen_ty_1() { stringify!(cudaArraySparseProperties__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).depth as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(depth) - ) - ); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_depth() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(depth) + ) + ); + } + test_field_depth(); } #[test] fn bindgen_test_layout_cudaArraySparseProperties() { @@ -816,109 +553,188 @@ fn bindgen_test_layout_cudaArraySparseProperties() { 8usize, concat!("Alignment of ", stringify!(cudaArraySparseProperties)) ); + fn test_field_tileExtent() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).tileExtent) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(tileExtent) + ) + ); + } + test_field_tileExtent(); + fn test_field_miptailFirstLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).miptailFirstLevel) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailFirstLevel) + ) + ); + } + test_field_miptailFirstLevel(); + fn test_field_miptailSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).miptailSize) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailSize) + ) + ); + } + test_field_miptailSize(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaArrayMemoryRequirements { + pub size: usize, + pub alignment: usize, + pub reserved: [::libc::c_uint; 4usize], +} +#[test] +fn bindgen_test_layout_cudaArrayMemoryRequirements() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).tileExtent as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(tileExtent) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).miptailFirstLevel as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailFirstLevel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).miptailSize as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(flags) - ) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaArrayMemoryRequirements)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(reserved) - ) - ); + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaArrayMemoryRequirements)) + ); + fn test_field_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(size) + ) + ); + } + test_field_size(); + fn test_field_alignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).alignment) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(alignment) + ) + ); + } + test_field_alignment(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA memory types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemoryType { - #[doc = "< Unregistered memory"] cudaMemoryTypeUnregistered = 0, - #[doc = "< Host memory"] cudaMemoryTypeHost = 1, - #[doc = "< Device memory"] cudaMemoryTypeDevice = 2, - #[doc = "< Managed memory"] cudaMemoryTypeManaged = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA memory copy types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemcpyKind { - #[doc = "< Host -> Host"] cudaMemcpyHostToHost = 0, - #[doc = "< Host -> Device"] cudaMemcpyHostToDevice = 1, - #[doc = "< Device -> Host"] cudaMemcpyDeviceToHost = 2, - #[doc = "< Device -> Device"] cudaMemcpyDeviceToDevice = 3, - #[doc = "< Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing"] cudaMemcpyDefault = 4, } -#[doc = " CUDA Pitched memory pointer"] -#[doc = ""] -#[doc = " \\sa ::make_cudaPitchedPtr"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaPitchedPtr { - #[doc = "< Pointer to allocated memory"] pub ptr: *mut ::libc::c_void, - #[doc = "< Pitch of allocated memory in bytes"] pub pitch: usize, - #[doc = "< Logical width of allocation in elements"] pub xsize: usize, - #[doc = "< Logical height of allocation in elements"] pub ysize: usize, } #[test] @@ -933,58 +749,80 @@ fn bindgen_test_layout_cudaPitchedPtr() { 8usize, concat!("Alignment of ", stringify!(cudaPitchedPtr)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xsize as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(xsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ysize as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ysize) - ) - ); + fn test_field_ptr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ptr) + ) + ); + } + test_field_ptr(); + fn test_field_pitch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(pitch) + ) + ); + } + test_field_pitch(); + fn test_field_xsize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).xsize) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(xsize) + ) + ); + } + test_field_xsize(); + fn test_field_ysize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ysize) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ysize) + ) + ); + } + test_field_ysize(); } -#[doc = " CUDA extent"] -#[doc = ""] -#[doc = " \\sa ::make_cudaExtent"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExtent { - #[doc = "< Width in elements when referring to array memory, in bytes when referring to linear memory"] pub width: usize, - #[doc = "< Height in elements"] pub height: usize, - #[doc = "< Depth in elements"] pub depth: usize, } #[test] @@ -999,48 +837,63 @@ fn bindgen_test_layout_cudaExtent() { 8usize, concat!("Alignment of ", stringify!(cudaExtent)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(depth) - ) - ); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_depth() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(depth) + ) + ); + } + test_field_depth(); } -#[doc = " CUDA 3D position"] -#[doc = ""] -#[doc = " \\sa ::make_cudaPos"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaPos { - #[doc = "< x"] pub x: usize, - #[doc = "< y"] pub y: usize, - #[doc = "< z"] pub z: usize, } #[test] @@ -1055,56 +908,68 @@ fn bindgen_test_layout_cudaPos() { 8usize, concat!("Alignment of ", stringify!(cudaPos)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(z) - ) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(x) + ) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(y) + ) + ); + } + test_field_y(); + fn test_field_z() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(z) + ) + ); + } + test_field_z(); } -#[doc = " CUDA 3D memory copying parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemcpy3DParms { - #[doc = "< Source memory address"] pub srcArray: cudaArray_t, - #[doc = "< Source position offset"] pub srcPos: cudaPos, - #[doc = "< Pitched source memory address"] pub srcPtr: cudaPitchedPtr, - #[doc = "< Destination memory address"] pub dstArray: cudaArray_t, - #[doc = "< Destination position offset"] pub dstPos: cudaPos, - #[doc = "< Pitched destination memory address"] pub dstPtr: cudaPitchedPtr, - #[doc = "< Requested memory copy size"] pub extent: cudaExtent, - #[doc = "< Type of transfer"] pub kind: cudaMemcpyKind, } #[test] @@ -1119,108 +984,154 @@ fn bindgen_test_layout_cudaMemcpy3DParms() { 8usize, concat!("Alignment of ", stringify!(cudaMemcpy3DParms)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(extent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).kind as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(kind) - ) - ); + fn test_field_srcArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcArray) + ) + ); + } + test_field_srcArray(); + fn test_field_srcPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPos) + ) + ); + } + test_field_srcPos(); + fn test_field_srcPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPtr) + ) + ); + } + test_field_srcPtr(); + fn test_field_dstArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstArray) + ) + ); + } + test_field_dstArray(); + fn test_field_dstPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPos) + ) + ); + } + test_field_dstPos(); + fn test_field_dstPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPtr) + ) + ); + } + test_field_dstPtr(); + fn test_field_extent() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(extent) + ) + ); + } + test_field_extent(); + fn test_field_kind() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).kind) as usize - ptr as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(kind) + ) + ); + } + test_field_kind(); } -#[doc = " CUDA 3D cross-device memory copying parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemcpy3DPeerParms { - #[doc = "< Source memory address"] pub srcArray: cudaArray_t, - #[doc = "< Source position offset"] pub srcPos: cudaPos, - #[doc = "< Pitched source memory address"] pub srcPtr: cudaPitchedPtr, - #[doc = "< Source device"] pub srcDevice: ::libc::c_int, - #[doc = "< Destination memory address"] pub dstArray: cudaArray_t, - #[doc = "< Destination position offset"] pub dstPos: cudaPos, - #[doc = "< Pitched destination memory address"] pub dstPtr: cudaPitchedPtr, - #[doc = "< Destination device"] pub dstDevice: ::libc::c_int, - #[doc = "< Requested memory copy size"] pub extent: cudaExtent, } #[test] @@ -1235,112 +1146,168 @@ fn bindgen_test_layout_cudaMemcpy3DPeerParms() { 8usize, concat!("Alignment of ", stringify!(cudaMemcpy3DPeerParms)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(extent) - ) - ); + fn test_field_srcArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcArray) + ) + ); + } + test_field_srcArray(); + fn test_field_srcPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPos) + ) + ); + } + test_field_srcPos(); + fn test_field_srcPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPtr) + ) + ); + } + test_field_srcPtr(); + fn test_field_srcDevice() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcDevice) + ) + ); + } + test_field_srcDevice(); + fn test_field_dstArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstArray) + ) + ); + } + test_field_dstArray(); + fn test_field_dstPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPos) + ) + ); + } + test_field_dstPos(); + fn test_field_dstPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPtr) + ) + ); + } + test_field_dstPtr(); + fn test_field_dstDevice() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstDevice) + ) + ); + } + test_field_dstDevice(); + fn test_field_extent() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(extent) + ) + ); + } + test_field_extent(); } -#[doc = " CUDA Memset node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemsetParams { - #[doc = "< Destination device pointer"] pub dst: *mut ::libc::c_void, - #[doc = "< Pitch of destination device pointer. Unused if height is 1"] pub pitch: usize, - #[doc = "< Value to be set"] pub value: ::libc::c_uint, - #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."] pub elementSize: ::libc::c_uint, - #[doc = "< Width of the row in elements"] pub width: usize, - #[doc = "< Number of rows"] pub height: usize, } #[test] @@ -1355,100 +1322,124 @@ fn bindgen_test_layout_cudaMemsetParams() { 8usize, concat!("Alignment of ", stringify!(cudaMemsetParams)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dst as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(dst) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).elementSize as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(elementSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(height) - ) - ); + fn test_field_dst() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(dst) + ) + ); + } + test_field_dst(); + fn test_field_pitch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(pitch) + ) + ); + } + test_field_pitch(); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(value) + ) + ); + } + test_field_value(); + fn test_field_elementSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(elementSize) + ) + ); + } + test_field_elementSize(); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(height) + ) + ); + } + test_field_height(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Specifies performance hint with ::cudaAccessPolicyWindow for hitProp and missProp members."] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaAccessProperty { - #[doc = "< Normal cache persistence."] cudaAccessPropertyNormal = 0, - #[doc = "< Streaming access is less likely to persit from cache."] cudaAccessPropertyStreaming = 1, - #[doc = "< Persisting access is more likely to persist in cache."] cudaAccessPropertyPersisting = 2, } -#[doc = " Specifies an access policy for a window, a contiguous extent of memory"] -#[doc = " beginning at base_ptr and ending at base_ptr + num_bytes."] -#[doc = " Partition into many segments and assign segments such that."] -#[doc = " sum of \"hit segments\" / window == approx. ratio."] -#[doc = " sum of \"miss segments\" / window == approx 1-ratio."] -#[doc = " Segments and ratio specifications are fitted to the capabilities of"] -#[doc = " the architecture."] -#[doc = " Accesses in a hit segment apply the hitProp access policy."] -#[doc = " Accesses in a miss segment apply the missProp access policy."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaAccessPolicyWindow { - #[doc = "< Starting address of the access policy window. CUDA driver may align it."] pub base_ptr: *mut ::libc::c_void, - #[doc = "< Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment."] pub num_bytes: usize, - #[doc = "< hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp."] pub hitRatio: f32, - #[doc = "< ::CUaccessProperty set for hit."] pub hitProp: cudaAccessProperty, - #[doc = "< ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING."] pub missProp: cudaAccessProperty, } #[test] @@ -1463,73 +1454,101 @@ fn bindgen_test_layout_cudaAccessPolicyWindow() { 8usize, concat!("Alignment of ", stringify!(cudaAccessPolicyWindow)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).base_ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(base_ptr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_bytes as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(num_bytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hitRatio as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitRatio) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hitProp as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitProp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).missProp as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(missProp) - ) - ); -} -#[doc = " CUDA host function"] -#[doc = " \\param userData Argument value passed to the function"] -pub type cudaHostFn_t = ::std::option::Option; -#[doc = " CUDA host node parameters"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaHostNodeParams { - #[doc = "< The function to call when the node executes"] - pub fn_: cudaHostFn_t, - #[doc = "< Argument to pass to the function"] - pub userData: *mut ::libc::c_void, -} -#[test] -fn bindgen_test_layout_cudaHostNodeParams() { + fn test_field_base_ptr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).base_ptr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(base_ptr) + ) + ); + } + test_field_base_ptr(); + fn test_field_num_bytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).num_bytes) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(num_bytes) + ) + ); + } + test_field_num_bytes(); + fn test_field_hitRatio() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hitRatio) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitRatio) + ) + ); + } + test_field_hitRatio(); + fn test_field_hitProp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hitProp) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitProp) + ) + ); + } + test_field_hitProp(); + fn test_field_missProp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).missProp) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(missProp) + ) + ); + } + test_field_missProp(); +} +pub type cudaHostFn_t = ::std::option::Option; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaHostNodeParams { + pub fn_: cudaHostFn_t, + pub userData: *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaHostNodeParams() { assert_eq!( ::std::mem::size_of::(), 16usize, @@ -1540,44 +1559,51 @@ fn bindgen_test_layout_cudaHostNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaHostNodeParams)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).userData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(userData) - ) - ); + fn test_field_fn() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(fn_) + ) + ); + } + test_field_fn(); + fn test_field_userData() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(userData) + ) + ); + } + test_field_userData(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Possible stream capture statuses returned by ::cudaStreamIsCapturing"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamCaptureStatus { - #[doc = "< Stream is not capturing"] cudaStreamCaptureStatusNone = 0, - #[doc = "< Stream is actively capturing"] cudaStreamCaptureStatusActive = 1, - #[doc = "< Stream is part of a capture sequence that"] - #[doc = "has been invalidated, but not terminated"] cudaStreamCaptureStatusInvalidated = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " Possible modes for stream capture thread interactions. For more details see"] -#[doc = " ::cudaStreamBeginCapture and ::cudaThreadExchangeStreamCaptureMode"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamCaptureMode { cudaStreamCaptureModeGlobal = 0, @@ -1595,83 +1621,23 @@ pub enum cudaSynchronizationPolicy { } #[repr(u32)] #[non_exhaustive] -#[doc = " Stream Attributes"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaStreamAttrID { - #[doc = "< Identifier for ::cudaStreamAttrValue::accessPolicyWindow."] - cudaStreamAttributeAccessPolicyWindow = 1, - #[doc = "< ::cudaSynchronizationPolicy for work queued up in this stream"] - cudaStreamAttributeSynchronizationPolicy = 3, -} -#[doc = " Stream attributes union used with ::cudaStreamSetAttribute/::cudaStreamGetAttribute"] -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaStreamAttrValue { - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub syncPolicy: cudaSynchronizationPolicy, -} -#[test] -fn bindgen_test_layout_cudaStreamAttrValue() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaStreamAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaStreamAttrValue)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessPolicyWindow as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).syncPolicy as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(syncPolicy) - ) - ); -} -#[repr(u32)] -#[non_exhaustive] -#[doc = " Flags for ::cudaStreamUpdateCaptureDependencies"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamUpdateCaptureDependenciesFlags { - #[doc = "< Add new nodes to the dependency set"] cudaStreamAddCaptureDependencies = 0, - #[doc = "< Replace the dependency set with the new nodes"] cudaStreamSetCaptureDependencies = 1, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for user objects for graphs"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaUserObjectFlags { - #[doc = "< Indicates the destructor execution is not synchronized by any CUDA handle."] cudaUserObjectNoDestructorSync = 1, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for retaining user object references for graphs"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaUserObjectRetainFlags { - #[doc = "< Transfer references from the caller rather than creating new references."] cudaGraphUserObjectMove = 1, } -#[doc = " CUDA graphics interop resource"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaGraphicsResource { @@ -1679,201 +1645,85 @@ pub struct cudaGraphicsResource { } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA graphics interop register flags"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphicsRegisterFlags { - #[doc = "< Default"] cudaGraphicsRegisterFlagsNone = 0, - #[doc = "< CUDA will not write to this resource"] cudaGraphicsRegisterFlagsReadOnly = 1, - #[doc = "< CUDA will only write to and will not read from this resource"] cudaGraphicsRegisterFlagsWriteDiscard = 2, - #[doc = "< CUDA will bind this resource to a surface reference"] cudaGraphicsRegisterFlagsSurfaceLoadStore = 4, - #[doc = "< CUDA will perform texture gather operations on this resource"] cudaGraphicsRegisterFlagsTextureGather = 8, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA graphics interop map flags"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphicsMapFlags { - #[doc = "< Default; Assume resource can be read/written"] cudaGraphicsMapFlagsNone = 0, - #[doc = "< CUDA will not write to this resource"] cudaGraphicsMapFlagsReadOnly = 1, - #[doc = "< CUDA will only write to and will not read from this resource"] cudaGraphicsMapFlagsWriteDiscard = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA graphics interop array indices for cube maps"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphicsCubeFace { - #[doc = "< Positive X face of cubemap"] cudaGraphicsCubeFacePositiveX = 0, - #[doc = "< Negative X face of cubemap"] cudaGraphicsCubeFaceNegativeX = 1, - #[doc = "< Positive Y face of cubemap"] cudaGraphicsCubeFacePositiveY = 2, - #[doc = "< Negative Y face of cubemap"] cudaGraphicsCubeFaceNegativeY = 3, - #[doc = "< Positive Z face of cubemap"] cudaGraphicsCubeFacePositiveZ = 4, - #[doc = "< Negative Z face of cubemap"] cudaGraphicsCubeFaceNegativeZ = 5, } #[repr(u32)] #[non_exhaustive] -#[doc = " Graph kernel node Attributes"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaKernelNodeAttrID { - #[doc = "< Identifier for ::cudaKernelNodeAttrValue::accessPolicyWindow."] - cudaKernelNodeAttributeAccessPolicyWindow = 1, - #[doc = "< Allows a kernel node to be cooperative (see ::cudaLaunchCooperativeKernel)."] - cudaKernelNodeAttributeCooperative = 2, -} -#[doc = " Graph kernel node attributes union, used with ::cudaGraphKernelNodeSetAttribute/::cudaGraphKernelNodeGetAttribute"] -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaKernelNodeAttrValue { - #[doc = "< Attribute ::CUaccessPolicyWindow."] - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub cooperative: ::libc::c_int, -} -#[test] -fn bindgen_test_layout_cudaKernelNodeAttrValue() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaKernelNodeAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaKernelNodeAttrValue)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessPolicyWindow as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperative as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(cooperative) - ) - ); -} -#[repr(u32)] -#[non_exhaustive] -#[doc = " CUDA resource types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaResourceType { - #[doc = "< Array resource"] cudaResourceTypeArray = 0, - #[doc = "< Mipmapped array resource"] cudaResourceTypeMipmappedArray = 1, - #[doc = "< Linear resource"] cudaResourceTypeLinear = 2, - #[doc = "< Pitch 2D resource"] cudaResourceTypePitch2D = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA texture resource view formats"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaResourceViewFormat { - #[doc = "< No resource view format (use underlying resource format)"] cudaResViewFormatNone = 0, - #[doc = "< 1 channel unsigned 8-bit integers"] cudaResViewFormatUnsignedChar1 = 1, - #[doc = "< 2 channel unsigned 8-bit integers"] cudaResViewFormatUnsignedChar2 = 2, - #[doc = "< 4 channel unsigned 8-bit integers"] cudaResViewFormatUnsignedChar4 = 3, - #[doc = "< 1 channel signed 8-bit integers"] cudaResViewFormatSignedChar1 = 4, - #[doc = "< 2 channel signed 8-bit integers"] cudaResViewFormatSignedChar2 = 5, - #[doc = "< 4 channel signed 8-bit integers"] cudaResViewFormatSignedChar4 = 6, - #[doc = "< 1 channel unsigned 16-bit integers"] cudaResViewFormatUnsignedShort1 = 7, - #[doc = "< 2 channel unsigned 16-bit integers"] cudaResViewFormatUnsignedShort2 = 8, - #[doc = "< 4 channel unsigned 16-bit integers"] cudaResViewFormatUnsignedShort4 = 9, - #[doc = "< 1 channel signed 16-bit integers"] cudaResViewFormatSignedShort1 = 10, - #[doc = "< 2 channel signed 16-bit integers"] cudaResViewFormatSignedShort2 = 11, - #[doc = "< 4 channel signed 16-bit integers"] cudaResViewFormatSignedShort4 = 12, - #[doc = "< 1 channel unsigned 32-bit integers"] cudaResViewFormatUnsignedInt1 = 13, - #[doc = "< 2 channel unsigned 32-bit integers"] cudaResViewFormatUnsignedInt2 = 14, - #[doc = "< 4 channel unsigned 32-bit integers"] cudaResViewFormatUnsignedInt4 = 15, - #[doc = "< 1 channel signed 32-bit integers"] cudaResViewFormatSignedInt1 = 16, - #[doc = "< 2 channel signed 32-bit integers"] cudaResViewFormatSignedInt2 = 17, - #[doc = "< 4 channel signed 32-bit integers"] cudaResViewFormatSignedInt4 = 18, - #[doc = "< 1 channel 16-bit floating point"] cudaResViewFormatHalf1 = 19, - #[doc = "< 2 channel 16-bit floating point"] cudaResViewFormatHalf2 = 20, - #[doc = "< 4 channel 16-bit floating point"] cudaResViewFormatHalf4 = 21, - #[doc = "< 1 channel 32-bit floating point"] cudaResViewFormatFloat1 = 22, - #[doc = "< 2 channel 32-bit floating point"] cudaResViewFormatFloat2 = 23, - #[doc = "< 4 channel 32-bit floating point"] cudaResViewFormatFloat4 = 24, - #[doc = "< Block compressed 1"] cudaResViewFormatUnsignedBlockCompressed1 = 25, - #[doc = "< Block compressed 2"] cudaResViewFormatUnsignedBlockCompressed2 = 26, - #[doc = "< Block compressed 3"] cudaResViewFormatUnsignedBlockCompressed3 = 27, - #[doc = "< Block compressed 4 unsigned"] cudaResViewFormatUnsignedBlockCompressed4 = 28, - #[doc = "< Block compressed 4 signed"] cudaResViewFormatSignedBlockCompressed4 = 29, - #[doc = "< Block compressed 5 unsigned"] cudaResViewFormatUnsignedBlockCompressed5 = 30, - #[doc = "< Block compressed 5 signed"] cudaResViewFormatSignedBlockCompressed5 = 31, - #[doc = "< Block compressed 6 unsigned half-float"] cudaResViewFormatUnsignedBlockCompressed6H = 32, - #[doc = "< Block compressed 6 signed half-float"] cudaResViewFormatSignedBlockCompressed6H = 33, - #[doc = "< Block compressed 7"] cudaResViewFormatUnsignedBlockCompressed7 = 34, } -#[doc = " CUDA resource descriptor"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaResourceDesc { - #[doc = "< Resource type"] pub resType: cudaResourceType, pub res: cudaResourceDesc__bindgen_ty_1, } @@ -1888,7 +1738,6 @@ pub union cudaResourceDesc__bindgen_ty_1 { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { - #[doc = "< CUDA array"] pub array: cudaArray_t, } #[test] @@ -1909,24 +1758,29 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_1() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).array - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(array) - ) - ); + fn test_field_array() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(array) + ) + ); + } + test_field_array(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { - #[doc = "< CUDA mipmapped array"] pub mipmap: cudaMipmappedArray_t, } #[test] @@ -1947,28 +1801,31 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_2() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmap - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(mipmap) - ) - ); + fn test_field_mipmap() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(mipmap) + ) + ); + } + test_field_mipmap(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { - #[doc = "< Device pointer"] pub devPtr: *mut ::libc::c_void, - #[doc = "< Channel descriptor"] pub desc: cudaChannelFormatDesc, - #[doc = "< Size in bytes"] pub sizeInBytes: usize, } #[test] @@ -1989,58 +1846,71 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_3() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).desc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(desc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sizeInBytes - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(sizeInBytes) - ) - ); + fn test_field_devPtr() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(devPtr) + ) + ); + } + test_field_devPtr(); + fn test_field_desc() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(desc) + ) + ); + } + test_field_desc(); + fn test_field_sizeInBytes() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(sizeInBytes) + ) + ); + } + test_field_sizeInBytes(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { - #[doc = "< Device pointer"] pub devPtr: *mut ::libc::c_void, - #[doc = "< Channel descriptor"] pub desc: cudaChannelFormatDesc, - #[doc = "< Width of the array in elements"] pub width: usize, - #[doc = "< Height of the array in elements"] pub height: usize, - #[doc = "< Pitch between two rows in bytes"] pub pitchInBytes: usize, } #[test] @@ -2061,71 +1931,101 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_4() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).desc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(desc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height - as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitchInBytes - as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(pitchInBytes) - ) - ); + fn test_field_devPtr() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(devPtr) + ) + ); + } + test_field_devPtr(); + fn test_field_desc() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(desc) + ) + ); + } + test_field_desc(); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_pitchInBytes() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(pitchInBytes) + ) + ); + } + test_field_pitchInBytes(); } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { @@ -2139,54 +2039,74 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { 8usize, concat!("Alignment of ", stringify!(cudaResourceDesc__bindgen_ty_1)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).array as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmap as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(mipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linear as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(linear) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitch2D as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(pitch2D) - ) - ); + fn test_field_array() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(array) + ) + ); + } + test_field_array(); + fn test_field_mipmap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(mipmap) + ) + ); + } + test_field_mipmap(); + fn test_field_linear() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(linear) + ) + ); + } + test_field_linear(); + fn test_field_pitch2D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(pitch2D) + ) + ); + } + test_field_pitch2D(); } #[test] fn bindgen_test_layout_cudaResourceDesc() { @@ -2200,46 +2120,51 @@ fn bindgen_test_layout_cudaResourceDesc() { 8usize, concat!("Alignment of ", stringify!(cudaResourceDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).resType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(resType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).res as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(res) - ) - ); + fn test_field_resType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(resType) + ) + ); + } + test_field_resType(); + fn test_field_res() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(res) + ) + ); + } + test_field_res(); } -#[doc = " CUDA resource view descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceViewDesc { - #[doc = "< Resource view format"] pub format: cudaResourceViewFormat, - #[doc = "< Width of the resource view"] pub width: usize, - #[doc = "< Height of the resource view"] pub height: usize, - #[doc = "< Depth of the resource view"] pub depth: usize, - #[doc = "< First defined mipmap level"] pub firstMipmapLevel: ::libc::c_uint, - #[doc = "< Last defined mipmap level"] pub lastMipmapLevel: ::libc::c_uint, - #[doc = "< First layer index"] pub firstLayer: ::libc::c_uint, - #[doc = "< Last layer index"] pub lastLayer: ::libc::c_uint, } #[test] @@ -2254,114 +2179,149 @@ fn bindgen_test_layout_cudaResourceViewDesc() { 8usize, concat!("Alignment of ", stringify!(cudaResourceViewDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).firstMipmapLevel as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstMipmapLevel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).lastMipmapLevel as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastMipmapLevel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).firstLayer as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstLayer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lastLayer as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastLayer) - ) - ); + fn test_field_format() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(format) + ) + ); + } + test_field_format(); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_depth() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(depth) + ) + ); + } + test_field_depth(); + fn test_field_firstMipmapLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstMipmapLevel) + ) + ); + } + test_field_firstMipmapLevel(); + fn test_field_lastMipmapLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastMipmapLevel) + ) + ); + } + test_field_lastMipmapLevel(); + fn test_field_firstLayer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstLayer) + ) + ); + } + test_field_firstLayer(); + fn test_field_lastLayer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastLayer) + ) + ); + } + test_field_lastLayer(); } -#[doc = " CUDA pointer attributes"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaPointerAttributes { - #[doc = " The type of memory - ::cudaMemoryTypeUnregistered, ::cudaMemoryTypeHost,"] - #[doc = " ::cudaMemoryTypeDevice or ::cudaMemoryTypeManaged."] pub type_: cudaMemoryType, - #[doc = " The device against which the memory was allocated or registered."] - #[doc = " If the memory type is ::cudaMemoryTypeDevice then this identifies"] - #[doc = " the device on which the memory referred physically resides. If"] - #[doc = " the memory type is ::cudaMemoryTypeHost or::cudaMemoryTypeManaged then"] - #[doc = " this identifies the device which was current when the memory was allocated"] - #[doc = " or registered (and if that device is deinitialized then this allocation"] - #[doc = " will vanish with that device's state)."] pub device: ::libc::c_int, - #[doc = " The address which may be dereferenced on the current device to access"] - #[doc = " the memory or NULL if no such address exists."] pub devicePointer: *mut ::libc::c_void, - #[doc = " The address which may be dereferenced on the host to access the"] - #[doc = " memory or NULL if no such address exists."] - #[doc = ""] - #[doc = " \\note CUDA doesn't check if unregistered memory is allocated so this field"] - #[doc = " may contain invalid pointer if an invalid pointer has been passed to CUDA."] pub hostPointer: *mut ::libc::c_void, } #[test] @@ -2376,90 +2336,87 @@ fn bindgen_test_layout_cudaPointerAttributes() { 8usize, concat!("Alignment of ", stringify!(cudaPointerAttributes)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).device as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(device) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devicePointer as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(devicePointer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hostPointer as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(hostPointer) - ) - ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_device() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(device) + ) + ); + } + test_field_device(); + fn test_field_devicePointer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).devicePointer) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(devicePointer) + ) + ); + } + test_field_devicePointer(); + fn test_field_hostPointer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hostPointer) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(hostPointer) + ) + ); + } + test_field_hostPointer(); } -#[doc = " CUDA function attributes"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaFuncAttributes { - #[doc = " The size in bytes of statically-allocated shared memory per block"] - #[doc = " required by this function. This does not include dynamically-allocated"] - #[doc = " shared memory requested by the user at runtime."] pub sharedSizeBytes: usize, - #[doc = " The size in bytes of user-allocated constant memory required by this"] - #[doc = " function."] pub constSizeBytes: usize, - #[doc = " The size in bytes of local memory used by each thread of this function."] pub localSizeBytes: usize, - #[doc = " The maximum number of threads per block, beyond which a launch of the"] - #[doc = " function would fail. This number depends on both the function and the"] - #[doc = " device on which the function is currently loaded."] pub maxThreadsPerBlock: ::libc::c_int, - #[doc = " The number of registers used by each thread of this function."] pub numRegs: ::libc::c_int, - #[doc = " The PTX virtual architecture version for which the function was"] - #[doc = " compiled. This value is the major PTX version * 10 + the minor PTX"] - #[doc = " version, so a PTX version 1.3 function would return the value 13."] pub ptxVersion: ::libc::c_int, - #[doc = " The binary architecture version for which the function was compiled."] - #[doc = " This value is the major binary version * 10 + the minor binary version,"] - #[doc = " so a binary version 1.3 function would return the value 13."] pub binaryVersion: ::libc::c_int, - #[doc = " The attribute to indicate whether the function has been compiled with"] - #[doc = " user specified option \"-Xptxas --dlcm=ca\" set."] pub cacheModeCA: ::libc::c_int, - #[doc = " The maximum size in bytes of dynamic shared memory per block for"] - #[doc = " this function. Any launch must have a dynamic shared memory size"] - #[doc = " smaller than this value."] pub maxDynamicSharedSizeBytes: ::libc::c_int, - #[doc = " On devices where the L1 cache and shared memory use the same hardware resources,"] - #[doc = " this sets the shared memory carveout preference, in percent of the maximum shared memory."] - #[doc = " Refer to ::cudaDevAttrMaxSharedMemoryPerMultiprocessor."] - #[doc = " This is only a hint, and the driver can choose a different ratio if required to execute the function."] - #[doc = " See ::cudaFuncSetAttribute"] pub preferredShmemCarveout: ::libc::c_int, } #[test] @@ -2474,151 +2431,196 @@ fn bindgen_test_layout_cudaFuncAttributes() { 8usize, concat!("Alignment of ", stringify!(cudaFuncAttributes)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedSizeBytes as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(sharedSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).constSizeBytes as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(constSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).localSizeBytes as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(localSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).numRegs as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(numRegs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ptxVersion as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(ptxVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).binaryVersion as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(binaryVersion) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cacheModeCA as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(cacheModeCA) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxDynamicSharedSizeBytes as *const _ - as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxDynamicSharedSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).preferredShmemCarveout as *const _ - as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(preferredShmemCarveout) - ) - ); + fn test_field_sharedSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedSizeBytes) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(sharedSizeBytes) + ) + ); + } + test_field_sharedSizeBytes(); + fn test_field_constSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).constSizeBytes) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(constSizeBytes) + ) + ); + } + test_field_constSizeBytes(); + fn test_field_localSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).localSizeBytes) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(localSizeBytes) + ) + ); + } + test_field_localSizeBytes(); + fn test_field_maxThreadsPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + } + test_field_maxThreadsPerBlock(); + fn test_field_numRegs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numRegs) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(numRegs) + ) + ); + } + test_field_numRegs(); + fn test_field_ptxVersion() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ptxVersion) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(ptxVersion) + ) + ); + } + test_field_ptxVersion(); + fn test_field_binaryVersion() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).binaryVersion) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(binaryVersion) + ) + ); + } + test_field_binaryVersion(); + fn test_field_cacheModeCA() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cacheModeCA) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(cacheModeCA) + ) + ); + } + test_field_cacheModeCA(); + fn test_field_maxDynamicSharedSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxDynamicSharedSizeBytes) as usize - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxDynamicSharedSizeBytes) + ) + ); + } + test_field_maxDynamicSharedSizeBytes(); + fn test_field_preferredShmemCarveout() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).preferredShmemCarveout) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(preferredShmemCarveout) + ) + ); + } + test_field_preferredShmemCarveout(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA function attributes that can be set using ::cudaFuncSetAttribute"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFuncAttribute { - #[doc = "< Maximum dynamic shared memory size"] cudaFuncAttributeMaxDynamicSharedMemorySize = 8, - #[doc = "< Preferred shared memory-L1 cache split"] cudaFuncAttributePreferredSharedMemoryCarveout = 9, cudaFuncAttributeMax = 10, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA function cache configurations"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFuncCache { - #[doc = "< Default function cache configuration, no preference"] cudaFuncCachePreferNone = 0, - #[doc = "< Prefer larger shared memory and smaller L1 cache"] cudaFuncCachePreferShared = 1, - #[doc = "< Prefer larger L1 cache and smaller shared memory"] cudaFuncCachePreferL1 = 2, - #[doc = "< Prefer equal size L1 cache and shared memory"] cudaFuncCachePreferEqual = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA shared memory configuration"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaSharedMemConfig { cudaSharedMemBankSizeDefault = 0, @@ -2627,421 +2629,235 @@ pub enum cudaSharedMemConfig { } #[repr(i32)] #[non_exhaustive] -#[doc = " Shared memory carveout configurations. These may be passed to cudaFuncSetAttribute"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaSharedCarveout { - #[doc = "< No preference for shared memory or L1 (default)"] cudaSharedmemCarveoutDefault = -1, - #[doc = "< Prefer maximum available shared memory, minimum L1 cache"] cudaSharedmemCarveoutMaxShared = 100, - #[doc = "< Prefer maximum available L1 cache, minimum shared memory"] cudaSharedmemCarveoutMaxL1 = 0, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA device compute modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaComputeMode { - #[doc = "< Default compute mode (Multiple threads can use ::cudaSetDevice() with this device)"] cudaComputeModeDefault = 0, - #[doc = "< Compute-exclusive-thread mode (Only one thread in one process will be able to use ::cudaSetDevice() with this device)"] cudaComputeModeExclusive = 1, - #[doc = "< Compute-prohibited mode (No threads can use ::cudaSetDevice() with this device)"] cudaComputeModeProhibited = 2, - #[doc = "< Compute-exclusive-process mode (Many threads in one process will be able to use ::cudaSetDevice() with this device)"] cudaComputeModeExclusiveProcess = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Limits"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaLimit { - #[doc = "< GPU thread stack size"] cudaLimitStackSize = 0, - #[doc = "< GPU printf FIFO size"] cudaLimitPrintfFifoSize = 1, - #[doc = "< GPU malloc heap size"] cudaLimitMallocHeapSize = 2, - #[doc = "< GPU device runtime synchronize depth"] cudaLimitDevRuntimeSyncDepth = 3, - #[doc = "< GPU device runtime pending launch count"] cudaLimitDevRuntimePendingLaunchCount = 4, - #[doc = "< A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint"] cudaLimitMaxL2FetchGranularity = 5, - #[doc = "< A size in bytes for L2 persisting lines cache size"] cudaLimitPersistingL2CacheSize = 6, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Memory Advise values"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemoryAdvise { - #[doc = "< Data will mostly be read and only occassionally be written to"] cudaMemAdviseSetReadMostly = 1, - #[doc = "< Undo the effect of ::cudaMemAdviseSetReadMostly"] cudaMemAdviseUnsetReadMostly = 2, - #[doc = "< Set the preferred location for the data as the specified device"] cudaMemAdviseSetPreferredLocation = 3, - #[doc = "< Clear the preferred location for the data"] cudaMemAdviseUnsetPreferredLocation = 4, - #[doc = "< Data will be accessed by the specified device, so prevent page faults as much as possible"] cudaMemAdviseSetAccessedBy = 5, - #[doc = "< Let the Unified Memory subsystem decide on the page faulting policy for the specified device"] cudaMemAdviseUnsetAccessedBy = 6, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA range attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemRangeAttribute { - #[doc = "< Whether the range will mostly be read and only occassionally be written to"] cudaMemRangeAttributeReadMostly = 1, - #[doc = "< The preferred location of the range"] cudaMemRangeAttributePreferredLocation = 2, - #[doc = "< Memory range has ::cudaMemAdviseSetAccessedBy set for specified device"] cudaMemRangeAttributeAccessedBy = 3, - #[doc = "< The last location to which the range was prefetched"] cudaMemRangeAttributeLastPrefetchLocation = 4, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Profiler Output modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaOutputMode { - #[doc = "< Output mode Key-Value pair format."] cudaKeyValuePair = 0, - #[doc = "< Output mode Comma separated values format."] cudaCSV = 1, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes APIs supported on the device"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFlushGPUDirectRDMAWritesOptions { - #[doc = "< ::cudaDeviceFlushGPUDirectRDMAWrites() and its CUDA Driver API counterpart are supported on the device."] cudaFlushGPUDirectRDMAWritesOptionHost = 1, - #[doc = "< The ::CU_STREAM_WAIT_VALUE_FLUSH flag and the ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the CUDA device."] cudaFlushGPUDirectRDMAWritesOptionMemOps = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes ordering features of the device"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGPUDirectRDMAWritesOrdering { - #[doc = "< The device does not natively support ordering of GPUDirect RDMA writes. ::cudaFlushGPUDirectRDMAWrites() can be leveraged if supported."] cudaGPUDirectRDMAWritesOrderingNone = 0, - #[doc = "< Natively, the device can consistently consume GPUDirect RDMA writes, although other CUDA devices may not."] cudaGPUDirectRDMAWritesOrderingOwner = 100, - #[doc = "< Any CUDA device in the system can consistently consume GPUDirect RDMA writes to this device."] cudaGPUDirectRDMAWritesOrderingAllDevices = 200, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes scopes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFlushGPUDirectRDMAWritesScope { - #[doc = "< Blocks until remote writes are visible to the CUDA device context owning the data."] cudaFlushGPUDirectRDMAWritesToOwner = 100, - #[doc = "< Blocks until remote writes are visible to all CUDA device contexts."] cudaFlushGPUDirectRDMAWritesToAllDevices = 200, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes targets"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFlushGPUDirectRDMAWritesTarget { - #[doc = "< Sets the target for ::cudaDeviceFlushGPUDirectRDMAWrites() to the currently active CUDA device context."] cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0, } +impl cudaDeviceAttr { + pub const cudaDevAttrMaxTimelineSemaphoreInteropSupported: cudaDeviceAttr = + cudaDeviceAttr::cudaDevAttrTimelineSemaphoreInteropSupported; +} #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA device attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaDeviceAttr { - #[doc = "< Maximum number of threads per block"] cudaDevAttrMaxThreadsPerBlock = 1, - #[doc = "< Maximum block dimension X"] cudaDevAttrMaxBlockDimX = 2, - #[doc = "< Maximum block dimension Y"] cudaDevAttrMaxBlockDimY = 3, - #[doc = "< Maximum block dimension Z"] cudaDevAttrMaxBlockDimZ = 4, - #[doc = "< Maximum grid dimension X"] cudaDevAttrMaxGridDimX = 5, - #[doc = "< Maximum grid dimension Y"] cudaDevAttrMaxGridDimY = 6, - #[doc = "< Maximum grid dimension Z"] cudaDevAttrMaxGridDimZ = 7, - #[doc = "< Maximum shared memory available per block in bytes"] cudaDevAttrMaxSharedMemoryPerBlock = 8, - #[doc = "< Memory available on device for __constant__ variables in a CUDA C kernel in bytes"] cudaDevAttrTotalConstantMemory = 9, - #[doc = "< Warp size in threads"] cudaDevAttrWarpSize = 10, - #[doc = "< Maximum pitch in bytes allowed by memory copies"] cudaDevAttrMaxPitch = 11, - #[doc = "< Maximum number of 32-bit registers available per block"] cudaDevAttrMaxRegistersPerBlock = 12, - #[doc = "< Peak clock frequency in kilohertz"] cudaDevAttrClockRate = 13, - #[doc = "< Alignment requirement for textures"] cudaDevAttrTextureAlignment = 14, - #[doc = "< Device can possibly copy memory and execute a kernel concurrently"] cudaDevAttrGpuOverlap = 15, - #[doc = "< Number of multiprocessors on device"] cudaDevAttrMultiProcessorCount = 16, - #[doc = "< Specifies whether there is a run time limit on kernels"] cudaDevAttrKernelExecTimeout = 17, - #[doc = "< Device is integrated with host memory"] cudaDevAttrIntegrated = 18, - #[doc = "< Device can map host memory into CUDA address space"] cudaDevAttrCanMapHostMemory = 19, - #[doc = "< Compute mode (See ::cudaComputeMode for details)"] cudaDevAttrComputeMode = 20, - #[doc = "< Maximum 1D texture width"] cudaDevAttrMaxTexture1DWidth = 21, - #[doc = "< Maximum 2D texture width"] cudaDevAttrMaxTexture2DWidth = 22, - #[doc = "< Maximum 2D texture height"] cudaDevAttrMaxTexture2DHeight = 23, - #[doc = "< Maximum 3D texture width"] cudaDevAttrMaxTexture3DWidth = 24, - #[doc = "< Maximum 3D texture height"] cudaDevAttrMaxTexture3DHeight = 25, - #[doc = "< Maximum 3D texture depth"] cudaDevAttrMaxTexture3DDepth = 26, - #[doc = "< Maximum 2D layered texture width"] cudaDevAttrMaxTexture2DLayeredWidth = 27, - #[doc = "< Maximum 2D layered texture height"] cudaDevAttrMaxTexture2DLayeredHeight = 28, - #[doc = "< Maximum layers in a 2D layered texture"] cudaDevAttrMaxTexture2DLayeredLayers = 29, - #[doc = "< Alignment requirement for surfaces"] cudaDevAttrSurfaceAlignment = 30, - #[doc = "< Device can possibly execute multiple kernels concurrently"] cudaDevAttrConcurrentKernels = 31, - #[doc = "< Device has ECC support enabled"] cudaDevAttrEccEnabled = 32, - #[doc = "< PCI bus ID of the device"] cudaDevAttrPciBusId = 33, - #[doc = "< PCI device ID of the device"] cudaDevAttrPciDeviceId = 34, - #[doc = "< Device is using TCC driver model"] cudaDevAttrTccDriver = 35, - #[doc = "< Peak memory clock frequency in kilohertz"] cudaDevAttrMemoryClockRate = 36, - #[doc = "< Global memory bus width in bits"] cudaDevAttrGlobalMemoryBusWidth = 37, - #[doc = "< Size of L2 cache in bytes"] cudaDevAttrL2CacheSize = 38, - #[doc = "< Maximum resident threads per multiprocessor"] cudaDevAttrMaxThreadsPerMultiProcessor = 39, - #[doc = "< Number of asynchronous engines"] cudaDevAttrAsyncEngineCount = 40, - #[doc = "< Device shares a unified address space with the host"] cudaDevAttrUnifiedAddressing = 41, - #[doc = "< Maximum 1D layered texture width"] cudaDevAttrMaxTexture1DLayeredWidth = 42, - #[doc = "< Maximum layers in a 1D layered texture"] cudaDevAttrMaxTexture1DLayeredLayers = 43, - #[doc = "< Maximum 2D texture width if cudaArrayTextureGather is set"] cudaDevAttrMaxTexture2DGatherWidth = 45, - #[doc = "< Maximum 2D texture height if cudaArrayTextureGather is set"] cudaDevAttrMaxTexture2DGatherHeight = 46, - #[doc = "< Alternate maximum 3D texture width"] cudaDevAttrMaxTexture3DWidthAlt = 47, - #[doc = "< Alternate maximum 3D texture height"] cudaDevAttrMaxTexture3DHeightAlt = 48, - #[doc = "< Alternate maximum 3D texture depth"] cudaDevAttrMaxTexture3DDepthAlt = 49, - #[doc = "< PCI domain ID of the device"] cudaDevAttrPciDomainId = 50, - #[doc = "< Pitch alignment requirement for textures"] cudaDevAttrTexturePitchAlignment = 51, - #[doc = "< Maximum cubemap texture width/height"] cudaDevAttrMaxTextureCubemapWidth = 52, - #[doc = "< Maximum cubemap layered texture width/height"] cudaDevAttrMaxTextureCubemapLayeredWidth = 53, - #[doc = "< Maximum layers in a cubemap layered texture"] cudaDevAttrMaxTextureCubemapLayeredLayers = 54, - #[doc = "< Maximum 1D surface width"] cudaDevAttrMaxSurface1DWidth = 55, - #[doc = "< Maximum 2D surface width"] cudaDevAttrMaxSurface2DWidth = 56, - #[doc = "< Maximum 2D surface height"] cudaDevAttrMaxSurface2DHeight = 57, - #[doc = "< Maximum 3D surface width"] cudaDevAttrMaxSurface3DWidth = 58, - #[doc = "< Maximum 3D surface height"] cudaDevAttrMaxSurface3DHeight = 59, - #[doc = "< Maximum 3D surface depth"] cudaDevAttrMaxSurface3DDepth = 60, - #[doc = "< Maximum 1D layered surface width"] cudaDevAttrMaxSurface1DLayeredWidth = 61, - #[doc = "< Maximum layers in a 1D layered surface"] cudaDevAttrMaxSurface1DLayeredLayers = 62, - #[doc = "< Maximum 2D layered surface width"] cudaDevAttrMaxSurface2DLayeredWidth = 63, - #[doc = "< Maximum 2D layered surface height"] cudaDevAttrMaxSurface2DLayeredHeight = 64, - #[doc = "< Maximum layers in a 2D layered surface"] cudaDevAttrMaxSurface2DLayeredLayers = 65, - #[doc = "< Maximum cubemap surface width"] cudaDevAttrMaxSurfaceCubemapWidth = 66, - #[doc = "< Maximum cubemap layered surface width"] cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67, - #[doc = "< Maximum layers in a cubemap layered surface"] cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68, - #[doc = "< Maximum 1D linear texture width"] cudaDevAttrMaxTexture1DLinearWidth = 69, - #[doc = "< Maximum 2D linear texture width"] cudaDevAttrMaxTexture2DLinearWidth = 70, - #[doc = "< Maximum 2D linear texture height"] cudaDevAttrMaxTexture2DLinearHeight = 71, - #[doc = "< Maximum 2D linear texture pitch in bytes"] cudaDevAttrMaxTexture2DLinearPitch = 72, - #[doc = "< Maximum mipmapped 2D texture width"] cudaDevAttrMaxTexture2DMipmappedWidth = 73, - #[doc = "< Maximum mipmapped 2D texture height"] cudaDevAttrMaxTexture2DMipmappedHeight = 74, - #[doc = "< Major compute capability version number"] cudaDevAttrComputeCapabilityMajor = 75, - #[doc = "< Minor compute capability version number"] cudaDevAttrComputeCapabilityMinor = 76, - #[doc = "< Maximum mipmapped 1D texture width"] cudaDevAttrMaxTexture1DMipmappedWidth = 77, - #[doc = "< Device supports stream priorities"] cudaDevAttrStreamPrioritiesSupported = 78, - #[doc = "< Device supports caching globals in L1"] cudaDevAttrGlobalL1CacheSupported = 79, - #[doc = "< Device supports caching locals in L1"] cudaDevAttrLocalL1CacheSupported = 80, - #[doc = "< Maximum shared memory available per multiprocessor in bytes"] cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81, - #[doc = "< Maximum number of 32-bit registers available per multiprocessor"] cudaDevAttrMaxRegistersPerMultiprocessor = 82, - #[doc = "< Device can allocate managed memory on this system"] cudaDevAttrManagedMemory = 83, - #[doc = "< Device is on a multi-GPU board"] cudaDevAttrIsMultiGpuBoard = 84, - #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"] cudaDevAttrMultiGpuBoardGroupID = 85, - #[doc = "< Link between the device and the host supports native atomic operations"] cudaDevAttrHostNativeAtomicSupported = 86, - #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"] cudaDevAttrSingleToDoublePrecisionPerfRatio = 87, - #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"] cudaDevAttrPageableMemoryAccess = 88, - #[doc = "< Device can coherently access managed memory concurrently with the CPU"] cudaDevAttrConcurrentManagedAccess = 89, - #[doc = "< Device supports Compute Preemption"] cudaDevAttrComputePreemptionSupported = 90, - #[doc = "< Device can access host registered memory at the same virtual address as the CPU"] cudaDevAttrCanUseHostPointerForRegisteredMem = 91, cudaDevAttrReserved92 = 92, cudaDevAttrReserved93 = 93, cudaDevAttrReserved94 = 94, - #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"] cudaDevAttrCooperativeLaunch = 95, - #[doc = "< Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated."] cudaDevAttrCooperativeMultiDeviceLaunch = 96, - #[doc = "< The maximum optin shared memory per block. This value may vary by chip. See ::cudaFuncSetAttribute"] cudaDevAttrMaxSharedMemoryPerBlockOptin = 97, - #[doc = "< Device supports flushing of outstanding remote writes."] cudaDevAttrCanFlushRemoteWrites = 98, - #[doc = "< Device supports host memory registration via ::cudaHostRegister."] cudaDevAttrHostRegisterSupported = 99, - #[doc = "< Device accesses pageable memory via the host's page tables."] cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100, - #[doc = "< Host can directly access managed memory on the device without migration."] cudaDevAttrDirectManagedMemAccessFromHost = 101, - #[doc = "< Maximum number of blocks per multiprocessor"] cudaDevAttrMaxBlocksPerMultiprocessor = 106, - #[doc = "< Maximum L2 persisting lines capacity setting in bytes."] cudaDevAttrMaxPersistingL2CacheSize = 108, - #[doc = "< Maximum value of cudaAccessPolicyWindow::num_bytes."] cudaDevAttrMaxAccessPolicyWindowSize = 109, - #[doc = "< Shared memory reserved by CUDA driver per block in bytes"] cudaDevAttrReservedSharedMemoryPerBlock = 111, - #[doc = "< Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays"] cudaDevAttrSparseCudaArraySupported = 112, - #[doc = "< Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU"] cudaDevAttrHostRegisterReadOnlySupported = 113, - #[doc = "< External timeline semaphore interop is supported on the device"] - cudaDevAttrMaxTimelineSemaphoreInteropSupported = 114, - #[doc = "< Device supports using the ::cudaMallocAsync and ::cudaMemPool family of APIs"] + cudaDevAttrTimelineSemaphoreInteropSupported = 114, cudaDevAttrMemoryPoolsSupported = 115, - #[doc = "< Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)"] cudaDevAttrGPUDirectRDMASupported = 116, - #[doc = "< The returned attribute shall be interpreted as a bitmask, where the individual bits are listed in the ::cudaFlushGPUDirectRDMAWritesOptions enum"] cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117, - #[doc = "< GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See ::cudaGPUDirectRDMAWritesOrdering for the numerical values returned here."] cudaDevAttrGPUDirectRDMAWritesOrdering = 118, - #[doc = "< Handle types supported with mempool based IPC"] cudaDevAttrMemoryPoolSupportedHandleTypes = 119, - cudaDevAttrMax = 120, + cudaDevAttrDeferredMappingCudaArraySupported = 121, + cudaDevAttrMax = 122, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA memory pool attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemPoolAttr { - #[doc = " (value type = int)"] - #[doc = " Allow cuMemAllocAsync to use memory asynchronously freed"] - #[doc = " in another streams as long as a stream ordering dependency"] - #[doc = " of the allocating stream on the free action exists."] - #[doc = " Cuda events and null stream interactions can create the required"] - #[doc = " stream ordered dependencies. (default enabled)"] cudaMemPoolReuseFollowEventDependencies = 1, - #[doc = " (value type = int)"] - #[doc = " Allow reuse of already completed frees when there is no dependency"] - #[doc = " between the free and allocation. (default enabled)"] cudaMemPoolReuseAllowOpportunistic = 2, - #[doc = " (value type = int)"] - #[doc = " Allow cuMemAllocAsync to insert new stream dependencies"] - #[doc = " in order to establish the stream ordering required to reuse"] - #[doc = " a piece of memory released by cuFreeAsync (default enabled)."] cudaMemPoolReuseAllowInternalDependencies = 3, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of reserved memory in bytes to hold onto before trying"] - #[doc = " to release memory back to the OS. When more than the release"] - #[doc = " threshold bytes of memory are held by the memory pool, the"] - #[doc = " allocator will try to release memory back to the OS on the"] - #[doc = " next call to stream, event or context synchronize. (default 0)"] cudaMemPoolAttrReleaseThreshold = 4, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of backing memory currently allocated for the mempool."] cudaMemPoolAttrReservedMemCurrent = 5, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of backing memory allocated for the mempool since the"] - #[doc = " last time it was reset. High watermark can only be reset to zero."] cudaMemPoolAttrReservedMemHigh = 6, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of memory from the pool that is currently in use by the application."] cudaMemPoolAttrUsedMemCurrent = 7, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of the amount of memory from the pool that was in use by the application since"] - #[doc = " the last time it was reset. High watermark can only be reset to zero."] cudaMemPoolAttrUsedMemHigh = 8, } #[repr(u32)] #[non_exhaustive] -#[doc = " Specifies the type of location"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemLocationType { cudaMemLocationTypeInvalid = 0, - #[doc = "< Location is a device location, thus id is a device ordinal"] cudaMemLocationTypeDevice = 1, } -#[doc = " Specifies a memory location."] -#[doc = ""] -#[doc = " To specify a gpu, set type = ::cudaMemLocationTypeDevice and set id = the gpu's device ordinal."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemLocation { - #[doc = "< Specifies the location type, which modifies the meaning of id."] pub type_: cudaMemLocationType, - #[doc = "< identifier for a given this location's ::CUmemLocationType."] pub id: ::libc::c_int, } #[test] @@ -3056,46 +2872,53 @@ fn bindgen_test_layout_cudaMemLocation() { 4usize, concat!("Alignment of ", stringify!(cudaMemLocation)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(id) - ) - ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemLocation), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_id() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemLocation), + "::", + stringify!(id) + ) + ); + } + test_field_id(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Specifies the memory protection flags for mapping."] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemAccessFlags { - #[doc = "< Default, make the address range not accessible"] cudaMemAccessFlagsProtNone = 0, - #[doc = "< Make the address range read accessible"] cudaMemAccessFlagsProtRead = 1, - #[doc = "< Make the address range read-write accessible"] cudaMemAccessFlagsProtReadWrite = 3, } -#[doc = " Memory access descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemAccessDesc { - #[doc = "< Location on which the request is to change it's accessibility"] pub location: cudaMemLocation, - #[doc = "< ::CUmemProt accessibility flags to set on the request"] pub flags: cudaMemAccessFlags, } #[test] @@ -3110,70 +2933,65 @@ fn bindgen_test_layout_cudaMemAccessDesc() { 4usize, concat!("Alignment of ", stringify!(cudaMemAccessDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(location) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(flags) - ) - ); + fn test_field_location() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(location) + ) + ); + } + test_field_location(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Defines the allocation types available"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemAllocationType { cudaMemAllocationTypeInvalid = 0, - #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current"] - #[doc = " location while the application is actively using it"] cudaMemAllocationTypePinned = 1, - #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current"] - #[doc = " location while the application is actively using it"] cudaMemAllocationTypeMax = 2147483647, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for specifying particular handle types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemAllocationHandleType { - #[doc = "< Does not allow any export mechanism. >"] cudaMemHandleTypeNone = 0, - #[doc = "< Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)"] cudaMemHandleTypePosixFileDescriptor = 1, - #[doc = "< Allows a Win32 NT handle to be used for exporting. (HANDLE)"] cudaMemHandleTypeWin32 = 2, - #[doc = "< Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)"] cudaMemHandleTypeWin32Kmt = 4, } -#[doc = " Specifies the properties of allocations made from the pool."] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaMemPoolProps { - #[doc = "< Allocation type. Currently must be specified as cudaMemAllocationTypePinned"] pub allocType: cudaMemAllocationType, - #[doc = "< Handle types that will be supported by allocations from the pool."] pub handleTypes: cudaMemAllocationHandleType, - #[doc = "< Location allocations should reside."] pub location: cudaMemLocation, - #[doc = " Windows-specific LPSECURITYATTRIBUTES required when"] - #[doc = " ::cudaMemHandleTypeWin32 is specified. This security attribute defines"] - #[doc = " the scope of which exported allocations may be tranferred to other"] - #[doc = " processes. In all other cases, this field is required to be zero."] pub win32SecurityAttributes: *mut ::libc::c_void, - #[doc = "< reserved for future use, must be 0"] pub reserved: [::libc::c_uchar; 64usize], } #[test] @@ -3188,61 +3006,92 @@ fn bindgen_test_layout_cudaMemPoolProps() { 8usize, concat!("Alignment of ", stringify!(cudaMemPoolProps)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).allocType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(allocType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).handleTypes as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(handleTypes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(location) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32SecurityAttributes as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(win32SecurityAttributes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(reserved) - ) - ); + fn test_field_allocType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).allocType) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(allocType) + ) + ); + } + test_field_allocType(); + fn test_field_handleTypes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handleTypes) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(handleTypes) + ) + ); + } + test_field_handleTypes(); + fn test_field_location() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(location) + ) + ); + } + test_field_location(); + fn test_field_win32SecurityAttributes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).win32SecurityAttributes) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(win32SecurityAttributes) + ) + ); + } + test_field_win32SecurityAttributes(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Opaque data for exporting a pool allocation"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaMemPoolPtrExportData { @@ -3260,32 +3109,31 @@ fn bindgen_test_layout_cudaMemPoolPtrExportData() { 1usize, concat!("Alignment of ", stringify!(cudaMemPoolPtrExportData)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolPtrExportData), - "::", - stringify!(reserved) - ) - ); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolPtrExportData), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Memory allocation node parameters"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaMemAllocNodeParams { - #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"] pub poolProps: cudaMemPoolProps, - #[doc = "< in: number of memory access descriptors. Must not exceed the number of GPUs."] pub accessDescs: *const cudaMemAccessDesc, - #[doc = "< in: Number of `accessDescs`s"] pub accessDescCount: usize, - #[doc = "< in: size in bytes of the requested allocation"] pub bytesize: usize, - #[doc = "< out: address of the allocation returned by CUDA"] pub dptr: *mut ::libc::c_void, } #[test] @@ -3300,96 +3148,108 @@ fn bindgen_test_layout_cudaMemAllocNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaMemAllocNodeParams)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).poolProps as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(poolProps) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessDescs as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessDescCount as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesize as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(bytesize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dptr as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(dptr) - ) - ); + fn test_field_poolProps() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(poolProps) + ) + ); + } + test_field_poolProps(); + fn test_field_accessDescs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescs) + ) + ); + } + test_field_accessDescs(); + fn test_field_accessDescCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescCount) + ) + ); + } + test_field_accessDescCount(); + fn test_field_bytesize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(bytesize) + ) + ); + } + test_field_bytesize(); + fn test_field_dptr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize + }, + 112usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(dptr) + ) + ); + } + test_field_dptr(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Graph memory attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphMemAttributeType { - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of memory, in bytes, currently associated with graphs."] - cudaGraphMemAttrUsedMemCurrent = 1, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of memory, in bytes, associated with graphs since the"] - #[doc = " last time it was reset. High watermark can only be reset to zero."] - cudaGraphMemAttrUsedMemHigh = 2, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of memory, in bytes, currently allocated for use by"] - #[doc = " the CUDA graphs asynchronous allocator."] - cudaGraphMemAttrReservedMemCurrent = 3, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of memory, in bytes, currently allocated for use by"] - #[doc = " the CUDA graphs asynchronous allocator."] - cudaGraphMemAttrReservedMemHigh = 4, + cudaGraphMemAttrUsedMemCurrent = 0, + cudaGraphMemAttrUsedMemHigh = 1, + cudaGraphMemAttrReservedMemCurrent = 2, + cudaGraphMemAttrReservedMemHigh = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA device P2P attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaDeviceP2PAttr { - #[doc = "< A relative value indicating the performance of the link between two devices"] cudaDevP2PAttrPerformanceRank = 1, - #[doc = "< Peer access is enabled"] cudaDevP2PAttrAccessSupported = 2, - #[doc = "< Native atomic operation over the link supported"] cudaDevP2PAttrNativeAtomicSupported = 3, - #[doc = "< Accessing CUDA arrays over the link supported"] cudaDevP2PAttrCudaArrayAccessSupported = 4, } #[repr(C)] @@ -3409,182 +3269,108 @@ fn bindgen_test_layout_CUuuid_st() { 1usize, concat!("Alignment of ", stringify!(CUuuid_st)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytes as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUuuid_st), - "::", - stringify!(bytes) - ) - ); + fn test_field_bytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUuuid_st), + "::", + stringify!(bytes) + ) + ); + } + test_field_bytes(); } pub type CUuuid = CUuuid_st; pub type cudaUUID_t = CUuuid_st; -#[doc = " CUDA device properties"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaDeviceProp { - #[doc = "< ASCII string identifying device"] pub name: [::libc::c_char; 256usize], - #[doc = "< 16-byte unique identifier"] pub uuid: cudaUUID_t, - #[doc = "< 8-byte locally unique identifier. Value is undefined on TCC and non-Windows platforms"] pub luid: [::libc::c_char; 8usize], - #[doc = "< LUID device node mask. Value is undefined on TCC and non-Windows platforms"] pub luidDeviceNodeMask: ::libc::c_uint, - #[doc = "< Global memory available on device in bytes"] pub totalGlobalMem: usize, - #[doc = "< Shared memory available per block in bytes"] pub sharedMemPerBlock: usize, - #[doc = "< 32-bit registers available per block"] pub regsPerBlock: ::libc::c_int, - #[doc = "< Warp size in threads"] pub warpSize: ::libc::c_int, - #[doc = "< Maximum pitch in bytes allowed by memory copies"] pub memPitch: usize, - #[doc = "< Maximum number of threads per block"] pub maxThreadsPerBlock: ::libc::c_int, - #[doc = "< Maximum size of each dimension of a block"] pub maxThreadsDim: [::libc::c_int; 3usize], - #[doc = "< Maximum size of each dimension of a grid"] pub maxGridSize: [::libc::c_int; 3usize], - #[doc = "< Clock frequency in kilohertz"] pub clockRate: ::libc::c_int, - #[doc = "< Constant memory available on device in bytes"] pub totalConstMem: usize, - #[doc = "< Major compute capability"] pub major: ::libc::c_int, - #[doc = "< Minor compute capability"] pub minor: ::libc::c_int, - #[doc = "< Alignment requirement for textures"] pub textureAlignment: usize, - #[doc = "< Pitch alignment requirement for texture references bound to pitched memory"] pub texturePitchAlignment: usize, - #[doc = "< Device can concurrently copy memory and execute a kernel. Deprecated. Use instead asyncEngineCount."] pub deviceOverlap: ::libc::c_int, - #[doc = "< Number of multiprocessors on device"] pub multiProcessorCount: ::libc::c_int, - #[doc = "< Specified whether there is a run time limit on kernels"] pub kernelExecTimeoutEnabled: ::libc::c_int, - #[doc = "< Device is integrated as opposed to discrete"] pub integrated: ::libc::c_int, - #[doc = "< Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer"] pub canMapHostMemory: ::libc::c_int, - #[doc = "< Compute mode (See ::cudaComputeMode)"] pub computeMode: ::libc::c_int, - #[doc = "< Maximum 1D texture size"] pub maxTexture1D: ::libc::c_int, - #[doc = "< Maximum 1D mipmapped texture size"] pub maxTexture1DMipmap: ::libc::c_int, - #[doc = "< Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead."] pub maxTexture1DLinear: ::libc::c_int, - #[doc = "< Maximum 2D texture dimensions"] pub maxTexture2D: [::libc::c_int; 2usize], - #[doc = "< Maximum 2D mipmapped texture dimensions"] pub maxTexture2DMipmap: [::libc::c_int; 2usize], - #[doc = "< Maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory"] pub maxTexture2DLinear: [::libc::c_int; 3usize], - #[doc = "< Maximum 2D texture dimensions if texture gather operations have to be performed"] pub maxTexture2DGather: [::libc::c_int; 2usize], - #[doc = "< Maximum 3D texture dimensions"] pub maxTexture3D: [::libc::c_int; 3usize], - #[doc = "< Maximum alternate 3D texture dimensions"] pub maxTexture3DAlt: [::libc::c_int; 3usize], - #[doc = "< Maximum Cubemap texture dimensions"] pub maxTextureCubemap: ::libc::c_int, - #[doc = "< Maximum 1D layered texture dimensions"] pub maxTexture1DLayered: [::libc::c_int; 2usize], - #[doc = "< Maximum 2D layered texture dimensions"] pub maxTexture2DLayered: [::libc::c_int; 3usize], - #[doc = "< Maximum Cubemap layered texture dimensions"] pub maxTextureCubemapLayered: [::libc::c_int; 2usize], - #[doc = "< Maximum 1D surface size"] pub maxSurface1D: ::libc::c_int, - #[doc = "< Maximum 2D surface dimensions"] pub maxSurface2D: [::libc::c_int; 2usize], - #[doc = "< Maximum 3D surface dimensions"] pub maxSurface3D: [::libc::c_int; 3usize], - #[doc = "< Maximum 1D layered surface dimensions"] pub maxSurface1DLayered: [::libc::c_int; 2usize], - #[doc = "< Maximum 2D layered surface dimensions"] pub maxSurface2DLayered: [::libc::c_int; 3usize], - #[doc = "< Maximum Cubemap surface dimensions"] pub maxSurfaceCubemap: ::libc::c_int, - #[doc = "< Maximum Cubemap layered surface dimensions"] pub maxSurfaceCubemapLayered: [::libc::c_int; 2usize], - #[doc = "< Alignment requirements for surfaces"] pub surfaceAlignment: usize, - #[doc = "< Device can possibly execute multiple kernels concurrently"] pub concurrentKernels: ::libc::c_int, - #[doc = "< Device has ECC support enabled"] pub ECCEnabled: ::libc::c_int, - #[doc = "< PCI bus ID of the device"] pub pciBusID: ::libc::c_int, - #[doc = "< PCI device ID of the device"] pub pciDeviceID: ::libc::c_int, - #[doc = "< PCI domain ID of the device"] pub pciDomainID: ::libc::c_int, - #[doc = "< 1 if device is a Tesla device using TCC driver, 0 otherwise"] pub tccDriver: ::libc::c_int, - #[doc = "< Number of asynchronous engines"] pub asyncEngineCount: ::libc::c_int, - #[doc = "< Device shares a unified address space with the host"] pub unifiedAddressing: ::libc::c_int, - #[doc = "< Peak memory clock frequency in kilohertz"] pub memoryClockRate: ::libc::c_int, - #[doc = "< Global memory bus width in bits"] pub memoryBusWidth: ::libc::c_int, - #[doc = "< Size of L2 cache in bytes"] pub l2CacheSize: ::libc::c_int, - #[doc = "< Device's maximum l2 persisting lines capacity setting in bytes"] pub persistingL2CacheMaxSize: ::libc::c_int, - #[doc = "< Maximum resident threads per multiprocessor"] pub maxThreadsPerMultiProcessor: ::libc::c_int, - #[doc = "< Device supports stream priorities"] pub streamPrioritiesSupported: ::libc::c_int, - #[doc = "< Device supports caching globals in L1"] pub globalL1CacheSupported: ::libc::c_int, - #[doc = "< Device supports caching locals in L1"] pub localL1CacheSupported: ::libc::c_int, - #[doc = "< Shared memory available per multiprocessor in bytes"] pub sharedMemPerMultiprocessor: usize, - #[doc = "< 32-bit registers available per multiprocessor"] pub regsPerMultiprocessor: ::libc::c_int, - #[doc = "< Device supports allocating managed memory on this system"] pub managedMemory: ::libc::c_int, - #[doc = "< Device is on a multi-GPU board"] pub isMultiGpuBoard: ::libc::c_int, - #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"] pub multiGpuBoardGroupID: ::libc::c_int, - #[doc = "< Link between the device and the host supports native atomic operations"] pub hostNativeAtomicSupported: ::libc::c_int, - #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"] pub singleToDoublePrecisionPerfRatio: ::libc::c_int, - #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"] pub pageableMemoryAccess: ::libc::c_int, - #[doc = "< Device can coherently access managed memory concurrently with the CPU"] pub concurrentManagedAccess: ::libc::c_int, - #[doc = "< Device supports Compute Preemption"] pub computePreemptionSupported: ::libc::c_int, - #[doc = "< Device can access host registered memory at the same virtual address as the CPU"] pub canUseHostPointerForRegisteredMem: ::libc::c_int, - #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"] pub cooperativeLaunch: ::libc::c_int, - #[doc = "< Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated."] pub cooperativeMultiDeviceLaunch: ::libc::c_int, - #[doc = "< Per device maximum shared memory per block usable by special opt in"] pub sharedMemPerBlockOptin: usize, - #[doc = "< Device accesses pageable memory via the host's page tables"] pub pageableMemoryAccessUsesHostPageTables: ::libc::c_int, - #[doc = "< Host can directly access managed memory on the device without migration."] pub directManagedMemAccessFromHost: ::libc::c_int, - #[doc = "< Maximum number of resident blocks per multiprocessor"] pub maxBlocksPerMultiProcessor: ::libc::c_int, - #[doc = "< The maximum value of ::cudaAccessPolicyWindow::num_bytes."] pub accessPolicyMaxWindowSize: ::libc::c_int, - #[doc = "< Shared memory reserved by CUDA driver per block in bytes"] pub reservedSharedMemPerBlock: usize, } #[test] @@ -3599,1596 +3385,2709 @@ fn bindgen_test_layout_cudaDeviceProp() { 8usize, concat!("Alignment of ", stringify!(cudaDeviceProp)) ); + fn test_field_name() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(name) + ) + ); + } + test_field_name(); + fn test_field_uuid() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize + }, + 256usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(uuid) + ) + ); + } + test_field_uuid(); + fn test_field_luid() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).luid) as usize - ptr as usize + }, + 272usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luid) + ) + ); + } + test_field_luid(); + fn test_field_luidDeviceNodeMask() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).luidDeviceNodeMask) as usize - ptr as usize + }, + 280usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luidDeviceNodeMask) + ) + ); + } + test_field_luidDeviceNodeMask(); + fn test_field_totalGlobalMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).totalGlobalMem) as usize - ptr as usize + }, + 288usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalGlobalMem) + ) + ); + } + test_field_totalGlobalMem(); + fn test_field_sharedMemPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemPerBlock) as usize - ptr as usize + }, + 296usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlock) + ) + ); + } + test_field_sharedMemPerBlock(); + fn test_field_regsPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).regsPerBlock) as usize - ptr as usize + }, + 304usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerBlock) + ) + ); + } + test_field_regsPerBlock(); + fn test_field_warpSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).warpSize) as usize - ptr as usize + }, + 308usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(warpSize) + ) + ); + } + test_field_warpSize(); + fn test_field_memPitch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memPitch) as usize - ptr as usize + }, + 312usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memPitch) + ) + ); + } + test_field_memPitch(); + fn test_field_maxThreadsPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize + }, + 320usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + } + test_field_maxThreadsPerBlock(); + fn test_field_maxThreadsDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsDim) as usize - ptr as usize + }, + 324usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsDim) + ) + ); + } + test_field_maxThreadsDim(); + fn test_field_maxGridSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxGridSize) as usize - ptr as usize + }, + 336usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxGridSize) + ) + ); + } + test_field_maxGridSize(); + fn test_field_clockRate() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).clockRate) as usize - ptr as usize + }, + 348usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(clockRate) + ) + ); + } + test_field_clockRate(); + fn test_field_totalConstMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).totalConstMem) as usize - ptr as usize + }, + 352usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalConstMem) + ) + ); + } + test_field_totalConstMem(); + fn test_field_major() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize + }, + 360usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(major) + ) + ); + } + test_field_major(); + fn test_field_minor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize + }, + 364usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(minor) + ) + ); + } + test_field_minor(); + fn test_field_textureAlignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).textureAlignment) as usize - ptr as usize + }, + 368usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(textureAlignment) + ) + ); + } + test_field_textureAlignment(); + fn test_field_texturePitchAlignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).texturePitchAlignment) as usize - ptr as usize + }, + 376usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(texturePitchAlignment) + ) + ); + } + test_field_texturePitchAlignment(); + fn test_field_deviceOverlap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).deviceOverlap) as usize - ptr as usize + }, + 384usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(deviceOverlap) + ) + ); + } + test_field_deviceOverlap(); + fn test_field_multiProcessorCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).multiProcessorCount) as usize - ptr as usize + }, + 388usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiProcessorCount) + ) + ); + } + test_field_multiProcessorCount(); + fn test_field_kernelExecTimeoutEnabled() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).kernelExecTimeoutEnabled) as usize - ptr as usize + }, + 392usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(kernelExecTimeoutEnabled) + ) + ); + } + test_field_kernelExecTimeoutEnabled(); + fn test_field_integrated() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).integrated) as usize - ptr as usize + }, + 396usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(integrated) + ) + ); + } + test_field_integrated(); + fn test_field_canMapHostMemory() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).canMapHostMemory) as usize - ptr as usize + }, + 400usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canMapHostMemory) + ) + ); + } + test_field_canMapHostMemory(); + fn test_field_computeMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).computeMode) as usize - ptr as usize + }, + 404usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computeMode) + ) + ); + } + test_field_computeMode(); + fn test_field_maxTexture1D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1D) as usize - ptr as usize + }, + 408usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1D) + ) + ); + } + test_field_maxTexture1D(); + fn test_field_maxTexture1DMipmap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1DMipmap) as usize - ptr as usize + }, + 412usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DMipmap) + ) + ); + } + test_field_maxTexture1DMipmap(); + fn test_field_maxTexture1DLinear() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1DLinear) as usize - ptr as usize + }, + 416usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLinear) + ) + ); + } + test_field_maxTexture1DLinear(); + fn test_field_maxTexture2D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2D) as usize - ptr as usize + }, + 420usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2D) + ) + ); + } + test_field_maxTexture2D(); + fn test_field_maxTexture2DMipmap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DMipmap) as usize - ptr as usize + }, + 428usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DMipmap) + ) + ); + } + test_field_maxTexture2DMipmap(); + fn test_field_maxTexture2DLinear() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DLinear) as usize - ptr as usize + }, + 436usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLinear) + ) + ); + } + test_field_maxTexture2DLinear(); + fn test_field_maxTexture2DGather() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DGather) as usize - ptr as usize + }, + 448usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DGather) + ) + ); + } + test_field_maxTexture2DGather(); + fn test_field_maxTexture3D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture3D) as usize - ptr as usize + }, + 456usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3D) + ) + ); + } + test_field_maxTexture3D(); + fn test_field_maxTexture3DAlt() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture3DAlt) as usize - ptr as usize + }, + 468usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3DAlt) + ) + ); + } + test_field_maxTexture3DAlt(); + fn test_field_maxTextureCubemap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTextureCubemap) as usize - ptr as usize + }, + 480usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemap) + ) + ); + } + test_field_maxTextureCubemap(); + fn test_field_maxTexture1DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1DLayered) as usize - ptr as usize + }, + 484usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLayered) + ) + ); + } + test_field_maxTexture1DLayered(); + fn test_field_maxTexture2DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DLayered) as usize - ptr as usize + }, + 492usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLayered) + ) + ); + } + test_field_maxTexture2DLayered(); + fn test_field_maxTextureCubemapLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTextureCubemapLayered) as usize - ptr as usize + }, + 504usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemapLayered) + ) + ); + } + test_field_maxTextureCubemapLayered(); + fn test_field_maxSurface1D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface1D) as usize - ptr as usize + }, + 512usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1D) + ) + ); + } + test_field_maxSurface1D(); + fn test_field_maxSurface2D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface2D) as usize - ptr as usize + }, + 516usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2D) + ) + ); + } + test_field_maxSurface2D(); + fn test_field_maxSurface3D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface3D) as usize - ptr as usize + }, + 524usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface3D) + ) + ); + } + test_field_maxSurface3D(); + fn test_field_maxSurface1DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface1DLayered) as usize - ptr as usize + }, + 536usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1DLayered) + ) + ); + } + test_field_maxSurface1DLayered(); + fn test_field_maxSurface2DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface2DLayered) as usize - ptr as usize + }, + 544usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2DLayered) + ) + ); + } + test_field_maxSurface2DLayered(); + fn test_field_maxSurfaceCubemap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurfaceCubemap) as usize - ptr as usize + }, + 556usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemap) + ) + ); + } + test_field_maxSurfaceCubemap(); + fn test_field_maxSurfaceCubemapLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurfaceCubemapLayered) as usize - ptr as usize + }, + 560usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemapLayered) + ) + ); + } + test_field_maxSurfaceCubemapLayered(); + fn test_field_surfaceAlignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).surfaceAlignment) as usize - ptr as usize + }, + 568usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(surfaceAlignment) + ) + ); + } + test_field_surfaceAlignment(); + fn test_field_concurrentKernels() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).concurrentKernels) as usize - ptr as usize + }, + 576usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentKernels) + ) + ); + } + test_field_concurrentKernels(); + fn test_field_ECCEnabled() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ECCEnabled) as usize - ptr as usize + }, + 580usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(ECCEnabled) + ) + ); + } + test_field_ECCEnabled(); + fn test_field_pciBusID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pciBusID) as usize - ptr as usize + }, + 584usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciBusID) + ) + ); + } + test_field_pciBusID(); + fn test_field_pciDeviceID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pciDeviceID) as usize - ptr as usize + }, + 588usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDeviceID) + ) + ); + } + test_field_pciDeviceID(); + fn test_field_pciDomainID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pciDomainID) as usize - ptr as usize + }, + 592usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDomainID) + ) + ); + } + test_field_pciDomainID(); + fn test_field_tccDriver() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).tccDriver) as usize - ptr as usize + }, + 596usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(tccDriver) + ) + ); + } + test_field_tccDriver(); + fn test_field_asyncEngineCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).asyncEngineCount) as usize - ptr as usize + }, + 600usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(asyncEngineCount) + ) + ); + } + test_field_asyncEngineCount(); + fn test_field_unifiedAddressing() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).unifiedAddressing) as usize - ptr as usize + }, + 604usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(unifiedAddressing) + ) + ); + } + test_field_unifiedAddressing(); + fn test_field_memoryClockRate() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memoryClockRate) as usize - ptr as usize + }, + 608usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryClockRate) + ) + ); + } + test_field_memoryClockRate(); + fn test_field_memoryBusWidth() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memoryBusWidth) as usize - ptr as usize + }, + 612usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryBusWidth) + ) + ); + } + test_field_memoryBusWidth(); + fn test_field_l2CacheSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).l2CacheSize) as usize - ptr as usize + }, + 616usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(l2CacheSize) + ) + ); + } + test_field_l2CacheSize(); + fn test_field_persistingL2CacheMaxSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).persistingL2CacheMaxSize) as usize - ptr as usize + }, + 620usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(persistingL2CacheMaxSize) + ) + ); + } + test_field_persistingL2CacheMaxSize(); + fn test_field_maxThreadsPerMultiProcessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsPerMultiProcessor) as usize - ptr as usize + }, + 624usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerMultiProcessor) + ) + ); + } + test_field_maxThreadsPerMultiProcessor(); + fn test_field_streamPrioritiesSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).streamPrioritiesSupported) as usize - ptr as usize + }, + 628usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(streamPrioritiesSupported) + ) + ); + } + test_field_streamPrioritiesSupported(); + fn test_field_globalL1CacheSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).globalL1CacheSupported) as usize - ptr as usize + }, + 632usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(globalL1CacheSupported) + ) + ); + } + test_field_globalL1CacheSupported(); + fn test_field_localL1CacheSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).localL1CacheSupported) as usize - ptr as usize + }, + 636usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(localL1CacheSupported) + ) + ); + } + test_field_localL1CacheSupported(); + fn test_field_sharedMemPerMultiprocessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemPerMultiprocessor) as usize - ptr as usize + }, + 640usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerMultiprocessor) + ) + ); + } + test_field_sharedMemPerMultiprocessor(); + fn test_field_regsPerMultiprocessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).regsPerMultiprocessor) as usize - ptr as usize + }, + 648usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerMultiprocessor) + ) + ); + } + test_field_regsPerMultiprocessor(); + fn test_field_managedMemory() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).managedMemory) as usize - ptr as usize + }, + 652usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(managedMemory) + ) + ); + } + test_field_managedMemory(); + fn test_field_isMultiGpuBoard() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).isMultiGpuBoard) as usize - ptr as usize + }, + 656usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(isMultiGpuBoard) + ) + ); + } + test_field_isMultiGpuBoard(); + fn test_field_multiGpuBoardGroupID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).multiGpuBoardGroupID) as usize - ptr as usize + }, + 660usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiGpuBoardGroupID) + ) + ); + } + test_field_multiGpuBoardGroupID(); + fn test_field_hostNativeAtomicSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hostNativeAtomicSupported) as usize - ptr as usize + }, + 664usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostNativeAtomicSupported) + ) + ); + } + test_field_hostNativeAtomicSupported(); + fn test_field_singleToDoublePrecisionPerfRatio() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).singleToDoublePrecisionPerfRatio) as usize + - ptr as usize + }, + 668usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(singleToDoublePrecisionPerfRatio) + ) + ); + } + test_field_singleToDoublePrecisionPerfRatio(); + fn test_field_pageableMemoryAccess() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pageableMemoryAccess) as usize - ptr as usize + }, + 672usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccess) + ) + ); + } + test_field_pageableMemoryAccess(); + fn test_field_concurrentManagedAccess() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).concurrentManagedAccess) as usize - ptr as usize + }, + 676usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentManagedAccess) + ) + ); + } + test_field_concurrentManagedAccess(); + fn test_field_computePreemptionSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).computePreemptionSupported) as usize - ptr as usize + }, + 680usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computePreemptionSupported) + ) + ); + } + test_field_computePreemptionSupported(); + fn test_field_canUseHostPointerForRegisteredMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).canUseHostPointerForRegisteredMem) as usize + - ptr as usize + }, + 684usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canUseHostPointerForRegisteredMem) + ) + ); + } + test_field_canUseHostPointerForRegisteredMem(); + fn test_field_cooperativeLaunch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cooperativeLaunch) as usize - ptr as usize + }, + 688usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeLaunch) + ) + ); + } + test_field_cooperativeLaunch(); + fn test_field_cooperativeMultiDeviceLaunch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceLaunch) as usize - ptr as usize + }, + 692usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeMultiDeviceLaunch) + ) + ); + } + test_field_cooperativeMultiDeviceLaunch(); + fn test_field_sharedMemPerBlockOptin() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemPerBlockOptin) as usize - ptr as usize + }, + 696usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlockOptin) + ) + ); + } + test_field_sharedMemPerBlockOptin(); + fn test_field_pageableMemoryAccessUsesHostPageTables() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pageableMemoryAccessUsesHostPageTables) as usize + - ptr as usize + }, + 704usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccessUsesHostPageTables) + ) + ); + } + test_field_pageableMemoryAccessUsesHostPageTables(); + fn test_field_directManagedMemAccessFromHost() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).directManagedMemAccessFromHost) as usize - ptr as usize + }, + 708usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(directManagedMemAccessFromHost) + ) + ); + } + test_field_directManagedMemAccessFromHost(); + fn test_field_maxBlocksPerMultiProcessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxBlocksPerMultiProcessor) as usize - ptr as usize + }, + 712usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxBlocksPerMultiProcessor) + ) + ); + } + test_field_maxBlocksPerMultiProcessor(); + fn test_field_accessPolicyMaxWindowSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessPolicyMaxWindowSize) as usize - ptr as usize + }, + 716usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(accessPolicyMaxWindowSize) + ) + ); + } + test_field_accessPolicyMaxWindowSize(); + fn test_field_reservedSharedMemPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reservedSharedMemPerBlock) as usize - ptr as usize + }, + 720usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reservedSharedMemPerBlock) + ) + ); + } + test_field_reservedSharedMemPerBlock(); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaIpcEventHandle_st { + pub reserved: [::libc::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_cudaIpcEventHandle_st() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uuid as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).luid as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luid) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luidDeviceNodeMask as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luidDeviceNodeMask) - ) + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcEventHandle_st)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).totalGlobalMem as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalGlobalMem) - ) + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)) ); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcEventHandle_st), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaIpcMemHandle_st { + pub reserved: [::libc::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_cudaIpcMemHandle_st() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerBlock as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlock) - ) + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcMemHandle_st)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).regsPerBlock as *const _ as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerBlock) - ) + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)) ); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcMemHandle_st), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaExternalMemoryHandleType { + cudaExternalMemoryHandleTypeOpaqueFd = 1, + cudaExternalMemoryHandleTypeOpaqueWin32 = 2, + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, + cudaExternalMemoryHandleTypeD3D12Heap = 4, + cudaExternalMemoryHandleTypeD3D12Resource = 5, + cudaExternalMemoryHandleTypeD3D11Resource = 6, + cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, + cudaExternalMemoryHandleTypeNvSciBuf = 8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalMemoryHandleDesc { + pub type_: cudaExternalMemoryHandleType, + pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { + pub fd: ::libc::c_int, + pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciBufObject: *const ::libc::c_void, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::libc::c_void, + pub name: *const ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).warpSize as *const _ as usize }, - 308usize, + ::std::mem::size_of::(), + 16usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(warpSize) + "Size of: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).memPitch as *const _ as usize }, - 312usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memPitch) + "Alignment of ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_name() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); + } + test_field_name(); +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize - }, - 320usize, + ::std::mem::size_of::(), + 16usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerBlock) + "Size of: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxThreadsDim as *const _ as usize }, - 324usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsDim) + "Alignment of ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) ) ); + fn test_field_fd() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + } + test_field_fd(); + fn test_field_win32() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + } + test_field_win32(); + fn test_field_nvSciBufObject() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciBufObject) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciBufObject) + ) + ); + } + test_field_nvSciBufObject(); +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxGridSize as *const _ as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxGridSize) - ) + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).clockRate as *const _ as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(clockRate) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)) ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(size) + ) + ); + } + test_field_size(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryBufferDesc { + pub offset: ::libc::c_ulonglong, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).totalConstMem as *const _ as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalConstMem) - ) + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(major) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)) ); + fn test_field_offset() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(offset) + ) + ); + } + test_field_offset(); + fn test_field_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(size) + ) + ); + } + test_field_size(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryMipmappedArrayDesc { + pub offset: ::libc::c_ulonglong, + pub formatDesc: cudaChannelFormatDesc, + pub extent: cudaExtent, + pub flags: ::libc::c_uint, + pub numLevels: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, - 364usize, + ::std::mem::size_of::(), + 64usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(minor) + "Size of: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).textureAlignment as *const _ as usize }, - 368usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(textureAlignment) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).texturePitchAlignment as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(texturePitchAlignment) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).deviceOverlap as *const _ as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(deviceOverlap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).multiProcessorCount as *const _ as usize - }, - 388usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiProcessorCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelExecTimeoutEnabled as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(kernelExecTimeoutEnabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).integrated as *const _ as usize }, - 396usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(integrated) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).canMapHostMemory as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canMapHostMemory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).computeMode as *const _ as usize }, - 404usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computeMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture1D as *const _ as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DMipmap as *const _ as usize - }, - 412usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DMipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DLinear as *const _ as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLinear) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture2D as *const _ as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DMipmap as *const _ as usize - }, - 428usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DMipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DLinear as *const _ as usize - }, - 436usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLinear) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DGather as *const _ as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DGather) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture3D as *const _ as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture3DAlt as *const _ as usize }, - 468usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3DAlt) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTextureCubemap as *const _ as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DLayered as *const _ as usize - }, - 484usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DLayered as *const _ as usize - }, - 492usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTextureCubemapLayered as *const _ as usize - }, - 504usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemapLayered) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface1D as *const _ as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface2D as *const _ as usize }, - 516usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface3D as *const _ as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface3D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurface1DLayered as *const _ as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurface2DLayered as *const _ as usize - }, - 544usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurfaceCubemap as *const _ as usize - }, - 556usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurfaceCubemapLayered as *const _ as usize - }, - 560usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemapLayered) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).surfaceAlignment as *const _ as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(surfaceAlignment) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).concurrentKernels as *const _ as usize - }, - 576usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentKernels) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ECCEnabled as *const _ as usize }, - 580usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(ECCEnabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciBusID as *const _ as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciBusID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciDeviceID as *const _ as usize }, - 588usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDeviceID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciDomainID as *const _ as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDomainID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tccDriver as *const _ as usize }, - 596usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(tccDriver) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).asyncEngineCount as *const _ as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(asyncEngineCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).unifiedAddressing as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(unifiedAddressing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memoryClockRate as *const _ as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryClockRate) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memoryBusWidth as *const _ as usize }, - 612usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryBusWidth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l2CacheSize as *const _ as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(l2CacheSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).persistingL2CacheMaxSize as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(persistingL2CacheMaxSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerMultiProcessor as *const _ - as usize - }, - 624usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerMultiProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).streamPrioritiesSupported as *const _ - as usize - }, - 628usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(streamPrioritiesSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).globalL1CacheSupported as *const _ as usize - }, - 632usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(globalL1CacheSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).localL1CacheSupported as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(localL1CacheSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerMultiprocessor as *const _ - as usize - }, - 640usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerMultiprocessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).regsPerMultiprocessor as *const _ as usize - }, - 648usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerMultiprocessor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).managedMemory as *const _ as usize }, - 652usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(managedMemory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isMultiGpuBoard as *const _ as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(isMultiGpuBoard) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).multiGpuBoardGroupID as *const _ as usize - }, - 660usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiGpuBoardGroupID) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hostNativeAtomicSupported as *const _ - as usize - }, - 664usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(hostNativeAtomicSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).singleToDoublePrecisionPerfRatio as *const _ - as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(singleToDoublePrecisionPerfRatio) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pageableMemoryAccess as *const _ as usize - }, - 672usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccess) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).concurrentManagedAccess as *const _ as usize - }, - 676usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentManagedAccess) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).computePreemptionSupported as *const _ - as usize - }, - 680usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computePreemptionSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).canUseHostPointerForRegisteredMem as *const _ - as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canUseHostPointerForRegisteredMem) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperativeLaunch as *const _ as usize - }, - 688usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeLaunch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperativeMultiDeviceLaunch as *const _ - as usize - }, - 692usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeMultiDeviceLaunch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerBlockOptin as *const _ as usize - }, - 696usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlockOptin) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pageableMemoryAccessUsesHostPageTables - as *const _ as usize - }, - 704usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccessUsesHostPageTables) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).directManagedMemAccessFromHost as *const _ - as usize - }, - 708usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(directManagedMemAccessFromHost) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxBlocksPerMultiProcessor as *const _ - as usize - }, - 712usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxBlocksPerMultiProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessPolicyMaxWindowSize as *const _ - as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(accessPolicyMaxWindowSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reservedSharedMemPerBlock as *const _ - as usize - }, - 720usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(reservedSharedMemPerBlock) + "Alignment of ", + stringify!(cudaExternalMemoryMipmappedArrayDesc) ) ); + fn test_field_offset() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(offset) + ) + ); + } + test_field_offset(); + fn test_field_formatDesc() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).formatDesc) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(formatDesc) + ) + ); + } + test_field_formatDesc(); + fn test_field_extent() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(extent) + ) + ); + } + test_field_extent(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_numLevels() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numLevels) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(numLevels) + ) + ); + } + test_field_numLevels(); } -#[doc = " CUDA IPC event handle"] -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcEventHandle_st { - pub reserved: [::libc::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcEventHandle_st() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcEventHandle_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcEventHandle_st), - "::", - stringify!(reserved) - ) - ); -} -#[doc = " CUDA IPC event handle"] -pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; -#[doc = " CUDA IPC memory handle"] -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcMemHandle_st { - pub reserved: [::libc::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcMemHandle_st() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcMemHandle_st)) - ); - assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcMemHandle_st), - "::", - stringify!(reserved) - ) - ); -} -#[doc = " CUDA IPC memory handle"] -pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; #[repr(u32)] #[non_exhaustive] -#[doc = " External memory handle types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalMemoryHandleType { - #[doc = " Handle is an opaque file descriptor"] - cudaExternalMemoryHandleTypeOpaqueFd = 1, - #[doc = " Handle is an opaque shared NT handle"] - cudaExternalMemoryHandleTypeOpaqueWin32 = 2, - #[doc = " Handle is an opaque, globally shared handle"] - cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, - #[doc = " Handle is a D3D12 heap object"] - cudaExternalMemoryHandleTypeD3D12Heap = 4, - #[doc = " Handle is a D3D12 committed resource"] - cudaExternalMemoryHandleTypeD3D12Resource = 5, - #[doc = " Handle is a shared NT handle to a D3D11 resource"] - cudaExternalMemoryHandleTypeD3D11Resource = 6, - #[doc = " Handle is a globally shared handle to a D3D11 resource"] - cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, - #[doc = " Handle is an NvSciBuf object"] - cudaExternalMemoryHandleTypeNvSciBuf = 8, +pub enum cudaExternalSemaphoreHandleType { + cudaExternalSemaphoreHandleTypeOpaqueFd = 1, + cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, + cudaExternalSemaphoreHandleTypeD3D12Fence = 4, + cudaExternalSemaphoreHandleTypeD3D11Fence = 5, + cudaExternalSemaphoreHandleTypeNvSciSync = 6, + cudaExternalSemaphoreHandleTypeKeyedMutex = 7, + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, } -#[doc = " External memory handle descriptor"] #[repr(C)] #[derive(Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc { - #[doc = " Type of the handle"] - pub type_: cudaExternalMemoryHandleType, - pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, - #[doc = " Size of the memory allocation"] - pub size: ::libc::c_ulonglong, - #[doc = " Flags must either be zero or ::cudaExternalMemoryDedicated"] +pub struct cudaExternalSemaphoreHandleDesc { + pub type_: cudaExternalSemaphoreHandleType, + pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, pub flags: ::libc::c_uint, } #[repr(C)] #[derive(Copy, Clone)] -pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { - #[doc = " File descriptor referencing the memory object. Valid"] - #[doc = " when type is"] - #[doc = " ::cudaExternalMemoryHandleTypeOpaqueFd"] +pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { pub fd: ::libc::c_int, - pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - #[doc = " A handle representing NvSciBuf Object. Valid when type"] - #[doc = " is ::cudaExternalMemoryHandleTypeNvSciBuf"] - pub nvSciBufObject: *const ::libc::c_void, + pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciSyncObj: *const ::libc::c_void, } -#[doc = " Win32 handle referencing the semaphore object. Valid when"] -#[doc = " type is one of the following:"] -#[doc = " - ::cudaExternalMemoryHandleTypeOpaqueWin32"] -#[doc = " - ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D12Heap"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D12Resource"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D11Resource"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D11ResourceKmt"] -#[doc = " Exactly one of 'handle' and 'name' must be non-NULL. If"] -#[doc = " type is one of the following:"] -#[doc = " ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt"] -#[doc = " ::cudaExternalMemoryHandleTypeD3D11ResourceKmt"] -#[doc = " then 'name' must be NULL."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"] +pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { pub handle: *mut ::libc::c_void, - #[doc = " Name of a valid memory object."] - #[doc = " Must be NULL if 'handle' is non-NULL."] pub name: *const ::libc::c_void, } #[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 16usize, concat!( "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .handle as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .name as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_name() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); + } + test_field_name(); } #[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 16usize, concat!( "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fd as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciBufObject - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciBufObject) + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) ) ); + fn test_field_fd() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + } + test_field_fd(); + fn test_field_win32() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + } + test_field_win32(); + fn test_field_nvSciSyncObj() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSyncObj) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciSyncObj) + ) + ); + } + test_field_nvSciSyncObj(); } #[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).type_ as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(type_) - ) + concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)) ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1 { + pub params: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ as usize - }, + ::std::mem::size_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(size) + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 32usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(flags) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); } -#[doc = " External memory buffer descriptor"] #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryBufferDesc { - #[doc = " Offset into the memory object where the buffer's base is"] - pub offset: ::libc::c_ulonglong, - #[doc = " Size of the buffer"] - pub size: ::libc::c_ulonglong, - #[doc = " Flags reserved for future use. Must be zero."] - pub flags: ::libc::c_uint, +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)) - ); +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::std::mem::align_of::(), + ::std::mem::size_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset as *const _ as usize - }, - 0usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(offset) + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(flags) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " External memory mipmap descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryMipmappedArrayDesc { - #[doc = " Offset into the memory object where the base level of the"] - #[doc = " mipmap chain is."] - pub offset: ::libc::c_ulonglong, - #[doc = " Format of base level of the mipmap chain"] - pub formatDesc: cudaChannelFormatDesc, - #[doc = " Dimensions of base level of the mipmap chain"] - pub extent: cudaExtent, - #[doc = " Flags associated with CUDA mipmapped arrays."] - #[doc = " See ::cudaMallocMipmappedArray"] - pub flags: ::libc::c_uint, - #[doc = " Total number of levels in the mipmap chain"] - pub numLevels: ::libc::c_uint, +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, concat!( "Size of: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) - ) - ); + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset as *const _ - as usize - }, - 0usize, + ::std::mem::size_of::(), + 24usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(offset) + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).formatDesc as *const _ - as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(formatDesc) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extent as *const _ - as usize - }, + ::std::mem::size_of::(), 32usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(extent) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(flags) + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numLevels as *const _ - as usize - }, - 60usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(numLevels) - ) - ); -} -#[repr(u32)] -#[non_exhaustive] -#[doc = " External semaphore handle types"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalSemaphoreHandleType { - #[doc = " Handle is an opaque file descriptor"] - cudaExternalSemaphoreHandleTypeOpaqueFd = 1, - #[doc = " Handle is an opaque shared NT handle"] - cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, - #[doc = " Handle is an opaque, globally shared handle"] - cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, - #[doc = " Handle is a shared NT handle referencing a D3D12 fence object"] - cudaExternalSemaphoreHandleTypeD3D12Fence = 4, - #[doc = " Handle is a shared NT handle referencing a D3D11 fence object"] - cudaExternalSemaphoreHandleTypeD3D11Fence = 5, - #[doc = " Opaque handle to NvSciSync Object"] - cudaExternalSemaphoreHandleTypeNvSciSync = 6, - #[doc = " Handle is a shared NT handle referencing a D3D11 keyed mutex object"] - cudaExternalSemaphoreHandleTypeKeyedMutex = 7, - #[doc = " Handle is a shared KMT handle referencing a D3D11 keyed mutex object"] - cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, - #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"] - cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, - #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"] - cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1) + ) + ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); } -#[doc = " External semaphore handle descriptor"] #[repr(C)] #[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc { - #[doc = " Type of the handle"] - pub type_: cudaExternalSemaphoreHandleType, - pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, - #[doc = " Flags reserved for the future. Must be zero."] +pub struct cudaExternalSemaphoreWaitParams_v1 { + pub params: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, pub flags: ::libc::c_uint, } #[repr(C)] #[derive(Copy, Clone)] -pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { - #[doc = " File descriptor referencing the semaphore object. Valid when"] - #[doc = " type is one of the following:"] - #[doc = " - ::cudaExternalSemaphoreHandleTypeOpaqueFd"] - #[doc = " - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd"] - pub fd: ::libc::c_int, - pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - #[doc = " Valid NvSciSyncObj. Must be non NULL"] - pub nvSciSyncObj: *const ::libc::c_void, +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, } -#[doc = " Win32 handle referencing the semaphore object. Valid when"] -#[doc = " type is one of the following:"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeOpaqueWin32"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeD3D12Fence"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeD3D11Fence"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeKeyedMutex"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32"] -#[doc = " Exactly one of 'handle' and 'name' must be non-NULL. If"] -#[doc = " type is one of the following:"] -#[doc = " ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt"] -#[doc = " ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt"] -#[doc = " then 'name' must be NULL."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"] - pub handle: *mut ::libc::c_void, - #[doc = " Name of a valid synchronization primitive."] - #[doc = " Must be NULL if 'handle' is non-NULL."] - pub name: *const ::libc::c_void, +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + ::std::mem::size_of::(), + 8usize, concat!( "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .handle as *const _ as usize - }, - 0usize, + ::std::mem::size_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .name as *const _ as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, + pub timeoutMs: ::libc::c_uint, } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 16usize, concat!( "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fd as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSyncObj - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciSyncObj) - ) - ); + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); + fn test_field_timeoutMs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs) + ) + ); + } + test_field_timeoutMs(); } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).type_ as *const _ as usize - }, - 0usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(type_) + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(handle) - ) + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams_v1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 24usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(flags) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1) + ) + ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); } -#[doc = " External semaphore signal parameters, compatible with driver type"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaExternalSemaphoreSignalParams { pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, - #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to"] - #[doc = " signal a ::cudaExternalSemaphore_t of type"] - #[doc = " ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is"] - #[doc = " ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates"] - #[doc = " that while signaling the ::cudaExternalSemaphore_t, no memory"] - #[doc = " synchronization operations should be performed for any external memory"] - #[doc = " object imported as ::cudaExternalMemoryHandleTypeNvSciBuf."] - #[doc = " For all other types of ::cudaExternalSemaphore_t, flags must be zero."] pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 16usize], } @@ -5200,11 +6099,9 @@ pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 { pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, pub reserved: [::libc::c_uint; 12usize], } -#[doc = " Parameters for fence objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Value of fence to be signaled"] pub value: ::libc::c_ulonglong, } #[test] @@ -5225,26 +6122,29 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); } #[repr(C)] #[derive(Copy, Clone)] pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { - #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType"] - #[doc = " is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."] pub fence: *mut ::libc::c_void, pub reserved: ::libc::c_ulonglong, } @@ -5266,36 +6166,45 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Parameters for keyed mutex objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { @@ -5319,20 +6228,25 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .key as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { @@ -5352,58 +6266,82 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSync - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keyedMutex - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { @@ -5420,58 +6358,62 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { stringify!(cudaExternalSemaphoreSignalParams) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(reserved) - ) - ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " External semaphore wait parameters, compatible with driver type"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaExternalSemaphoreWaitParams { pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, - #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to"] - #[doc = " signal a ::cudaExternalSemaphore_t of type"] - #[doc = " ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is"] - #[doc = " ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates"] - #[doc = " that while waiting for the ::cudaExternalSemaphore_t, no memory"] - #[doc = " synchronization operations should be performed for any external memory"] - #[doc = " object imported as ::cudaExternalMemoryHandleTypeNvSciBuf."] - #[doc = " For all other types of ::cudaExternalSemaphore_t, flags must be zero."] pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 16usize], } @@ -5483,11 +6425,9 @@ pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 { pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, pub reserved: [::libc::c_uint; 10usize], } -#[doc = " Parameters for fence objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Value of fence to be waited on"] pub value: ::libc::c_ulonglong, } #[test] @@ -5508,25 +6448,29 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); } #[repr(C)] #[derive(Copy, Clone)] pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { - #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType"] - #[doc = " is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."] pub fence: *mut ::libc::c_void, pub reserved: ::libc::c_ulonglong, } @@ -5548,40 +6492,49 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Parameters for keyed mutex objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { - #[doc = " Value of key to acquire the mutex with"] pub key: ::libc::c_ulonglong, - #[doc = " Timeout in milliseconds to wait to acquire the mutex"] pub timeoutMs: ::libc::c_uint, } #[test] @@ -5602,32 +6555,44 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .key as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .timeoutMs as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(timeoutMs) - ) - ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); + fn test_field_timeoutMs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs) + ) + ); + } + test_field_timeoutMs(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { @@ -5647,58 +6612,74 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSync - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keyedMutex - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { @@ -5712,230 +6693,256 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { 8usize, concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(reserved) - ) - ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " CUDA Error types"] pub use self::cudaError as cudaError_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUstream_st { _unused: [u8; 0], } -#[doc = " CUDA stream"] pub type cudaStream_t = *mut CUstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUevent_st { _unused: [u8; 0], } -#[doc = " CUDA event types"] pub type cudaEvent_t = *mut CUevent_st; -#[doc = " CUDA graphics resource types"] pub type cudaGraphicsResource_t = *mut cudaGraphicsResource; -#[doc = " CUDA output file modes"] pub use self::cudaOutputMode as cudaOutputMode_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUexternalMemory_st { _unused: [u8; 0], } -#[doc = " CUDA external memory"] pub type cudaExternalMemory_t = *mut CUexternalMemory_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUexternalSemaphore_st { _unused: [u8; 0], } -#[doc = " CUDA external semaphore"] pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUgraph_st { _unused: [u8; 0], } -#[doc = " CUDA graph"] pub type cudaGraph_t = *mut CUgraph_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUgraphNode_st { _unused: [u8; 0], } -#[doc = " CUDA graph node."] pub type cudaGraphNode_t = *mut CUgraphNode_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUuserObject_st { _unused: [u8; 0], } -#[doc = " CUDA user object for graphs"] pub type cudaUserObject_t = *mut CUuserObject_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUfunc_st { _unused: [u8; 0], } -#[doc = " CUDA function"] pub type cudaFunction_t = *mut CUfunc_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUmemPoolHandle_st { _unused: [u8; 0], } -#[doc = " CUDA memory pool"] pub type cudaMemPool_t = *mut CUmemPoolHandle_st; #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA cooperative group scope"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaCGScope { - #[doc = "< Invalid cooperative group scope"] cudaCGScopeInvalid = 0, - #[doc = "< Scope represented by a grid_group"] cudaCGScopeGrid = 1, - #[doc = "< Scope represented by a multi_grid_group"] cudaCGScopeMultiGrid = 2, } -#[doc = " CUDA launch parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaLaunchParams { - #[doc = "< Device function symbol"] pub func: *mut ::libc::c_void, - #[doc = "< Grid dimentions"] pub gridDim: dim3, - #[doc = "< Block dimentions"] - pub blockDim: dim3, - #[doc = "< Arguments"] - pub args: *mut *mut ::libc::c_void, - #[doc = "< Shared memory"] - pub sharedMem: usize, - #[doc = "< Stream identifier"] - pub stream: cudaStream_t, -} -#[test] -fn bindgen_test_layout_cudaLaunchParams() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaLaunchParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaLaunchParams)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(func) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(gridDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(blockDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).args as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(args) - ) - ); + pub blockDim: dim3, + pub args: *mut *mut ::libc::c_void, + pub sharedMem: usize, + pub stream: cudaStream_t, +} +#[test] +fn bindgen_test_layout_cudaLaunchParams() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).sharedMem as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(sharedMem) - ) + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaLaunchParams)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(stream) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchParams)) ); + fn test_field_func() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(func) + ) + ); + } + test_field_func(); + fn test_field_gridDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(gridDim) + ) + ); + } + test_field_gridDim(); + fn test_field_blockDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(blockDim) + ) + ); + } + test_field_blockDim(); + fn test_field_args() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(args) + ) + ); + } + test_field_args(); + fn test_field_sharedMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMem) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(sharedMem) + ) + ); + } + test_field_sharedMem(); + fn test_field_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(stream) + ) + ); + } + test_field_stream(); } -#[doc = " CUDA GPU kernel node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaKernelNodeParams { - #[doc = "< Kernel to launch"] pub func: *mut ::libc::c_void, - #[doc = "< Grid dimensions"] pub gridDim: dim3, - #[doc = "< Block dimensions"] pub blockDim: dim3, - #[doc = "< Dynamic shared-memory size per thread block in bytes"] pub sharedMemBytes: ::libc::c_uint, - #[doc = "< Array of pointers to individual kernel arguments"] pub kernelParams: *mut *mut ::libc::c_void, - #[doc = "< Pointer to kernel arguments in the \"extra\" format"] pub extra: *mut *mut ::libc::c_void, } #[test] @@ -5950,80 +6957,114 @@ fn bindgen_test_layout_cudaKernelNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaKernelNodeParams)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(func) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(gridDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(blockDim) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemBytes as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(sharedMemBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelParams as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(kernelParams) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extra as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(extra) - ) - ); + fn test_field_func() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(func) + ) + ); + } + test_field_func(); + fn test_field_gridDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(gridDim) + ) + ); + } + test_field_gridDim(); + fn test_field_blockDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(blockDim) + ) + ); + } + test_field_blockDim(); + fn test_field_sharedMemBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(sharedMemBytes) + ) + ); + } + test_field_sharedMemBytes(); + fn test_field_kernelParams() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(kernelParams) + ) + ); + } + test_field_kernelParams(); + fn test_field_extra() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(extra) + ) + ); + } + test_field_extra(); } -#[doc = " External semaphore signal node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreSignalNodeParams { - #[doc = "< Array of external semaphore handles."] pub extSemArray: *mut cudaExternalSemaphore_t, - #[doc = "< Array of external semaphore signal parameters."] pub paramsArray: *const cudaExternalSemaphoreSignalParams, - #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."] pub numExtSems: ::libc::c_uint, } #[test] @@ -6044,55 +7085,66 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParams() { stringify!(cudaExternalSemaphoreSignalNodeParams) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extSemArray - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(extSemArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).paramsArray - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(paramsArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numExtSems as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(numExtSems) - ) - ); + fn test_field_extSemArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(extSemArray) + ) + ); + } + test_field_extSemArray(); + fn test_field_paramsArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(paramsArray) + ) + ); + } + test_field_paramsArray(); + fn test_field_numExtSems() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(numExtSems) + ) + ); + } + test_field_numExtSems(); } -#[doc = " External semaphore wait node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreWaitNodeParams { - #[doc = "< Array of external semaphore handles."] pub extSemArray: *mut cudaExternalSemaphore_t, - #[doc = "< Array of external semaphore wait parameters."] pub paramsArray: *const cudaExternalSemaphoreWaitParams, - #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."] pub numExtSems: ::libc::c_uint, } #[test] @@ -6110,74 +7162,76 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParams() { stringify!(cudaExternalSemaphoreWaitNodeParams) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extSemArray as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(extSemArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).paramsArray as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(paramsArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numExtSems as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(numExtSems) - ) - ); + fn test_field_extSemArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(extSemArray) + ) + ); + } + test_field_extSemArray(); + fn test_field_paramsArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(paramsArray) + ) + ); + } + test_field_paramsArray(); + fn test_field_numExtSems() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(numExtSems) + ) + ); + } + test_field_numExtSems(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Graph node types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphNodeType { - #[doc = "< GPU kernel node"] cudaGraphNodeTypeKernel = 0, - #[doc = "< Memcpy node"] cudaGraphNodeTypeMemcpy = 1, - #[doc = "< Memset node"] cudaGraphNodeTypeMemset = 2, - #[doc = "< Host (executable) node"] cudaGraphNodeTypeHost = 3, - #[doc = "< Node which executes an embedded graph"] cudaGraphNodeTypeGraph = 4, - #[doc = "< Empty (no-op) node"] cudaGraphNodeTypeEmpty = 5, - #[doc = "< External event wait node"] cudaGraphNodeTypeWaitEvent = 6, - #[doc = "< External event record node"] cudaGraphNodeTypeEventRecord = 7, - #[doc = "< External semaphore signal node"] cudaGraphNodeTypeExtSemaphoreSignal = 8, - #[doc = "< External semaphore wait node"] cudaGraphNodeTypeExtSemaphoreWait = 9, - #[doc = "< Memory allocation node"] cudaGraphNodeTypeMemAlloc = 10, - #[doc = "< Memory free node"] cudaGraphNodeTypeMemFree = 11, cudaGraphNodeTypeCount = 12, } @@ -6186,75 +7240,189 @@ pub enum cudaGraphNodeType { pub struct CUgraphExec_st { _unused: [u8; 0], } -#[doc = " CUDA executable (launchable) graph"] pub type cudaGraphExec_t = *mut CUgraphExec_st; #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Graph Update error types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphExecUpdateResult { - #[doc = "< The update succeeded"] cudaGraphExecUpdateSuccess = 0, - #[doc = "< The update failed for an unexpected reason which is described in the return value of the function"] cudaGraphExecUpdateError = 1, - #[doc = "< The update failed because the topology changed"] cudaGraphExecUpdateErrorTopologyChanged = 2, - #[doc = "< The update failed because a node type changed"] cudaGraphExecUpdateErrorNodeTypeChanged = 3, - #[doc = "< The update failed because the function of a kernel node changed (CUDA driver < 11.2)"] cudaGraphExecUpdateErrorFunctionChanged = 4, - #[doc = "< The update failed because the parameters changed in a way that is not supported"] cudaGraphExecUpdateErrorParametersChanged = 5, - #[doc = "< The update failed because something about the node is not supported"] cudaGraphExecUpdateErrorNotSupported = 6, - #[doc = "< The update failed because the function of a kernel node changed in an unsupported way"] cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7, + cudaGraphExecUpdateErrorAttributesChanged = 8, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags to specify search options to be used with ::cudaGetDriverEntryPoint"] -#[doc = " For more details see ::cuGetProcAddress"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGetDriverEntryPointFlags { - #[doc = "< Default search mode for driver symbols."] cudaEnableDefault = 0, - #[doc = "< Search for legacy versions of driver symbols."] cudaEnableLegacyStream = 1, - #[doc = "< Search for per-thread versions of driver symbols."] cudaEnablePerThreadDefaultStream = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Graph debug write options"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphDebugDotFlags { cudaGraphDebugDotFlagsVerbose = 1, - #[doc = " Output all debug data as if every debug flag is enabled"] cudaGraphDebugDotFlagsKernelNodeParams = 4, - #[doc = " Adds cudaKernelNodeParams to output"] cudaGraphDebugDotFlagsMemcpyNodeParams = 8, - #[doc = " Adds cudaMemcpy3DParms to output"] cudaGraphDebugDotFlagsMemsetNodeParams = 16, - #[doc = " Adds cudaMemsetParams to output"] cudaGraphDebugDotFlagsHostNodeParams = 32, - #[doc = " Adds cudaHostNodeParams to output"] cudaGraphDebugDotFlagsEventNodeParams = 64, - #[doc = " Adds cudaEvent_t handle from record and wait nodes to output"] cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128, - #[doc = " Adds cudaExternalSemaphoreSignalNodeParams values to output"] cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256, - #[doc = " Adds cudaExternalSemaphoreWaitNodeParams to output"] cudaGraphDebugDotFlagsKernelNodeAttributes = 512, - #[doc = " Adds cudaKernelNodeAttrID values to output"] cudaGraphDebugDotFlagsHandles = 1024, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for instantiating a graph"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphInstantiateFlags { - #[doc = "< Automatically free memory allocated in a graph before relaunching."] cudaGraphInstantiateFlagAutoFreeOnLaunch = 1, + cudaGraphInstantiateFlagUseNodePriority = 8, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaStreamAttrID { + cudaStreamAttributeAccessPolicyWindow = 1, + cudaStreamAttributeSynchronizationPolicy = 3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaStreamAttrValue { + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub syncPolicy: cudaSynchronizationPolicy, +} +#[test] +fn bindgen_test_layout_cudaStreamAttrValue() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaStreamAttrValue)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaStreamAttrValue)) + ); + fn test_field_accessPolicyWindow() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaStreamAttrValue), + "::", + stringify!(accessPolicyWindow) + ) + ); + } + test_field_accessPolicyWindow(); + fn test_field_syncPolicy() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).syncPolicy) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaStreamAttrValue), + "::", + stringify!(syncPolicy) + ) + ); + } + test_field_syncPolicy(); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaKernelNodeAttrID { + cudaKernelNodeAttributeAccessPolicyWindow = 1, + cudaKernelNodeAttributeCooperative = 2, + cudaKernelNodeAttributePriority = 8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaKernelNodeAttrValue { + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub cooperative: ::libc::c_int, + pub priority: ::libc::c_int, +} +#[test] +fn bindgen_test_layout_cudaKernelNodeAttrValue() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaKernelNodeAttrValue)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaKernelNodeAttrValue)) + ); + fn test_field_accessPolicyWindow() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(accessPolicyWindow) + ) + ); + } + test_field_accessPolicyWindow(); + fn test_field_cooperative() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cooperative) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(cooperative) + ) + ); + } + test_field_cooperative(); + fn test_field_priority() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(priority) + ) + ); + } + test_field_priority(); } pub type cuFloatComplex = float2; pub type cuDoubleComplex = double2; @@ -6527,6 +7695,12 @@ extern "C" { smCountTarget: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasGetStatusName(status: cublasStatus_t) -> *const ::libc::c_char; +} +extern "C" { + pub fn cublasGetStatusString(status: cublasStatus_t) -> *const ::libc::c_char; +} pub type cublasLogCallback = ::std::option::Option; extern "C" { @@ -8350,6 +9524,154 @@ extern "C" { AP: *mut cuDoubleComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgemvBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const f32, + Aarray: *const *const f32, + lda: ::libc::c_int, + xarray: *const *const f32, + incx: ::libc::c_int, + beta: *const f32, + yarray: *const *mut f32, + incy: ::libc::c_int, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDgemvBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const f64, + Aarray: *const *const f64, + lda: ::libc::c_int, + xarray: *const *const f64, + incx: ::libc::c_int, + beta: *const f64, + yarray: *const *mut f64, + incy: ::libc::c_int, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgemvBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const cuComplex, + Aarray: *const *const cuComplex, + lda: ::libc::c_int, + xarray: *const *const cuComplex, + incx: ::libc::c_int, + beta: *const cuComplex, + yarray: *const *mut cuComplex, + incy: ::libc::c_int, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgemvBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const cuDoubleComplex, + Aarray: *const *const cuDoubleComplex, + lda: ::libc::c_int, + xarray: *const *const cuDoubleComplex, + incx: ::libc::c_int, + beta: *const cuDoubleComplex, + yarray: *const *mut cuDoubleComplex, + incy: ::libc::c_int, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasSgemvStridedBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const f32, + A: *const f32, + lda: ::libc::c_int, + strideA: ::libc::c_longlong, + x: *const f32, + incx: ::libc::c_int, + stridex: ::libc::c_longlong, + beta: *const f32, + y: *mut f32, + incy: ::libc::c_int, + stridey: ::libc::c_longlong, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDgemvStridedBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const f64, + A: *const f64, + lda: ::libc::c_int, + strideA: ::libc::c_longlong, + x: *const f64, + incx: ::libc::c_int, + stridex: ::libc::c_longlong, + beta: *const f64, + y: *mut f64, + incy: ::libc::c_int, + stridey: ::libc::c_longlong, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgemvStridedBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const cuComplex, + A: *const cuComplex, + lda: ::libc::c_int, + strideA: ::libc::c_longlong, + x: *const cuComplex, + incx: ::libc::c_int, + stridex: ::libc::c_longlong, + beta: *const cuComplex, + y: *mut cuComplex, + incy: ::libc::c_int, + stridey: ::libc::c_longlong, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgemvStridedBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: ::libc::c_int, + strideA: ::libc::c_longlong, + x: *const cuDoubleComplex, + incx: ::libc::c_int, + stridex: ::libc::c_longlong, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: ::libc::c_int, + stridey: ::libc::c_longlong, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSgemm_v2( handle: cublasHandle_t, diff --git a/rcudnn/cudnn-sys/Cargo.toml b/rcudnn/cudnn-sys/Cargo.toml index 054bae953..197e9f44b 100644 --- a/rcudnn/cudnn-sys/Cargo.toml +++ b/rcudnn/cudnn-sys/Cargo.toml @@ -19,7 +19,7 @@ libc = "0.2" [build-dependencies] pkg-config = "0.3" -bindgen = { version = "^0.59.1", optional = true } +bindgen = { version = "^0.60.1", optional = true } [features] default = [] diff --git a/rcudnn/cudnn-sys/src/generated.rs b/rcudnn/cudnn-sys/src/generated.rs index ade902768..467260d45 100644 --- a/rcudnn/cudnn-sys/src/generated.rs +++ b/rcudnn/cudnn-sys/src/generated.rs @@ -1,4 +1,5 @@ -/* automatically generated by rust-bindgen 0.58.1 */ +/* automatically generated by rust-bindgen 0.60.1 */ + //! Defines the FFI for CUDA cuDNN. //! @@ -6,13 +7,14 @@ #![allow(non_snake_case)] #![allow(non_upper_case_globals)] + pub const CUDNN_MAJOR: u32 = 8; -pub const CUDNN_MINOR: u32 = 2; -pub const CUDNN_PATCHLEVEL: u32 = 2; -pub const CUDNN_VERSION: u32 = 8202; +pub const CUDNN_MINOR: u32 = 3; +pub const CUDNN_PATCHLEVEL: u32 = 3; +pub const CUDNN_VERSION: u32 = 8303; pub const CUDNN_OPS_INFER_MAJOR: u32 = 8; -pub const CUDNN_OPS_INFER_MINOR: u32 = 2; -pub const CUDNN_OPS_INFER_PATCH: u32 = 2; +pub const CUDNN_OPS_INFER_MINOR: u32 = 3; +pub const CUDNN_OPS_INFER_PATCH: u32 = 3; pub const CUDNN_DIM_MAX: u32 = 8; pub const CUDNN_LRN_MIN_N: u32 = 1; pub const CUDNN_LRN_MAX_N: u32 = 16; @@ -20,11 +22,11 @@ pub const CUDNN_LRN_MIN_K: f64 = 0.00001; pub const CUDNN_LRN_MIN_BETA: f64 = 0.01; pub const CUDNN_BN_MIN_EPSILON: f64 = 0.0; pub const CUDNN_OPS_TRAIN_MAJOR: u32 = 8; -pub const CUDNN_OPS_TRAIN_MINOR: u32 = 2; -pub const CUDNN_OPS_TRAIN_PATCH: u32 = 2; +pub const CUDNN_OPS_TRAIN_MINOR: u32 = 3; +pub const CUDNN_OPS_TRAIN_PATCH: u32 = 3; pub const CUDNN_ADV_INFER_MAJOR: u32 = 8; -pub const CUDNN_ADV_INFER_MINOR: u32 = 2; -pub const CUDNN_ADV_INFER_PATCH: u32 = 2; +pub const CUDNN_ADV_INFER_MINOR: u32 = 3; +pub const CUDNN_ADV_INFER_PATCH: u32 = 3; pub const CUDNN_RNN_PADDED_IO_DISABLED: u32 = 0; pub const CUDNN_RNN_PADDED_IO_ENABLED: u32 = 1; pub const CUDNN_SEQDATA_DIM_COUNT: u32 = 4; @@ -34,19 +36,16 @@ pub const CUDNN_ATTN_DISABLE_PROJ_BIASES: u32 = 0; pub const CUDNN_ATTN_ENABLE_PROJ_BIASES: u32 = 2; pub const CUDNN_ATTN_WKIND_COUNT: u32 = 8; pub const CUDNN_ADV_TRAIN_MAJOR: u32 = 8; -pub const CUDNN_ADV_TRAIN_MINOR: u32 = 2; -pub const CUDNN_ADV_TRAIN_PATCH: u32 = 2; +pub const CUDNN_ADV_TRAIN_MINOR: u32 = 3; +pub const CUDNN_ADV_TRAIN_PATCH: u32 = 3; pub const CUDNN_CNN_INFER_MAJOR: u32 = 8; -pub const CUDNN_CNN_INFER_MINOR: u32 = 2; -pub const CUDNN_CNN_INFER_PATCH: u32 = 2; +pub const CUDNN_CNN_INFER_MINOR: u32 = 3; +pub const CUDNN_CNN_INFER_PATCH: u32 = 3; pub const CUDNN_CNN_TRAIN_MAJOR: u32 = 8; -pub const CUDNN_CNN_TRAIN_MINOR: u32 = 2; -pub const CUDNN_CNN_TRAIN_PATCH: u32 = 2; +pub const CUDNN_CNN_TRAIN_MINOR: u32 = 3; +pub const CUDNN_CNN_TRAIN_PATCH: u32 = 3; #[repr(u32)] #[non_exhaustive] -#[doc = " *"] -#[doc = " *"] -#[doc = " *"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaRoundMode { cudaRoundNearest = 0, @@ -54,9 +53,6 @@ pub enum cudaRoundMode { cudaRoundPosInf = 2, cudaRoundMinInf = 3, } -#[doc = " *"] -#[doc = " *"] -#[doc = " *"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct dim3 { @@ -76,543 +72,214 @@ fn bindgen_test_layout_dim3() { 4usize, concat!("Alignment of ", stringify!(dim3)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 8usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 4usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) + ); + } + test_field_y(); + fn test_field_z() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize + }, + 8usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) + ); + } + test_field_z(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA error types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaError { - #[doc = " The API call returned with no errors. In the case of query calls, this"] - #[doc = " also means that the operation being queried is complete (see"] - #[doc = " ::cudaEventQuery() and ::cudaStreamQuery())."] cudaSuccess = 0, - #[doc = " This indicates that one or more of the parameters passed to the API call"] - #[doc = " is not within an acceptable range of values."] cudaErrorInvalidValue = 1, - #[doc = " The API call failed because it was unable to allocate enough memory to"] - #[doc = " perform the requested operation."] cudaErrorMemoryAllocation = 2, - #[doc = " The API call failed because the CUDA driver and runtime could not be"] - #[doc = " initialized."] cudaErrorInitializationError = 3, - #[doc = " This indicates that a CUDA Runtime API call cannot be executed because"] - #[doc = " it is being called during process shut down, at a point in time after"] - #[doc = " CUDA driver has been unloaded."] cudaErrorCudartUnloading = 4, - #[doc = " This indicates profiler is not initialized for this run. This can"] - #[doc = " happen when the application is running with external profiling tools"] - #[doc = " like visual profiler."] cudaErrorProfilerDisabled = 5, - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 5.0. It is no longer an error"] - #[doc = " to attempt to enable/disable the profiling via ::cudaProfilerStart or"] - #[doc = " ::cudaProfilerStop without initialization."] cudaErrorProfilerNotInitialized = 6, - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 5.0. It is no longer an error"] - #[doc = " to call cudaProfilerStart() when profiling is already enabled."] cudaErrorProfilerAlreadyStarted = 7, - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 5.0. It is no longer an error"] - #[doc = " to call cudaProfilerStop() when profiling is already disabled."] cudaErrorProfilerAlreadyStopped = 8, - #[doc = " This indicates that a kernel launch is requesting resources that can"] - #[doc = " never be satisfied by the current device. Requesting more shared memory"] - #[doc = " per block than the device supports will trigger this error, as will"] - #[doc = " requesting too many threads or blocks. See ::cudaDeviceProp for more"] - #[doc = " device limitations."] cudaErrorInvalidConfiguration = 9, - #[doc = " This indicates that one or more of the pitch-related parameters passed"] - #[doc = " to the API call is not within the acceptable range for pitch."] cudaErrorInvalidPitchValue = 12, - #[doc = " This indicates that the symbol name/identifier passed to the API call"] - #[doc = " is not a valid name or identifier."] cudaErrorInvalidSymbol = 13, - #[doc = " This indicates that at least one host pointer passed to the API call is"] - #[doc = " not a valid host pointer."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 10.1."] cudaErrorInvalidHostPointer = 16, - #[doc = " This indicates that at least one device pointer passed to the API call is"] - #[doc = " not a valid device pointer."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 10.1."] cudaErrorInvalidDevicePointer = 17, - #[doc = " This indicates that the texture passed to the API call is not a valid"] - #[doc = " texture."] cudaErrorInvalidTexture = 18, - #[doc = " This indicates that the texture binding is not valid. This occurs if you"] - #[doc = " call ::cudaGetTextureAlignmentOffset() with an unbound texture."] cudaErrorInvalidTextureBinding = 19, - #[doc = " This indicates that the channel descriptor passed to the API call is not"] - #[doc = " valid. This occurs if the format is not one of the formats specified by"] - #[doc = " ::cudaChannelFormatKind, or if one of the dimensions is invalid."] cudaErrorInvalidChannelDescriptor = 20, - #[doc = " This indicates that the direction of the memcpy passed to the API call is"] - #[doc = " not one of the types specified by ::cudaMemcpyKind."] cudaErrorInvalidMemcpyDirection = 21, - #[doc = " This indicated that the user has taken the address of a constant variable,"] - #[doc = " which was forbidden up until the CUDA 3.1 release."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Variables in constant"] - #[doc = " memory may now have their address taken by the runtime via"] - #[doc = " ::cudaGetSymbolAddress()."] cudaErrorAddressOfConstant = 22, - #[doc = " This indicated that a texture fetch was not able to be performed."] - #[doc = " This was previously used for device emulation of texture operations."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorTextureFetchFailed = 23, - #[doc = " This indicated that a texture was not bound for access."] - #[doc = " This was previously used for device emulation of texture operations."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorTextureNotBound = 24, - #[doc = " This indicated that a synchronization operation had failed."] - #[doc = " This was previously used for some device emulation functions."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorSynchronizationError = 25, - #[doc = " This indicates that a non-float texture was being accessed with linear"] - #[doc = " filtering. This is not supported by CUDA."] cudaErrorInvalidFilterSetting = 26, - #[doc = " This indicates that an attempt was made to read a non-float texture as a"] - #[doc = " normalized float. This is not supported by CUDA."] cudaErrorInvalidNormSetting = 27, - #[doc = " Mixing of device and device emulation code was not allowed."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorMixedDeviceExecution = 28, - #[doc = " This indicates that the API call is not yet implemented. Production"] - #[doc = " releases of CUDA will never return this error."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 4.1."] cudaErrorNotYetImplemented = 31, - #[doc = " This indicated that an emulated device pointer exceeded the 32-bit address"] - #[doc = " range."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorMemoryValueTooLarge = 32, - #[doc = " This indicates that the CUDA driver that the application has loaded is a"] - #[doc = " stub library. Applications that run with the stub rather than a real"] - #[doc = " driver loaded will result in CUDA API returning this error."] cudaErrorStubLibrary = 34, - #[doc = " This indicates that the installed NVIDIA CUDA driver is older than the"] - #[doc = " CUDA runtime library. This is not a supported configuration. Users should"] - #[doc = " install an updated NVIDIA display driver to allow the application to run."] cudaErrorInsufficientDriver = 35, - #[doc = " This indicates that the API call requires a newer CUDA driver than the one"] - #[doc = " currently installed. Users should install an updated NVIDIA CUDA driver"] - #[doc = " to allow the API call to succeed."] cudaErrorCallRequiresNewerDriver = 36, - #[doc = " This indicates that the surface passed to the API call is not a valid"] - #[doc = " surface."] cudaErrorInvalidSurface = 37, - #[doc = " This indicates that multiple global or constant variables (across separate"] - #[doc = " CUDA source files in the application) share the same string name."] cudaErrorDuplicateVariableName = 43, - #[doc = " This indicates that multiple textures (across separate CUDA source"] - #[doc = " files in the application) share the same string name."] cudaErrorDuplicateTextureName = 44, - #[doc = " This indicates that multiple surfaces (across separate CUDA source"] - #[doc = " files in the application) share the same string name."] cudaErrorDuplicateSurfaceName = 45, - #[doc = " This indicates that all CUDA devices are busy or unavailable at the current"] - #[doc = " time. Devices are often busy/unavailable due to use of"] - #[doc = " ::cudaComputeModeExclusive, ::cudaComputeModeProhibited or when long"] - #[doc = " running CUDA kernels have filled up the GPU and are blocking new work"] - #[doc = " from starting. They can also be unavailable due to memory constraints"] - #[doc = " on a device that already has active CUDA work being performed."] cudaErrorDevicesUnavailable = 46, - #[doc = " This indicates that the current context is not compatible with this"] - #[doc = " the CUDA Runtime. This can only occur if you are using CUDA"] - #[doc = " Runtime/Driver interoperability and have created an existing Driver"] - #[doc = " context using the driver API. The Driver context may be incompatible"] - #[doc = " either because the Driver context was created using an older version"] - #[doc = " of the API, because the Runtime API call expects a primary driver"] - #[doc = " context and the Driver context is not primary, or because the Driver"] - #[doc = " context has been destroyed. Please see \\ref CUDART_DRIVER \"Interactions"] - #[doc = " with the CUDA Driver API\" for more information."] cudaErrorIncompatibleDriverContext = 49, - #[doc = " The device function being invoked (usually via ::cudaLaunchKernel()) was not"] - #[doc = " previously configured via the ::cudaConfigureCall() function."] cudaErrorMissingConfiguration = 52, - #[doc = " This indicated that a previous kernel launch failed. This was previously"] - #[doc = " used for device emulation of kernel launches."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 3.1. Device emulation mode was"] - #[doc = " removed with the CUDA 3.1 release."] cudaErrorPriorLaunchFailure = 53, - #[doc = " This error indicates that a device runtime grid launch did not occur"] - #[doc = " because the depth of the child grid would exceed the maximum supported"] - #[doc = " number of nested grid launches."] cudaErrorLaunchMaxDepthExceeded = 65, - #[doc = " This error indicates that a grid launch did not occur because the kernel"] - #[doc = " uses file-scoped textures which are unsupported by the device runtime."] - #[doc = " Kernels launched via the device runtime only support textures created with"] - #[doc = " the Texture Object API's."] cudaErrorLaunchFileScopedTex = 66, - #[doc = " This error indicates that a grid launch did not occur because the kernel"] - #[doc = " uses file-scoped surfaces which are unsupported by the device runtime."] - #[doc = " Kernels launched via the device runtime only support surfaces created with"] - #[doc = " the Surface Object API's."] cudaErrorLaunchFileScopedSurf = 67, - #[doc = " This error indicates that a call to ::cudaDeviceSynchronize made from"] - #[doc = " the device runtime failed because the call was made at grid depth greater"] - #[doc = " than than either the default (2 levels of grids) or user specified device"] - #[doc = " limit ::cudaLimitDevRuntimeSyncDepth. To be able to synchronize on"] - #[doc = " launched grids at a greater depth successfully, the maximum nested"] - #[doc = " depth at which ::cudaDeviceSynchronize will be called must be specified"] - #[doc = " with the ::cudaLimitDevRuntimeSyncDepth limit to the ::cudaDeviceSetLimit"] - #[doc = " api before the host-side launch of a kernel using the device runtime."] - #[doc = " Keep in mind that additional levels of sync depth require the runtime"] - #[doc = " to reserve large amounts of device memory that cannot be used for"] - #[doc = " user allocations."] cudaErrorSyncDepthExceeded = 68, - #[doc = " This error indicates that a device runtime grid launch failed because"] - #[doc = " the launch would exceed the limit ::cudaLimitDevRuntimePendingLaunchCount."] - #[doc = " For this launch to proceed successfully, ::cudaDeviceSetLimit must be"] - #[doc = " called to set the ::cudaLimitDevRuntimePendingLaunchCount to be higher"] - #[doc = " than the upper bound of outstanding launches that can be issued to the"] - #[doc = " device runtime. Keep in mind that raising the limit of pending device"] - #[doc = " runtime launches will require the runtime to reserve device memory that"] - #[doc = " cannot be used for user allocations."] cudaErrorLaunchPendingCountExceeded = 69, - #[doc = " The requested device function does not exist or is not compiled for the"] - #[doc = " proper device architecture."] cudaErrorInvalidDeviceFunction = 98, - #[doc = " This indicates that no CUDA-capable devices were detected by the installed"] - #[doc = " CUDA driver."] cudaErrorNoDevice = 100, - #[doc = " This indicates that the device ordinal supplied by the user does not"] - #[doc = " correspond to a valid CUDA device or that the action requested is"] - #[doc = " invalid for the specified device."] cudaErrorInvalidDevice = 101, - #[doc = " This indicates that the device doesn't have a valid Grid License."] cudaErrorDeviceNotLicensed = 102, - #[doc = " By default, the CUDA runtime may perform a minimal set of self-tests,"] - #[doc = " as well as CUDA driver tests, to establish the validity of both."] - #[doc = " Introduced in CUDA 11.2, this error return indicates that at least one"] - #[doc = " of these tests has failed and the validity of either the runtime"] - #[doc = " or the driver could not be established."] cudaErrorSoftwareValidityNotEstablished = 103, - #[doc = " This indicates an internal startup failure in the CUDA runtime."] cudaErrorStartupFailure = 127, - #[doc = " This indicates that the device kernel image is invalid."] cudaErrorInvalidKernelImage = 200, - #[doc = " This most frequently indicates that there is no context bound to the"] - #[doc = " current thread. This can also be returned if the context passed to an"] - #[doc = " API call is not a valid handle (such as a context that has had"] - #[doc = " ::cuCtxDestroy() invoked on it). This can also be returned if a user"] - #[doc = " mixes different API versions (i.e. 3010 context with 3020 API calls)."] - #[doc = " See ::cuCtxGetApiVersion() for more details."] cudaErrorDeviceUninitialized = 201, - #[doc = " This indicates that the buffer object could not be mapped."] cudaErrorMapBufferObjectFailed = 205, - #[doc = " This indicates that the buffer object could not be unmapped."] cudaErrorUnmapBufferObjectFailed = 206, - #[doc = " This indicates that the specified array is currently mapped and thus"] - #[doc = " cannot be destroyed."] cudaErrorArrayIsMapped = 207, - #[doc = " This indicates that the resource is already mapped."] cudaErrorAlreadyMapped = 208, - #[doc = " This indicates that there is no kernel image available that is suitable"] - #[doc = " for the device. This can occur when a user specifies code generation"] - #[doc = " options for a particular CUDA source file that do not include the"] - #[doc = " corresponding device configuration."] cudaErrorNoKernelImageForDevice = 209, - #[doc = " This indicates that a resource has already been acquired."] cudaErrorAlreadyAcquired = 210, - #[doc = " This indicates that a resource is not mapped."] cudaErrorNotMapped = 211, - #[doc = " This indicates that a mapped resource is not available for access as an"] - #[doc = " array."] cudaErrorNotMappedAsArray = 212, - #[doc = " This indicates that a mapped resource is not available for access as a"] - #[doc = " pointer."] cudaErrorNotMappedAsPointer = 213, - #[doc = " This indicates that an uncorrectable ECC error was detected during"] - #[doc = " execution."] cudaErrorECCUncorrectable = 214, - #[doc = " This indicates that the ::cudaLimit passed to the API call is not"] - #[doc = " supported by the active device."] cudaErrorUnsupportedLimit = 215, - #[doc = " This indicates that a call tried to access an exclusive-thread device that"] - #[doc = " is already in use by a different thread."] cudaErrorDeviceAlreadyInUse = 216, - #[doc = " This error indicates that P2P access is not supported across the given"] - #[doc = " devices."] cudaErrorPeerAccessUnsupported = 217, - #[doc = " A PTX compilation failed. The runtime may fall back to compiling PTX if"] - #[doc = " an application does not contain a suitable binary for the current device."] cudaErrorInvalidPtx = 218, - #[doc = " This indicates an error with the OpenGL or DirectX context."] cudaErrorInvalidGraphicsContext = 219, - #[doc = " This indicates that an uncorrectable NVLink error was detected during the"] - #[doc = " execution."] cudaErrorNvlinkUncorrectable = 220, - #[doc = " This indicates that the PTX JIT compiler library was not found. The JIT Compiler"] - #[doc = " library is used for PTX compilation. The runtime may fall back to compiling PTX"] - #[doc = " if an application does not contain a suitable binary for the current device."] cudaErrorJitCompilerNotFound = 221, - #[doc = " This indicates that the provided PTX was compiled with an unsupported toolchain."] - #[doc = " The most common reason for this, is the PTX was generated by a compiler newer"] - #[doc = " than what is supported by the CUDA driver and PTX JIT compiler."] cudaErrorUnsupportedPtxVersion = 222, - #[doc = " This indicates that the JIT compilation was disabled. The JIT compilation compiles"] - #[doc = " PTX. The runtime may fall back to compiling PTX if an application does not contain"] - #[doc = " a suitable binary for the current device."] cudaErrorJitCompilationDisabled = 223, - #[doc = " This indicates that the provided execution affinity is not supported by the device."] cudaErrorUnsupportedExecAffinity = 224, - #[doc = " This indicates that the device kernel source is invalid."] cudaErrorInvalidSource = 300, - #[doc = " This indicates that the file specified was not found."] cudaErrorFileNotFound = 301, - #[doc = " This indicates that a link to a shared object failed to resolve."] cudaErrorSharedObjectSymbolNotFound = 302, - #[doc = " This indicates that initialization of a shared object failed."] cudaErrorSharedObjectInitFailed = 303, - #[doc = " This error indicates that an OS call failed."] cudaErrorOperatingSystem = 304, - #[doc = " This indicates that a resource handle passed to the API call was not"] - #[doc = " valid. Resource handles are opaque types like ::cudaStream_t and"] - #[doc = " ::cudaEvent_t."] cudaErrorInvalidResourceHandle = 400, - #[doc = " This indicates that a resource required by the API call is not in a"] - #[doc = " valid state to perform the requested operation."] cudaErrorIllegalState = 401, - #[doc = " This indicates that a named symbol was not found. Examples of symbols"] - #[doc = " are global/constant variable names, driver function names, texture names,"] - #[doc = " and surface names."] cudaErrorSymbolNotFound = 500, - #[doc = " This indicates that asynchronous operations issued previously have not"] - #[doc = " completed yet. This result is not actually an error, but must be indicated"] - #[doc = " differently than ::cudaSuccess (which indicates completion). Calls that"] - #[doc = " may return this value include ::cudaEventQuery() and ::cudaStreamQuery()."] cudaErrorNotReady = 600, - #[doc = " The device encountered a load or store instruction on an invalid memory address."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorIllegalAddress = 700, - #[doc = " This indicates that a launch did not occur because it did not have"] - #[doc = " appropriate resources. Although this error is similar to"] - #[doc = " ::cudaErrorInvalidConfiguration, this error usually indicates that the"] - #[doc = " user has attempted to pass too many arguments to the device kernel, or the"] - #[doc = " kernel launch specifies too many threads for the kernel's register count."] cudaErrorLaunchOutOfResources = 701, - #[doc = " This indicates that the device kernel took too long to execute. This can"] - #[doc = " only occur if timeouts are enabled - see the device property"] - #[doc = " \\ref ::cudaDeviceProp::kernelExecTimeoutEnabled \"kernelExecTimeoutEnabled\""] - #[doc = " for more information."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorLaunchTimeout = 702, - #[doc = " This error indicates a kernel launch that uses an incompatible texturing"] - #[doc = " mode."] cudaErrorLaunchIncompatibleTexturing = 703, - #[doc = " This error indicates that a call to ::cudaDeviceEnablePeerAccess() is"] - #[doc = " trying to re-enable peer addressing on from a context which has already"] - #[doc = " had peer addressing enabled."] cudaErrorPeerAccessAlreadyEnabled = 704, - #[doc = " This error indicates that ::cudaDeviceDisablePeerAccess() is trying to"] - #[doc = " disable peer addressing which has not been enabled yet via"] - #[doc = " ::cudaDeviceEnablePeerAccess()."] cudaErrorPeerAccessNotEnabled = 705, - #[doc = " This indicates that the user has called ::cudaSetValidDevices(),"] - #[doc = " ::cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(),"] - #[doc = " ::cudaD3D10SetDirect3DDevice, ::cudaD3D11SetDirect3DDevice(), or"] - #[doc = " ::cudaVDPAUSetVDPAUDevice() after initializing the CUDA runtime by"] - #[doc = " calling non-device management operations (allocating memory and"] - #[doc = " launching kernels are examples of non-device management operations)."] - #[doc = " This error can also be returned if using runtime/driver"] - #[doc = " interoperability and there is an existing ::CUcontext active on the"] - #[doc = " host thread."] cudaErrorSetOnActiveProcess = 708, - #[doc = " This error indicates that the context current to the calling thread"] - #[doc = " has been destroyed using ::cuCtxDestroy, or is a primary context which"] - #[doc = " has not yet been initialized."] cudaErrorContextIsDestroyed = 709, - #[doc = " An assert triggered in device code during kernel execution. The device"] - #[doc = " cannot be used again. All existing allocations are invalid. To continue"] - #[doc = " using CUDA, the process must be terminated and relaunched."] cudaErrorAssert = 710, - #[doc = " This error indicates that the hardware resources required to enable"] - #[doc = " peer access have been exhausted for one or more of the devices"] - #[doc = " passed to ::cudaEnablePeerAccess()."] cudaErrorTooManyPeers = 711, - #[doc = " This error indicates that the memory range passed to ::cudaHostRegister()"] - #[doc = " has already been registered."] cudaErrorHostMemoryAlreadyRegistered = 712, - #[doc = " This error indicates that the pointer passed to ::cudaHostUnregister()"] - #[doc = " does not correspond to any currently registered memory region."] cudaErrorHostMemoryNotRegistered = 713, - #[doc = " Device encountered an error in the call stack during kernel execution,"] - #[doc = " possibly due to stack corruption or exceeding the stack size limit."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorHardwareStackError = 714, - #[doc = " The device encountered an illegal instruction during kernel execution"] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorIllegalInstruction = 715, - #[doc = " The device encountered a load or store instruction"] - #[doc = " on a memory address which is not aligned."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorMisalignedAddress = 716, - #[doc = " While executing a kernel, the device encountered an instruction"] - #[doc = " which can only operate on memory locations in certain address spaces"] - #[doc = " (global, shared, or local), but was supplied a memory address not"] - #[doc = " belonging to an allowed address space."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorInvalidAddressSpace = 717, - #[doc = " The device encountered an invalid program counter."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorInvalidPc = 718, - #[doc = " An exception occurred on the device while executing a kernel. Common"] - #[doc = " causes include dereferencing an invalid device pointer and accessing"] - #[doc = " out of bounds shared memory. Less common cases can be system specific - more"] - #[doc = " information about these cases can be found in the system specific user guide."] - #[doc = " This leaves the process in an inconsistent state and any further CUDA work"] - #[doc = " will return the same error. To continue using CUDA, the process must be terminated"] - #[doc = " and relaunched."] cudaErrorLaunchFailure = 719, - #[doc = " This error indicates that the number of blocks launched per grid for a kernel that was"] - #[doc = " launched via either ::cudaLaunchCooperativeKernel or ::cudaLaunchCooperativeKernelMultiDevice"] - #[doc = " exceeds the maximum number of blocks as allowed by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor"] - #[doc = " or ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors"] - #[doc = " as specified by the device attribute ::cudaDevAttrMultiProcessorCount."] cudaErrorCooperativeLaunchTooLarge = 720, - #[doc = " This error indicates the attempted operation is not permitted."] cudaErrorNotPermitted = 800, - #[doc = " This error indicates the attempted operation is not supported"] - #[doc = " on the current system or device."] cudaErrorNotSupported = 801, - #[doc = " This error indicates that the system is not yet ready to start any CUDA"] - #[doc = " work. To continue using CUDA, verify the system configuration is in a"] - #[doc = " valid state and all required driver daemons are actively running."] - #[doc = " More information about this error can be found in the system specific"] - #[doc = " user guide."] cudaErrorSystemNotReady = 802, - #[doc = " This error indicates that there is a mismatch between the versions of"] - #[doc = " the display driver and the CUDA driver. Refer to the compatibility documentation"] - #[doc = " for supported versions."] cudaErrorSystemDriverMismatch = 803, - #[doc = " This error indicates that the system was upgraded to run with forward compatibility"] - #[doc = " but the visible hardware detected by CUDA does not support this configuration."] - #[doc = " Refer to the compatibility documentation for the supported hardware matrix or ensure"] - #[doc = " that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES"] - #[doc = " environment variable."] cudaErrorCompatNotSupportedOnDevice = 804, - #[doc = " This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."] cudaErrorMpsConnectionFailed = 805, - #[doc = " This error indicates that the remote procedural call between the MPS server and the MPS client failed."] cudaErrorMpsRpcFailure = 806, - #[doc = " This error indicates that the MPS server is not ready to accept new MPS client requests."] - #[doc = " This error can be returned when the MPS server is in the process of recovering from a fatal failure."] cudaErrorMpsServerNotReady = 807, - #[doc = " This error indicates that the hardware resources required to create MPS client have been exhausted."] cudaErrorMpsMaxClientsReached = 808, - #[doc = " This error indicates the the hardware resources required to device connections have been exhausted."] cudaErrorMpsMaxConnectionsReached = 809, - #[doc = " The operation is not permitted when the stream is capturing."] cudaErrorStreamCaptureUnsupported = 900, - #[doc = " The current capture sequence on the stream has been invalidated due to"] - #[doc = " a previous error."] cudaErrorStreamCaptureInvalidated = 901, - #[doc = " The operation would have resulted in a merge of two independent capture"] - #[doc = " sequences."] cudaErrorStreamCaptureMerge = 902, - #[doc = " The capture was not initiated in this stream."] cudaErrorStreamCaptureUnmatched = 903, - #[doc = " The capture sequence contains a fork that was not joined to the primary"] - #[doc = " stream."] cudaErrorStreamCaptureUnjoined = 904, - #[doc = " A dependency would have been created which crosses the capture sequence"] - #[doc = " boundary. Only implicit in-stream ordering dependencies are allowed to"] - #[doc = " cross the boundary."] cudaErrorStreamCaptureIsolation = 905, - #[doc = " The operation would have resulted in a disallowed implicit dependency on"] - #[doc = " a current capture sequence from cudaStreamLegacy."] cudaErrorStreamCaptureImplicit = 906, - #[doc = " The operation is not permitted on an event which was last recorded in a"] - #[doc = " capturing stream."] cudaErrorCapturedEvent = 907, - #[doc = " A stream capture sequence not initiated with the ::cudaStreamCaptureModeRelaxed"] - #[doc = " argument to ::cudaStreamBeginCapture was passed to ::cudaStreamEndCapture in a"] - #[doc = " different thread."] cudaErrorStreamCaptureWrongThread = 908, - #[doc = " This indicates that the wait operation has timed out."] cudaErrorTimeout = 909, - #[doc = " This error indicates that the graph update was not performed because it included"] - #[doc = " changes which violated constraints specific to instantiated graph update."] cudaErrorGraphExecUpdateFailure = 910, - #[doc = " This indicates that an unknown internal error has occurred."] + cudaErrorExternalDevice = 911, cudaErrorUnknown = 999, - #[doc = " Any unhandled CUDA driver error is added to this value and returned via"] - #[doc = " the runtime. Production releases of CUDA should not return such errors."] - #[doc = " \\deprecated"] - #[doc = " This error return is deprecated as of CUDA 4.1."] cudaErrorApiFailureBase = 10000, } #[repr(u32)] #[non_exhaustive] -#[doc = " Channel format kind"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaChannelFormatKind { - #[doc = "< Signed channel format"] cudaChannelFormatKindSigned = 0, - #[doc = "< Unsigned channel format"] cudaChannelFormatKindUnsigned = 1, - #[doc = "< Float channel format"] cudaChannelFormatKindFloat = 2, - #[doc = "< No channel format"] cudaChannelFormatKindNone = 3, cudaChannelFormatKindNV12 = 4, + cudaChannelFormatKindUnsignedNormalized8X1 = 5, + cudaChannelFormatKindUnsignedNormalized8X2 = 6, + cudaChannelFormatKindUnsignedNormalized8X4 = 7, + cudaChannelFormatKindUnsignedNormalized16X1 = 8, + cudaChannelFormatKindUnsignedNormalized16X2 = 9, + cudaChannelFormatKindUnsignedNormalized16X4 = 10, + cudaChannelFormatKindSignedNormalized8X1 = 11, + cudaChannelFormatKindSignedNormalized8X2 = 12, + cudaChannelFormatKindSignedNormalized8X4 = 13, + cudaChannelFormatKindSignedNormalized16X1 = 14, + cudaChannelFormatKindSignedNormalized16X2 = 15, + cudaChannelFormatKindSignedNormalized16X4 = 16, + cudaChannelFormatKindUnsignedBlockCompressed1 = 17, + cudaChannelFormatKindUnsignedBlockCompressed1SRGB = 18, + cudaChannelFormatKindUnsignedBlockCompressed2 = 19, + cudaChannelFormatKindUnsignedBlockCompressed2SRGB = 20, + cudaChannelFormatKindUnsignedBlockCompressed3 = 21, + cudaChannelFormatKindUnsignedBlockCompressed3SRGB = 22, + cudaChannelFormatKindUnsignedBlockCompressed4 = 23, + cudaChannelFormatKindSignedBlockCompressed4 = 24, + cudaChannelFormatKindUnsignedBlockCompressed5 = 25, + cudaChannelFormatKindSignedBlockCompressed5 = 26, + cudaChannelFormatKindUnsignedBlockCompressed6H = 27, + cudaChannelFormatKindSignedBlockCompressed6H = 28, + cudaChannelFormatKindUnsignedBlockCompressed7 = 29, + cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30, } -#[doc = " CUDA Channel format descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaChannelFormatDesc { - #[doc = "< x"] pub x: ::libc::c_int, - #[doc = "< y"] pub y: ::libc::c_int, - #[doc = "< z"] pub z: ::libc::c_int, - #[doc = "< w"] pub w: ::libc::c_int, - #[doc = "< Channel format kind"] pub f: cudaChannelFormatKind, } #[test] @@ -627,96 +294,120 @@ fn bindgen_test_layout_cudaChannelFormatDesc() { 4usize, concat!("Alignment of ", stringify!(cudaChannelFormatDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(z) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(f) - ) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(x) + ) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(y) + ) + ); + } + test_field_y(); + fn test_field_z() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(z) + ) + ); + } + test_field_z(); + fn test_field_w() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(w) + ) + ); + } + test_field_w(); + fn test_field_f() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(f) + ) + ); + } + test_field_f(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaArray { _unused: [u8; 0], } -#[doc = " CUDA array"] pub type cudaArray_t = *mut cudaArray; -#[doc = " CUDA array (as source copy argument)"] pub type cudaArray_const_t = *const cudaArray; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMipmappedArray { _unused: [u8; 0], } -#[doc = " CUDA mipmapped array"] pub type cudaMipmappedArray_t = *mut cudaMipmappedArray; -#[doc = " CUDA mipmapped array (as source argument)"] pub type cudaMipmappedArray_const_t = *const cudaMipmappedArray; -#[doc = " Sparse CUDA array and CUDA mipmapped array properties"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaArraySparseProperties { pub tileExtent: cudaArraySparseProperties__bindgen_ty_1, - #[doc = "< First mip level at which the mip tail begins"] pub miptailFirstLevel: ::libc::c_uint, - #[doc = "< Total size of the mip tail."] pub miptailSize: ::libc::c_ulonglong, - #[doc = "< Flags will either be zero or ::cudaArraySparsePropertiesSingleMipTail"] pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 4usize], } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaArraySparseProperties__bindgen_ty_1 { - #[doc = "< Tile width in elements"] pub width: ::libc::c_uint, - #[doc = "< Tile height in elements"] pub height: ::libc::c_uint, - #[doc = "< Tile depth in elements"] pub depth: ::libc::c_uint, } #[test] @@ -737,45 +428,60 @@ fn bindgen_test_layout_cudaArraySparseProperties__bindgen_ty_1() { stringify!(cudaArraySparseProperties__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).depth as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(depth) - ) - ); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_depth() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(depth) + ) + ); + } + test_field_depth(); } #[test] fn bindgen_test_layout_cudaArraySparseProperties() { @@ -789,109 +495,188 @@ fn bindgen_test_layout_cudaArraySparseProperties() { 8usize, concat!("Alignment of ", stringify!(cudaArraySparseProperties)) ); + fn test_field_tileExtent() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).tileExtent) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(tileExtent) + ) + ); + } + test_field_tileExtent(); + fn test_field_miptailFirstLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).miptailFirstLevel) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailFirstLevel) + ) + ); + } + test_field_miptailFirstLevel(); + fn test_field_miptailSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).miptailSize) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailSize) + ) + ); + } + test_field_miptailSize(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaArrayMemoryRequirements { + pub size: usize, + pub alignment: usize, + pub reserved: [::libc::c_uint; 4usize], +} +#[test] +fn bindgen_test_layout_cudaArrayMemoryRequirements() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).tileExtent as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(tileExtent) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).miptailFirstLevel as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailFirstLevel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).miptailSize as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(flags) - ) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaArrayMemoryRequirements)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(reserved) - ) - ); + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaArrayMemoryRequirements)) + ); + fn test_field_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(size) + ) + ); + } + test_field_size(); + fn test_field_alignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).alignment) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(alignment) + ) + ); + } + test_field_alignment(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA memory types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemoryType { - #[doc = "< Unregistered memory"] cudaMemoryTypeUnregistered = 0, - #[doc = "< Host memory"] cudaMemoryTypeHost = 1, - #[doc = "< Device memory"] cudaMemoryTypeDevice = 2, - #[doc = "< Managed memory"] cudaMemoryTypeManaged = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA memory copy types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemcpyKind { - #[doc = "< Host -> Host"] cudaMemcpyHostToHost = 0, - #[doc = "< Host -> Device"] cudaMemcpyHostToDevice = 1, - #[doc = "< Device -> Host"] cudaMemcpyDeviceToHost = 2, - #[doc = "< Device -> Device"] cudaMemcpyDeviceToDevice = 3, - #[doc = "< Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing"] cudaMemcpyDefault = 4, } -#[doc = " CUDA Pitched memory pointer"] -#[doc = ""] -#[doc = " \\sa ::make_cudaPitchedPtr"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaPitchedPtr { - #[doc = "< Pointer to allocated memory"] pub ptr: *mut ::libc::c_void, - #[doc = "< Pitch of allocated memory in bytes"] pub pitch: usize, - #[doc = "< Logical width of allocation in elements"] pub xsize: usize, - #[doc = "< Logical height of allocation in elements"] pub ysize: usize, } #[test] @@ -906,58 +691,80 @@ fn bindgen_test_layout_cudaPitchedPtr() { 8usize, concat!("Alignment of ", stringify!(cudaPitchedPtr)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xsize as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(xsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ysize as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ysize) - ) - ); + fn test_field_ptr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ptr) + ) + ); + } + test_field_ptr(); + fn test_field_pitch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(pitch) + ) + ); + } + test_field_pitch(); + fn test_field_xsize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).xsize) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(xsize) + ) + ); + } + test_field_xsize(); + fn test_field_ysize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ysize) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ysize) + ) + ); + } + test_field_ysize(); } -#[doc = " CUDA extent"] -#[doc = ""] -#[doc = " \\sa ::make_cudaExtent"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExtent { - #[doc = "< Width in elements when referring to array memory, in bytes when referring to linear memory"] pub width: usize, - #[doc = "< Height in elements"] pub height: usize, - #[doc = "< Depth in elements"] pub depth: usize, } #[test] @@ -972,48 +779,63 @@ fn bindgen_test_layout_cudaExtent() { 8usize, concat!("Alignment of ", stringify!(cudaExtent)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(depth) - ) - ); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_depth() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(depth) + ) + ); + } + test_field_depth(); } -#[doc = " CUDA 3D position"] -#[doc = ""] -#[doc = " \\sa ::make_cudaPos"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaPos { - #[doc = "< x"] pub x: usize, - #[doc = "< y"] pub y: usize, - #[doc = "< z"] pub z: usize, } #[test] @@ -1028,56 +850,68 @@ fn bindgen_test_layout_cudaPos() { 8usize, concat!("Alignment of ", stringify!(cudaPos)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).z as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(z) - ) - ); + fn test_field_x() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(x) + ) + ); + } + test_field_x(); + fn test_field_y() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(y) + ) + ); + } + test_field_y(); + fn test_field_z() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(z) + ) + ); + } + test_field_z(); } -#[doc = " CUDA 3D memory copying parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemcpy3DParms { - #[doc = "< Source memory address"] pub srcArray: cudaArray_t, - #[doc = "< Source position offset"] pub srcPos: cudaPos, - #[doc = "< Pitched source memory address"] pub srcPtr: cudaPitchedPtr, - #[doc = "< Destination memory address"] pub dstArray: cudaArray_t, - #[doc = "< Destination position offset"] pub dstPos: cudaPos, - #[doc = "< Pitched destination memory address"] pub dstPtr: cudaPitchedPtr, - #[doc = "< Requested memory copy size"] pub extent: cudaExtent, - #[doc = "< Type of transfer"] pub kind: cudaMemcpyKind, } #[test] @@ -1092,108 +926,154 @@ fn bindgen_test_layout_cudaMemcpy3DParms() { 8usize, concat!("Alignment of ", stringify!(cudaMemcpy3DParms)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(extent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).kind as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(kind) - ) - ); + fn test_field_srcArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcArray) + ) + ); + } + test_field_srcArray(); + fn test_field_srcPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPos) + ) + ); + } + test_field_srcPos(); + fn test_field_srcPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPtr) + ) + ); + } + test_field_srcPtr(); + fn test_field_dstArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstArray) + ) + ); + } + test_field_dstArray(); + fn test_field_dstPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPos) + ) + ); + } + test_field_dstPos(); + fn test_field_dstPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPtr) + ) + ); + } + test_field_dstPtr(); + fn test_field_extent() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(extent) + ) + ); + } + test_field_extent(); + fn test_field_kind() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).kind) as usize - ptr as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(kind) + ) + ); + } + test_field_kind(); } -#[doc = " CUDA 3D cross-device memory copying parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemcpy3DPeerParms { - #[doc = "< Source memory address"] pub srcArray: cudaArray_t, - #[doc = "< Source position offset"] pub srcPos: cudaPos, - #[doc = "< Pitched source memory address"] pub srcPtr: cudaPitchedPtr, - #[doc = "< Source device"] pub srcDevice: ::libc::c_int, - #[doc = "< Destination memory address"] pub dstArray: cudaArray_t, - #[doc = "< Destination position offset"] pub dstPos: cudaPos, - #[doc = "< Pitched destination memory address"] pub dstPtr: cudaPitchedPtr, - #[doc = "< Destination device"] pub dstDevice: ::libc::c_int, - #[doc = "< Requested memory copy size"] pub extent: cudaExtent, } #[test] @@ -1208,112 +1088,168 @@ fn bindgen_test_layout_cudaMemcpy3DPeerParms() { 8usize, concat!("Alignment of ", stringify!(cudaMemcpy3DPeerParms)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcArray as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcPtr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).srcDevice as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstArray as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstArray) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPos as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstPtr as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPtr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dstDevice as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstDevice) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extent as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(extent) - ) - ); + fn test_field_srcArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcArray) + ) + ); + } + test_field_srcArray(); + fn test_field_srcPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPos) + ) + ); + } + test_field_srcPos(); + fn test_field_srcPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPtr) + ) + ); + } + test_field_srcPtr(); + fn test_field_srcDevice() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcDevice) + ) + ); + } + test_field_srcDevice(); + fn test_field_dstArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstArray) + ) + ); + } + test_field_dstArray(); + fn test_field_dstPos() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPos) + ) + ); + } + test_field_dstPos(); + fn test_field_dstPtr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPtr) + ) + ); + } + test_field_dstPtr(); + fn test_field_dstDevice() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstDevice) + ) + ); + } + test_field_dstDevice(); + fn test_field_extent() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(extent) + ) + ); + } + test_field_extent(); } -#[doc = " CUDA Memset node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemsetParams { - #[doc = "< Destination device pointer"] pub dst: *mut ::libc::c_void, - #[doc = "< Pitch of destination device pointer. Unused if height is 1"] pub pitch: usize, - #[doc = "< Value to be set"] pub value: ::libc::c_uint, - #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."] pub elementSize: ::libc::c_uint, - #[doc = "< Width of the row in elements"] pub width: usize, - #[doc = "< Number of rows"] pub height: usize, } #[test] @@ -1328,100 +1264,124 @@ fn bindgen_test_layout_cudaMemsetParams() { 8usize, concat!("Alignment of ", stringify!(cudaMemsetParams)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dst as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(dst) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pitch as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(pitch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).elementSize as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(elementSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(height) - ) - ); + fn test_field_dst() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(dst) + ) + ); + } + test_field_dst(); + fn test_field_pitch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(pitch) + ) + ); + } + test_field_pitch(); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(value) + ) + ); + } + test_field_value(); + fn test_field_elementSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(elementSize) + ) + ); + } + test_field_elementSize(); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(height) + ) + ); + } + test_field_height(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Specifies performance hint with ::cudaAccessPolicyWindow for hitProp and missProp members."] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaAccessProperty { - #[doc = "< Normal cache persistence."] cudaAccessPropertyNormal = 0, - #[doc = "< Streaming access is less likely to persit from cache."] cudaAccessPropertyStreaming = 1, - #[doc = "< Persisting access is more likely to persist in cache."] cudaAccessPropertyPersisting = 2, } -#[doc = " Specifies an access policy for a window, a contiguous extent of memory"] -#[doc = " beginning at base_ptr and ending at base_ptr + num_bytes."] -#[doc = " Partition into many segments and assign segments such that."] -#[doc = " sum of \"hit segments\" / window == approx. ratio."] -#[doc = " sum of \"miss segments\" / window == approx 1-ratio."] -#[doc = " Segments and ratio specifications are fitted to the capabilities of"] -#[doc = " the architecture."] -#[doc = " Accesses in a hit segment apply the hitProp access policy."] -#[doc = " Accesses in a miss segment apply the missProp access policy."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaAccessPolicyWindow { - #[doc = "< Starting address of the access policy window. CUDA driver may align it."] pub base_ptr: *mut ::libc::c_void, - #[doc = "< Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment."] pub num_bytes: usize, - #[doc = "< hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp."] pub hitRatio: f32, - #[doc = "< ::CUaccessProperty set for hit."] pub hitProp: cudaAccessProperty, - #[doc = "< ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING."] pub missProp: cudaAccessProperty, } #[test] @@ -1436,69 +1396,97 @@ fn bindgen_test_layout_cudaAccessPolicyWindow() { 8usize, concat!("Alignment of ", stringify!(cudaAccessPolicyWindow)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).base_ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(base_ptr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).num_bytes as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(num_bytes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hitRatio as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitRatio) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hitProp as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitProp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).missProp as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(missProp) - ) - ); + fn test_field_base_ptr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).base_ptr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(base_ptr) + ) + ); + } + test_field_base_ptr(); + fn test_field_num_bytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).num_bytes) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(num_bytes) + ) + ); + } + test_field_num_bytes(); + fn test_field_hitRatio() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hitRatio) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitRatio) + ) + ); + } + test_field_hitRatio(); + fn test_field_hitProp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hitProp) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitProp) + ) + ); + } + test_field_hitProp(); + fn test_field_missProp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).missProp) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(missProp) + ) + ); + } + test_field_missProp(); } -#[doc = " CUDA host function"] -#[doc = " \\param userData Argument value passed to the function"] pub type cudaHostFn_t = ::std::option::Option; -#[doc = " CUDA host node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaHostNodeParams { - #[doc = "< The function to call when the node executes"] pub fn_: cudaHostFn_t, - #[doc = "< Argument to pass to the function"] pub userData: *mut ::libc::c_void, } #[test] @@ -1513,44 +1501,51 @@ fn bindgen_test_layout_cudaHostNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaHostNodeParams)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).userData as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(userData) - ) - ); + fn test_field_fn() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(fn_) + ) + ); + } + test_field_fn(); + fn test_field_userData() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(userData) + ) + ); + } + test_field_userData(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Possible stream capture statuses returned by ::cudaStreamIsCapturing"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamCaptureStatus { - #[doc = "< Stream is not capturing"] cudaStreamCaptureStatusNone = 0, - #[doc = "< Stream is actively capturing"] cudaStreamCaptureStatusActive = 1, - #[doc = "< Stream is part of a capture sequence that"] - #[doc = "has been invalidated, but not terminated"] cudaStreamCaptureStatusInvalidated = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " Possible modes for stream capture thread interactions. For more details see"] -#[doc = " ::cudaStreamBeginCapture and ::cudaThreadExchangeStreamCaptureMode"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamCaptureMode { cudaStreamCaptureModeGlobal = 0, @@ -1568,83 +1563,23 @@ pub enum cudaSynchronizationPolicy { } #[repr(u32)] #[non_exhaustive] -#[doc = " Stream Attributes"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaStreamAttrID { - #[doc = "< Identifier for ::cudaStreamAttrValue::accessPolicyWindow."] - cudaStreamAttributeAccessPolicyWindow = 1, - #[doc = "< ::cudaSynchronizationPolicy for work queued up in this stream"] - cudaStreamAttributeSynchronizationPolicy = 3, -} -#[doc = " Stream attributes union used with ::cudaStreamSetAttribute/::cudaStreamGetAttribute"] -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaStreamAttrValue { - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub syncPolicy: cudaSynchronizationPolicy, -} -#[test] -fn bindgen_test_layout_cudaStreamAttrValue() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaStreamAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaStreamAttrValue)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessPolicyWindow as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).syncPolicy as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(syncPolicy) - ) - ); -} -#[repr(u32)] -#[non_exhaustive] -#[doc = " Flags for ::cudaStreamUpdateCaptureDependencies"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamUpdateCaptureDependenciesFlags { - #[doc = "< Add new nodes to the dependency set"] cudaStreamAddCaptureDependencies = 0, - #[doc = "< Replace the dependency set with the new nodes"] cudaStreamSetCaptureDependencies = 1, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for user objects for graphs"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaUserObjectFlags { - #[doc = "< Indicates the destructor execution is not synchronized by any CUDA handle."] cudaUserObjectNoDestructorSync = 1, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for retaining user object references for graphs"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaUserObjectRetainFlags { - #[doc = "< Transfer references from the caller rather than creating new references."] cudaGraphUserObjectMove = 1, } -#[doc = " CUDA graphics interop resource"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaGraphicsResource { @@ -1652,201 +1587,85 @@ pub struct cudaGraphicsResource { } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA graphics interop register flags"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphicsRegisterFlags { - #[doc = "< Default"] cudaGraphicsRegisterFlagsNone = 0, - #[doc = "< CUDA will not write to this resource"] cudaGraphicsRegisterFlagsReadOnly = 1, - #[doc = "< CUDA will only write to and will not read from this resource"] cudaGraphicsRegisterFlagsWriteDiscard = 2, - #[doc = "< CUDA will bind this resource to a surface reference"] cudaGraphicsRegisterFlagsSurfaceLoadStore = 4, - #[doc = "< CUDA will perform texture gather operations on this resource"] cudaGraphicsRegisterFlagsTextureGather = 8, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA graphics interop map flags"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphicsMapFlags { - #[doc = "< Default; Assume resource can be read/written"] cudaGraphicsMapFlagsNone = 0, - #[doc = "< CUDA will not write to this resource"] cudaGraphicsMapFlagsReadOnly = 1, - #[doc = "< CUDA will only write to and will not read from this resource"] cudaGraphicsMapFlagsWriteDiscard = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA graphics interop array indices for cube maps"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphicsCubeFace { - #[doc = "< Positive X face of cubemap"] cudaGraphicsCubeFacePositiveX = 0, - #[doc = "< Negative X face of cubemap"] cudaGraphicsCubeFaceNegativeX = 1, - #[doc = "< Positive Y face of cubemap"] cudaGraphicsCubeFacePositiveY = 2, - #[doc = "< Negative Y face of cubemap"] cudaGraphicsCubeFaceNegativeY = 3, - #[doc = "< Positive Z face of cubemap"] cudaGraphicsCubeFacePositiveZ = 4, - #[doc = "< Negative Z face of cubemap"] cudaGraphicsCubeFaceNegativeZ = 5, } #[repr(u32)] #[non_exhaustive] -#[doc = " Graph kernel node Attributes"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaKernelNodeAttrID { - #[doc = "< Identifier for ::cudaKernelNodeAttrValue::accessPolicyWindow."] - cudaKernelNodeAttributeAccessPolicyWindow = 1, - #[doc = "< Allows a kernel node to be cooperative (see ::cudaLaunchCooperativeKernel)."] - cudaKernelNodeAttributeCooperative = 2, -} -#[doc = " Graph kernel node attributes union, used with ::cudaGraphKernelNodeSetAttribute/::cudaGraphKernelNodeGetAttribute"] -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaKernelNodeAttrValue { - #[doc = "< Attribute ::CUaccessPolicyWindow."] - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub cooperative: ::libc::c_int, -} -#[test] -fn bindgen_test_layout_cudaKernelNodeAttrValue() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaKernelNodeAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaKernelNodeAttrValue)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessPolicyWindow as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperative as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(cooperative) - ) - ); -} -#[repr(u32)] -#[non_exhaustive] -#[doc = " CUDA resource types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaResourceType { - #[doc = "< Array resource"] cudaResourceTypeArray = 0, - #[doc = "< Mipmapped array resource"] cudaResourceTypeMipmappedArray = 1, - #[doc = "< Linear resource"] cudaResourceTypeLinear = 2, - #[doc = "< Pitch 2D resource"] cudaResourceTypePitch2D = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA texture resource view formats"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaResourceViewFormat { - #[doc = "< No resource view format (use underlying resource format)"] cudaResViewFormatNone = 0, - #[doc = "< 1 channel unsigned 8-bit integers"] cudaResViewFormatUnsignedChar1 = 1, - #[doc = "< 2 channel unsigned 8-bit integers"] cudaResViewFormatUnsignedChar2 = 2, - #[doc = "< 4 channel unsigned 8-bit integers"] cudaResViewFormatUnsignedChar4 = 3, - #[doc = "< 1 channel signed 8-bit integers"] cudaResViewFormatSignedChar1 = 4, - #[doc = "< 2 channel signed 8-bit integers"] cudaResViewFormatSignedChar2 = 5, - #[doc = "< 4 channel signed 8-bit integers"] cudaResViewFormatSignedChar4 = 6, - #[doc = "< 1 channel unsigned 16-bit integers"] cudaResViewFormatUnsignedShort1 = 7, - #[doc = "< 2 channel unsigned 16-bit integers"] cudaResViewFormatUnsignedShort2 = 8, - #[doc = "< 4 channel unsigned 16-bit integers"] cudaResViewFormatUnsignedShort4 = 9, - #[doc = "< 1 channel signed 16-bit integers"] cudaResViewFormatSignedShort1 = 10, - #[doc = "< 2 channel signed 16-bit integers"] cudaResViewFormatSignedShort2 = 11, - #[doc = "< 4 channel signed 16-bit integers"] cudaResViewFormatSignedShort4 = 12, - #[doc = "< 1 channel unsigned 32-bit integers"] cudaResViewFormatUnsignedInt1 = 13, - #[doc = "< 2 channel unsigned 32-bit integers"] cudaResViewFormatUnsignedInt2 = 14, - #[doc = "< 4 channel unsigned 32-bit integers"] cudaResViewFormatUnsignedInt4 = 15, - #[doc = "< 1 channel signed 32-bit integers"] cudaResViewFormatSignedInt1 = 16, - #[doc = "< 2 channel signed 32-bit integers"] cudaResViewFormatSignedInt2 = 17, - #[doc = "< 4 channel signed 32-bit integers"] cudaResViewFormatSignedInt4 = 18, - #[doc = "< 1 channel 16-bit floating point"] cudaResViewFormatHalf1 = 19, - #[doc = "< 2 channel 16-bit floating point"] cudaResViewFormatHalf2 = 20, - #[doc = "< 4 channel 16-bit floating point"] cudaResViewFormatHalf4 = 21, - #[doc = "< 1 channel 32-bit floating point"] cudaResViewFormatFloat1 = 22, - #[doc = "< 2 channel 32-bit floating point"] cudaResViewFormatFloat2 = 23, - #[doc = "< 4 channel 32-bit floating point"] cudaResViewFormatFloat4 = 24, - #[doc = "< Block compressed 1"] cudaResViewFormatUnsignedBlockCompressed1 = 25, - #[doc = "< Block compressed 2"] cudaResViewFormatUnsignedBlockCompressed2 = 26, - #[doc = "< Block compressed 3"] cudaResViewFormatUnsignedBlockCompressed3 = 27, - #[doc = "< Block compressed 4 unsigned"] cudaResViewFormatUnsignedBlockCompressed4 = 28, - #[doc = "< Block compressed 4 signed"] cudaResViewFormatSignedBlockCompressed4 = 29, - #[doc = "< Block compressed 5 unsigned"] cudaResViewFormatUnsignedBlockCompressed5 = 30, - #[doc = "< Block compressed 5 signed"] cudaResViewFormatSignedBlockCompressed5 = 31, - #[doc = "< Block compressed 6 unsigned half-float"] cudaResViewFormatUnsignedBlockCompressed6H = 32, - #[doc = "< Block compressed 6 signed half-float"] cudaResViewFormatSignedBlockCompressed6H = 33, - #[doc = "< Block compressed 7"] cudaResViewFormatUnsignedBlockCompressed7 = 34, } -#[doc = " CUDA resource descriptor"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaResourceDesc { - #[doc = "< Resource type"] pub resType: cudaResourceType, pub res: cudaResourceDesc__bindgen_ty_1, } @@ -1861,7 +1680,6 @@ pub union cudaResourceDesc__bindgen_ty_1 { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { - #[doc = "< CUDA array"] pub array: cudaArray_t, } #[test] @@ -1882,24 +1700,29 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_1() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).array - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(array) - ) - ); + fn test_field_array() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(array) + ) + ); + } + test_field_array(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { - #[doc = "< CUDA mipmapped array"] pub mipmap: cudaMipmappedArray_t, } #[test] @@ -1920,28 +1743,31 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_2() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmap - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(mipmap) - ) - ); + fn test_field_mipmap() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(mipmap) + ) + ); + } + test_field_mipmap(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { - #[doc = "< Device pointer"] pub devPtr: *mut ::libc::c_void, - #[doc = "< Channel descriptor"] pub desc: cudaChannelFormatDesc, - #[doc = "< Size in bytes"] pub sizeInBytes: usize, } #[test] @@ -1962,58 +1788,71 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_3() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).desc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(desc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sizeInBytes - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(sizeInBytes) - ) - ); + fn test_field_devPtr() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(devPtr) + ) + ); + } + test_field_devPtr(); + fn test_field_desc() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(desc) + ) + ); + } + test_field_desc(); + fn test_field_sizeInBytes() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(sizeInBytes) + ) + ); + } + test_field_sizeInBytes(); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { - #[doc = "< Device pointer"] pub devPtr: *mut ::libc::c_void, - #[doc = "< Channel descriptor"] pub desc: cudaChannelFormatDesc, - #[doc = "< Width of the array in elements"] pub width: usize, - #[doc = "< Height of the array in elements"] pub height: usize, - #[doc = "< Pitch between two rows in bytes"] pub pitchInBytes: usize, } #[test] @@ -2034,71 +1873,101 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_4() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devPtr - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(devPtr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).desc - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(desc) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).width - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).height - as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitchInBytes - as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(pitchInBytes) - ) - ); + fn test_field_devPtr() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(devPtr) + ) + ); + } + test_field_devPtr(); + fn test_field_desc() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(desc) + ) + ); + } + test_field_desc(); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_pitchInBytes() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit( + ); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(pitchInBytes) + ) + ); + } + test_field_pitchInBytes(); } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { @@ -2112,54 +1981,74 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { 8usize, concat!("Alignment of ", stringify!(cudaResourceDesc__bindgen_ty_1)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).array as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmap as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(mipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).linear as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(linear) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pitch2D as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(pitch2D) - ) - ); + fn test_field_array() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(array) + ) + ); + } + test_field_array(); + fn test_field_mipmap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(mipmap) + ) + ); + } + test_field_mipmap(); + fn test_field_linear() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(linear) + ) + ); + } + test_field_linear(); + fn test_field_pitch2D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(pitch2D) + ) + ); + } + test_field_pitch2D(); } #[test] fn bindgen_test_layout_cudaResourceDesc() { @@ -2173,46 +2062,51 @@ fn bindgen_test_layout_cudaResourceDesc() { 8usize, concat!("Alignment of ", stringify!(cudaResourceDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).resType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(resType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).res as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(res) - ) - ); + fn test_field_resType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(resType) + ) + ); + } + test_field_resType(); + fn test_field_res() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(res) + ) + ); + } + test_field_res(); } -#[doc = " CUDA resource view descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaResourceViewDesc { - #[doc = "< Resource view format"] pub format: cudaResourceViewFormat, - #[doc = "< Width of the resource view"] pub width: usize, - #[doc = "< Height of the resource view"] pub height: usize, - #[doc = "< Depth of the resource view"] pub depth: usize, - #[doc = "< First defined mipmap level"] pub firstMipmapLevel: ::libc::c_uint, - #[doc = "< Last defined mipmap level"] pub lastMipmapLevel: ::libc::c_uint, - #[doc = "< First layer index"] pub firstLayer: ::libc::c_uint, - #[doc = "< Last layer index"] pub lastLayer: ::libc::c_uint, } #[test] @@ -2227,114 +2121,149 @@ fn bindgen_test_layout_cudaResourceViewDesc() { 8usize, concat!("Alignment of ", stringify!(cudaResourceViewDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).depth as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).firstMipmapLevel as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstMipmapLevel) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).lastMipmapLevel as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastMipmapLevel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).firstLayer as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstLayer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lastLayer as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastLayer) - ) - ); + fn test_field_format() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(format) + ) + ); + } + test_field_format(); + fn test_field_width() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(width) + ) + ); + } + test_field_width(); + fn test_field_height() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(height) + ) + ); + } + test_field_height(); + fn test_field_depth() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(depth) + ) + ); + } + test_field_depth(); + fn test_field_firstMipmapLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstMipmapLevel) + ) + ); + } + test_field_firstMipmapLevel(); + fn test_field_lastMipmapLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastMipmapLevel) + ) + ); + } + test_field_lastMipmapLevel(); + fn test_field_firstLayer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstLayer) + ) + ); + } + test_field_firstLayer(); + fn test_field_lastLayer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastLayer) + ) + ); + } + test_field_lastLayer(); } -#[doc = " CUDA pointer attributes"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaPointerAttributes { - #[doc = " The type of memory - ::cudaMemoryTypeUnregistered, ::cudaMemoryTypeHost,"] - #[doc = " ::cudaMemoryTypeDevice or ::cudaMemoryTypeManaged."] pub type_: cudaMemoryType, - #[doc = " The device against which the memory was allocated or registered."] - #[doc = " If the memory type is ::cudaMemoryTypeDevice then this identifies"] - #[doc = " the device on which the memory referred physically resides. If"] - #[doc = " the memory type is ::cudaMemoryTypeHost or::cudaMemoryTypeManaged then"] - #[doc = " this identifies the device which was current when the memory was allocated"] - #[doc = " or registered (and if that device is deinitialized then this allocation"] - #[doc = " will vanish with that device's state)."] pub device: ::libc::c_int, - #[doc = " The address which may be dereferenced on the current device to access"] - #[doc = " the memory or NULL if no such address exists."] pub devicePointer: *mut ::libc::c_void, - #[doc = " The address which may be dereferenced on the host to access the"] - #[doc = " memory or NULL if no such address exists."] - #[doc = ""] - #[doc = " \\note CUDA doesn't check if unregistered memory is allocated so this field"] - #[doc = " may contain invalid pointer if an invalid pointer has been passed to CUDA."] pub hostPointer: *mut ::libc::c_void, } #[test] @@ -2349,90 +2278,87 @@ fn bindgen_test_layout_cudaPointerAttributes() { 8usize, concat!("Alignment of ", stringify!(cudaPointerAttributes)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).device as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(device) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).devicePointer as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(devicePointer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hostPointer as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(hostPointer) - ) - ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_device() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(device) + ) + ); + } + test_field_device(); + fn test_field_devicePointer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).devicePointer) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(devicePointer) + ) + ); + } + test_field_devicePointer(); + fn test_field_hostPointer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hostPointer) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(hostPointer) + ) + ); + } + test_field_hostPointer(); } -#[doc = " CUDA function attributes"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaFuncAttributes { - #[doc = " The size in bytes of statically-allocated shared memory per block"] - #[doc = " required by this function. This does not include dynamically-allocated"] - #[doc = " shared memory requested by the user at runtime."] pub sharedSizeBytes: usize, - #[doc = " The size in bytes of user-allocated constant memory required by this"] - #[doc = " function."] pub constSizeBytes: usize, - #[doc = " The size in bytes of local memory used by each thread of this function."] pub localSizeBytes: usize, - #[doc = " The maximum number of threads per block, beyond which a launch of the"] - #[doc = " function would fail. This number depends on both the function and the"] - #[doc = " device on which the function is currently loaded."] pub maxThreadsPerBlock: ::libc::c_int, - #[doc = " The number of registers used by each thread of this function."] pub numRegs: ::libc::c_int, - #[doc = " The PTX virtual architecture version for which the function was"] - #[doc = " compiled. This value is the major PTX version * 10 + the minor PTX"] - #[doc = " version, so a PTX version 1.3 function would return the value 13."] pub ptxVersion: ::libc::c_int, - #[doc = " The binary architecture version for which the function was compiled."] - #[doc = " This value is the major binary version * 10 + the minor binary version,"] - #[doc = " so a binary version 1.3 function would return the value 13."] pub binaryVersion: ::libc::c_int, - #[doc = " The attribute to indicate whether the function has been compiled with"] - #[doc = " user specified option \"-Xptxas --dlcm=ca\" set."] pub cacheModeCA: ::libc::c_int, - #[doc = " The maximum size in bytes of dynamic shared memory per block for"] - #[doc = " this function. Any launch must have a dynamic shared memory size"] - #[doc = " smaller than this value."] pub maxDynamicSharedSizeBytes: ::libc::c_int, - #[doc = " On devices where the L1 cache and shared memory use the same hardware resources,"] - #[doc = " this sets the shared memory carveout preference, in percent of the maximum shared memory."] - #[doc = " Refer to ::cudaDevAttrMaxSharedMemoryPerMultiprocessor."] - #[doc = " This is only a hint, and the driver can choose a different ratio if required to execute the function."] - #[doc = " See ::cudaFuncSetAttribute"] pub preferredShmemCarveout: ::libc::c_int, } #[test] @@ -2447,151 +2373,196 @@ fn bindgen_test_layout_cudaFuncAttributes() { 8usize, concat!("Alignment of ", stringify!(cudaFuncAttributes)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedSizeBytes as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(sharedSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).constSizeBytes as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(constSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).localSizeBytes as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(localSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).numRegs as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(numRegs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ptxVersion as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(ptxVersion) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).binaryVersion as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(binaryVersion) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cacheModeCA as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(cacheModeCA) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxDynamicSharedSizeBytes as *const _ - as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxDynamicSharedSizeBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).preferredShmemCarveout as *const _ - as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(preferredShmemCarveout) - ) - ); + fn test_field_sharedSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedSizeBytes) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(sharedSizeBytes) + ) + ); + } + test_field_sharedSizeBytes(); + fn test_field_constSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).constSizeBytes) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(constSizeBytes) + ) + ); + } + test_field_constSizeBytes(); + fn test_field_localSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).localSizeBytes) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(localSizeBytes) + ) + ); + } + test_field_localSizeBytes(); + fn test_field_maxThreadsPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + } + test_field_maxThreadsPerBlock(); + fn test_field_numRegs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numRegs) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(numRegs) + ) + ); + } + test_field_numRegs(); + fn test_field_ptxVersion() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ptxVersion) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(ptxVersion) + ) + ); + } + test_field_ptxVersion(); + fn test_field_binaryVersion() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).binaryVersion) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(binaryVersion) + ) + ); + } + test_field_binaryVersion(); + fn test_field_cacheModeCA() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cacheModeCA) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(cacheModeCA) + ) + ); + } + test_field_cacheModeCA(); + fn test_field_maxDynamicSharedSizeBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxDynamicSharedSizeBytes) as usize - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxDynamicSharedSizeBytes) + ) + ); + } + test_field_maxDynamicSharedSizeBytes(); + fn test_field_preferredShmemCarveout() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).preferredShmemCarveout) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(preferredShmemCarveout) + ) + ); + } + test_field_preferredShmemCarveout(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA function attributes that can be set using ::cudaFuncSetAttribute"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFuncAttribute { - #[doc = "< Maximum dynamic shared memory size"] cudaFuncAttributeMaxDynamicSharedMemorySize = 8, - #[doc = "< Preferred shared memory-L1 cache split"] cudaFuncAttributePreferredSharedMemoryCarveout = 9, cudaFuncAttributeMax = 10, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA function cache configurations"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFuncCache { - #[doc = "< Default function cache configuration, no preference"] cudaFuncCachePreferNone = 0, - #[doc = "< Prefer larger shared memory and smaller L1 cache"] cudaFuncCachePreferShared = 1, - #[doc = "< Prefer larger L1 cache and smaller shared memory"] cudaFuncCachePreferL1 = 2, - #[doc = "< Prefer equal size L1 cache and shared memory"] cudaFuncCachePreferEqual = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA shared memory configuration"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaSharedMemConfig { cudaSharedMemBankSizeDefault = 0, @@ -2600,421 +2571,235 @@ pub enum cudaSharedMemConfig { } #[repr(i32)] #[non_exhaustive] -#[doc = " Shared memory carveout configurations. These may be passed to cudaFuncSetAttribute"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaSharedCarveout { - #[doc = "< No preference for shared memory or L1 (default)"] cudaSharedmemCarveoutDefault = -1, - #[doc = "< Prefer maximum available shared memory, minimum L1 cache"] cudaSharedmemCarveoutMaxShared = 100, - #[doc = "< Prefer maximum available L1 cache, minimum shared memory"] cudaSharedmemCarveoutMaxL1 = 0, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA device compute modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaComputeMode { - #[doc = "< Default compute mode (Multiple threads can use ::cudaSetDevice() with this device)"] cudaComputeModeDefault = 0, - #[doc = "< Compute-exclusive-thread mode (Only one thread in one process will be able to use ::cudaSetDevice() with this device)"] cudaComputeModeExclusive = 1, - #[doc = "< Compute-prohibited mode (No threads can use ::cudaSetDevice() with this device)"] cudaComputeModeProhibited = 2, - #[doc = "< Compute-exclusive-process mode (Many threads in one process will be able to use ::cudaSetDevice() with this device)"] cudaComputeModeExclusiveProcess = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Limits"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaLimit { - #[doc = "< GPU thread stack size"] cudaLimitStackSize = 0, - #[doc = "< GPU printf FIFO size"] cudaLimitPrintfFifoSize = 1, - #[doc = "< GPU malloc heap size"] cudaLimitMallocHeapSize = 2, - #[doc = "< GPU device runtime synchronize depth"] cudaLimitDevRuntimeSyncDepth = 3, - #[doc = "< GPU device runtime pending launch count"] cudaLimitDevRuntimePendingLaunchCount = 4, - #[doc = "< A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint"] cudaLimitMaxL2FetchGranularity = 5, - #[doc = "< A size in bytes for L2 persisting lines cache size"] cudaLimitPersistingL2CacheSize = 6, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Memory Advise values"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemoryAdvise { - #[doc = "< Data will mostly be read and only occassionally be written to"] cudaMemAdviseSetReadMostly = 1, - #[doc = "< Undo the effect of ::cudaMemAdviseSetReadMostly"] cudaMemAdviseUnsetReadMostly = 2, - #[doc = "< Set the preferred location for the data as the specified device"] cudaMemAdviseSetPreferredLocation = 3, - #[doc = "< Clear the preferred location for the data"] cudaMemAdviseUnsetPreferredLocation = 4, - #[doc = "< Data will be accessed by the specified device, so prevent page faults as much as possible"] cudaMemAdviseSetAccessedBy = 5, - #[doc = "< Let the Unified Memory subsystem decide on the page faulting policy for the specified device"] cudaMemAdviseUnsetAccessedBy = 6, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA range attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemRangeAttribute { - #[doc = "< Whether the range will mostly be read and only occassionally be written to"] cudaMemRangeAttributeReadMostly = 1, - #[doc = "< The preferred location of the range"] cudaMemRangeAttributePreferredLocation = 2, - #[doc = "< Memory range has ::cudaMemAdviseSetAccessedBy set for specified device"] cudaMemRangeAttributeAccessedBy = 3, - #[doc = "< The last location to which the range was prefetched"] cudaMemRangeAttributeLastPrefetchLocation = 4, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Profiler Output modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaOutputMode { - #[doc = "< Output mode Key-Value pair format."] cudaKeyValuePair = 0, - #[doc = "< Output mode Comma separated values format."] cudaCSV = 1, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes APIs supported on the device"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFlushGPUDirectRDMAWritesOptions { - #[doc = "< ::cudaDeviceFlushGPUDirectRDMAWrites() and its CUDA Driver API counterpart are supported on the device."] cudaFlushGPUDirectRDMAWritesOptionHost = 1, - #[doc = "< The ::CU_STREAM_WAIT_VALUE_FLUSH flag and the ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the CUDA device."] cudaFlushGPUDirectRDMAWritesOptionMemOps = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes ordering features of the device"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGPUDirectRDMAWritesOrdering { - #[doc = "< The device does not natively support ordering of GPUDirect RDMA writes. ::cudaFlushGPUDirectRDMAWrites() can be leveraged if supported."] cudaGPUDirectRDMAWritesOrderingNone = 0, - #[doc = "< Natively, the device can consistently consume GPUDirect RDMA writes, although other CUDA devices may not."] cudaGPUDirectRDMAWritesOrderingOwner = 100, - #[doc = "< Any CUDA device in the system can consistently consume GPUDirect RDMA writes to this device."] cudaGPUDirectRDMAWritesOrderingAllDevices = 200, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes scopes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFlushGPUDirectRDMAWritesScope { - #[doc = "< Blocks until remote writes are visible to the CUDA device context owning the data."] cudaFlushGPUDirectRDMAWritesToOwner = 100, - #[doc = "< Blocks until remote writes are visible to all CUDA device contexts."] cudaFlushGPUDirectRDMAWritesToAllDevices = 200, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA GPUDirect RDMA flush writes targets"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaFlushGPUDirectRDMAWritesTarget { - #[doc = "< Sets the target for ::cudaDeviceFlushGPUDirectRDMAWrites() to the currently active CUDA device context."] cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0, } +impl cudaDeviceAttr { + pub const cudaDevAttrMaxTimelineSemaphoreInteropSupported: cudaDeviceAttr = + cudaDeviceAttr::cudaDevAttrTimelineSemaphoreInteropSupported; +} #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA device attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaDeviceAttr { - #[doc = "< Maximum number of threads per block"] cudaDevAttrMaxThreadsPerBlock = 1, - #[doc = "< Maximum block dimension X"] cudaDevAttrMaxBlockDimX = 2, - #[doc = "< Maximum block dimension Y"] cudaDevAttrMaxBlockDimY = 3, - #[doc = "< Maximum block dimension Z"] cudaDevAttrMaxBlockDimZ = 4, - #[doc = "< Maximum grid dimension X"] cudaDevAttrMaxGridDimX = 5, - #[doc = "< Maximum grid dimension Y"] cudaDevAttrMaxGridDimY = 6, - #[doc = "< Maximum grid dimension Z"] cudaDevAttrMaxGridDimZ = 7, - #[doc = "< Maximum shared memory available per block in bytes"] cudaDevAttrMaxSharedMemoryPerBlock = 8, - #[doc = "< Memory available on device for __constant__ variables in a CUDA C kernel in bytes"] cudaDevAttrTotalConstantMemory = 9, - #[doc = "< Warp size in threads"] cudaDevAttrWarpSize = 10, - #[doc = "< Maximum pitch in bytes allowed by memory copies"] cudaDevAttrMaxPitch = 11, - #[doc = "< Maximum number of 32-bit registers available per block"] cudaDevAttrMaxRegistersPerBlock = 12, - #[doc = "< Peak clock frequency in kilohertz"] cudaDevAttrClockRate = 13, - #[doc = "< Alignment requirement for textures"] cudaDevAttrTextureAlignment = 14, - #[doc = "< Device can possibly copy memory and execute a kernel concurrently"] cudaDevAttrGpuOverlap = 15, - #[doc = "< Number of multiprocessors on device"] cudaDevAttrMultiProcessorCount = 16, - #[doc = "< Specifies whether there is a run time limit on kernels"] cudaDevAttrKernelExecTimeout = 17, - #[doc = "< Device is integrated with host memory"] cudaDevAttrIntegrated = 18, - #[doc = "< Device can map host memory into CUDA address space"] cudaDevAttrCanMapHostMemory = 19, - #[doc = "< Compute mode (See ::cudaComputeMode for details)"] cudaDevAttrComputeMode = 20, - #[doc = "< Maximum 1D texture width"] cudaDevAttrMaxTexture1DWidth = 21, - #[doc = "< Maximum 2D texture width"] cudaDevAttrMaxTexture2DWidth = 22, - #[doc = "< Maximum 2D texture height"] cudaDevAttrMaxTexture2DHeight = 23, - #[doc = "< Maximum 3D texture width"] cudaDevAttrMaxTexture3DWidth = 24, - #[doc = "< Maximum 3D texture height"] cudaDevAttrMaxTexture3DHeight = 25, - #[doc = "< Maximum 3D texture depth"] cudaDevAttrMaxTexture3DDepth = 26, - #[doc = "< Maximum 2D layered texture width"] cudaDevAttrMaxTexture2DLayeredWidth = 27, - #[doc = "< Maximum 2D layered texture height"] cudaDevAttrMaxTexture2DLayeredHeight = 28, - #[doc = "< Maximum layers in a 2D layered texture"] cudaDevAttrMaxTexture2DLayeredLayers = 29, - #[doc = "< Alignment requirement for surfaces"] cudaDevAttrSurfaceAlignment = 30, - #[doc = "< Device can possibly execute multiple kernels concurrently"] cudaDevAttrConcurrentKernels = 31, - #[doc = "< Device has ECC support enabled"] cudaDevAttrEccEnabled = 32, - #[doc = "< PCI bus ID of the device"] cudaDevAttrPciBusId = 33, - #[doc = "< PCI device ID of the device"] cudaDevAttrPciDeviceId = 34, - #[doc = "< Device is using TCC driver model"] cudaDevAttrTccDriver = 35, - #[doc = "< Peak memory clock frequency in kilohertz"] cudaDevAttrMemoryClockRate = 36, - #[doc = "< Global memory bus width in bits"] cudaDevAttrGlobalMemoryBusWidth = 37, - #[doc = "< Size of L2 cache in bytes"] cudaDevAttrL2CacheSize = 38, - #[doc = "< Maximum resident threads per multiprocessor"] cudaDevAttrMaxThreadsPerMultiProcessor = 39, - #[doc = "< Number of asynchronous engines"] cudaDevAttrAsyncEngineCount = 40, - #[doc = "< Device shares a unified address space with the host"] cudaDevAttrUnifiedAddressing = 41, - #[doc = "< Maximum 1D layered texture width"] cudaDevAttrMaxTexture1DLayeredWidth = 42, - #[doc = "< Maximum layers in a 1D layered texture"] cudaDevAttrMaxTexture1DLayeredLayers = 43, - #[doc = "< Maximum 2D texture width if cudaArrayTextureGather is set"] cudaDevAttrMaxTexture2DGatherWidth = 45, - #[doc = "< Maximum 2D texture height if cudaArrayTextureGather is set"] cudaDevAttrMaxTexture2DGatherHeight = 46, - #[doc = "< Alternate maximum 3D texture width"] cudaDevAttrMaxTexture3DWidthAlt = 47, - #[doc = "< Alternate maximum 3D texture height"] cudaDevAttrMaxTexture3DHeightAlt = 48, - #[doc = "< Alternate maximum 3D texture depth"] cudaDevAttrMaxTexture3DDepthAlt = 49, - #[doc = "< PCI domain ID of the device"] cudaDevAttrPciDomainId = 50, - #[doc = "< Pitch alignment requirement for textures"] cudaDevAttrTexturePitchAlignment = 51, - #[doc = "< Maximum cubemap texture width/height"] cudaDevAttrMaxTextureCubemapWidth = 52, - #[doc = "< Maximum cubemap layered texture width/height"] cudaDevAttrMaxTextureCubemapLayeredWidth = 53, - #[doc = "< Maximum layers in a cubemap layered texture"] cudaDevAttrMaxTextureCubemapLayeredLayers = 54, - #[doc = "< Maximum 1D surface width"] cudaDevAttrMaxSurface1DWidth = 55, - #[doc = "< Maximum 2D surface width"] cudaDevAttrMaxSurface2DWidth = 56, - #[doc = "< Maximum 2D surface height"] cudaDevAttrMaxSurface2DHeight = 57, - #[doc = "< Maximum 3D surface width"] cudaDevAttrMaxSurface3DWidth = 58, - #[doc = "< Maximum 3D surface height"] cudaDevAttrMaxSurface3DHeight = 59, - #[doc = "< Maximum 3D surface depth"] cudaDevAttrMaxSurface3DDepth = 60, - #[doc = "< Maximum 1D layered surface width"] cudaDevAttrMaxSurface1DLayeredWidth = 61, - #[doc = "< Maximum layers in a 1D layered surface"] cudaDevAttrMaxSurface1DLayeredLayers = 62, - #[doc = "< Maximum 2D layered surface width"] cudaDevAttrMaxSurface2DLayeredWidth = 63, - #[doc = "< Maximum 2D layered surface height"] cudaDevAttrMaxSurface2DLayeredHeight = 64, - #[doc = "< Maximum layers in a 2D layered surface"] cudaDevAttrMaxSurface2DLayeredLayers = 65, - #[doc = "< Maximum cubemap surface width"] cudaDevAttrMaxSurfaceCubemapWidth = 66, - #[doc = "< Maximum cubemap layered surface width"] cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67, - #[doc = "< Maximum layers in a cubemap layered surface"] cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68, - #[doc = "< Maximum 1D linear texture width"] cudaDevAttrMaxTexture1DLinearWidth = 69, - #[doc = "< Maximum 2D linear texture width"] cudaDevAttrMaxTexture2DLinearWidth = 70, - #[doc = "< Maximum 2D linear texture height"] cudaDevAttrMaxTexture2DLinearHeight = 71, - #[doc = "< Maximum 2D linear texture pitch in bytes"] cudaDevAttrMaxTexture2DLinearPitch = 72, - #[doc = "< Maximum mipmapped 2D texture width"] cudaDevAttrMaxTexture2DMipmappedWidth = 73, - #[doc = "< Maximum mipmapped 2D texture height"] cudaDevAttrMaxTexture2DMipmappedHeight = 74, - #[doc = "< Major compute capability version number"] cudaDevAttrComputeCapabilityMajor = 75, - #[doc = "< Minor compute capability version number"] cudaDevAttrComputeCapabilityMinor = 76, - #[doc = "< Maximum mipmapped 1D texture width"] cudaDevAttrMaxTexture1DMipmappedWidth = 77, - #[doc = "< Device supports stream priorities"] cudaDevAttrStreamPrioritiesSupported = 78, - #[doc = "< Device supports caching globals in L1"] cudaDevAttrGlobalL1CacheSupported = 79, - #[doc = "< Device supports caching locals in L1"] cudaDevAttrLocalL1CacheSupported = 80, - #[doc = "< Maximum shared memory available per multiprocessor in bytes"] cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81, - #[doc = "< Maximum number of 32-bit registers available per multiprocessor"] cudaDevAttrMaxRegistersPerMultiprocessor = 82, - #[doc = "< Device can allocate managed memory on this system"] cudaDevAttrManagedMemory = 83, - #[doc = "< Device is on a multi-GPU board"] cudaDevAttrIsMultiGpuBoard = 84, - #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"] cudaDevAttrMultiGpuBoardGroupID = 85, - #[doc = "< Link between the device and the host supports native atomic operations"] cudaDevAttrHostNativeAtomicSupported = 86, - #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"] cudaDevAttrSingleToDoublePrecisionPerfRatio = 87, - #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"] cudaDevAttrPageableMemoryAccess = 88, - #[doc = "< Device can coherently access managed memory concurrently with the CPU"] cudaDevAttrConcurrentManagedAccess = 89, - #[doc = "< Device supports Compute Preemption"] cudaDevAttrComputePreemptionSupported = 90, - #[doc = "< Device can access host registered memory at the same virtual address as the CPU"] cudaDevAttrCanUseHostPointerForRegisteredMem = 91, cudaDevAttrReserved92 = 92, cudaDevAttrReserved93 = 93, cudaDevAttrReserved94 = 94, - #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"] cudaDevAttrCooperativeLaunch = 95, - #[doc = "< Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated."] cudaDevAttrCooperativeMultiDeviceLaunch = 96, - #[doc = "< The maximum optin shared memory per block. This value may vary by chip. See ::cudaFuncSetAttribute"] cudaDevAttrMaxSharedMemoryPerBlockOptin = 97, - #[doc = "< Device supports flushing of outstanding remote writes."] cudaDevAttrCanFlushRemoteWrites = 98, - #[doc = "< Device supports host memory registration via ::cudaHostRegister."] cudaDevAttrHostRegisterSupported = 99, - #[doc = "< Device accesses pageable memory via the host's page tables."] cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100, - #[doc = "< Host can directly access managed memory on the device without migration."] cudaDevAttrDirectManagedMemAccessFromHost = 101, - #[doc = "< Maximum number of blocks per multiprocessor"] cudaDevAttrMaxBlocksPerMultiprocessor = 106, - #[doc = "< Maximum L2 persisting lines capacity setting in bytes."] cudaDevAttrMaxPersistingL2CacheSize = 108, - #[doc = "< Maximum value of cudaAccessPolicyWindow::num_bytes."] cudaDevAttrMaxAccessPolicyWindowSize = 109, - #[doc = "< Shared memory reserved by CUDA driver per block in bytes"] cudaDevAttrReservedSharedMemoryPerBlock = 111, - #[doc = "< Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays"] cudaDevAttrSparseCudaArraySupported = 112, - #[doc = "< Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU"] cudaDevAttrHostRegisterReadOnlySupported = 113, - #[doc = "< External timeline semaphore interop is supported on the device"] - cudaDevAttrMaxTimelineSemaphoreInteropSupported = 114, - #[doc = "< Device supports using the ::cudaMallocAsync and ::cudaMemPool family of APIs"] + cudaDevAttrTimelineSemaphoreInteropSupported = 114, cudaDevAttrMemoryPoolsSupported = 115, - #[doc = "< Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)"] cudaDevAttrGPUDirectRDMASupported = 116, - #[doc = "< The returned attribute shall be interpreted as a bitmask, where the individual bits are listed in the ::cudaFlushGPUDirectRDMAWritesOptions enum"] cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117, - #[doc = "< GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See ::cudaGPUDirectRDMAWritesOrdering for the numerical values returned here."] cudaDevAttrGPUDirectRDMAWritesOrdering = 118, - #[doc = "< Handle types supported with mempool based IPC"] cudaDevAttrMemoryPoolSupportedHandleTypes = 119, - cudaDevAttrMax = 120, + cudaDevAttrDeferredMappingCudaArraySupported = 121, + cudaDevAttrMax = 122, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA memory pool attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemPoolAttr { - #[doc = " (value type = int)"] - #[doc = " Allow cuMemAllocAsync to use memory asynchronously freed"] - #[doc = " in another streams as long as a stream ordering dependency"] - #[doc = " of the allocating stream on the free action exists."] - #[doc = " Cuda events and null stream interactions can create the required"] - #[doc = " stream ordered dependencies. (default enabled)"] cudaMemPoolReuseFollowEventDependencies = 1, - #[doc = " (value type = int)"] - #[doc = " Allow reuse of already completed frees when there is no dependency"] - #[doc = " between the free and allocation. (default enabled)"] cudaMemPoolReuseAllowOpportunistic = 2, - #[doc = " (value type = int)"] - #[doc = " Allow cuMemAllocAsync to insert new stream dependencies"] - #[doc = " in order to establish the stream ordering required to reuse"] - #[doc = " a piece of memory released by cuFreeAsync (default enabled)."] cudaMemPoolReuseAllowInternalDependencies = 3, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of reserved memory in bytes to hold onto before trying"] - #[doc = " to release memory back to the OS. When more than the release"] - #[doc = " threshold bytes of memory are held by the memory pool, the"] - #[doc = " allocator will try to release memory back to the OS on the"] - #[doc = " next call to stream, event or context synchronize. (default 0)"] cudaMemPoolAttrReleaseThreshold = 4, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of backing memory currently allocated for the mempool."] cudaMemPoolAttrReservedMemCurrent = 5, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of backing memory allocated for the mempool since the"] - #[doc = " last time it was reset. High watermark can only be reset to zero."] cudaMemPoolAttrReservedMemHigh = 6, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of memory from the pool that is currently in use by the application."] cudaMemPoolAttrUsedMemCurrent = 7, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of the amount of memory from the pool that was in use by the application since"] - #[doc = " the last time it was reset. High watermark can only be reset to zero."] cudaMemPoolAttrUsedMemHigh = 8, } #[repr(u32)] #[non_exhaustive] -#[doc = " Specifies the type of location"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemLocationType { cudaMemLocationTypeInvalid = 0, - #[doc = "< Location is a device location, thus id is a device ordinal"] cudaMemLocationTypeDevice = 1, } -#[doc = " Specifies a memory location."] -#[doc = ""] -#[doc = " To specify a gpu, set type = ::cudaMemLocationTypeDevice and set id = the gpu's device ordinal."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemLocation { - #[doc = "< Specifies the location type, which modifies the meaning of id."] pub type_: cudaMemLocationType, - #[doc = "< identifier for a given this location's ::CUmemLocationType."] pub id: ::libc::c_int, } #[test] @@ -3029,46 +2814,53 @@ fn bindgen_test_layout_cudaMemLocation() { 4usize, concat!("Alignment of ", stringify!(cudaMemLocation)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(id) - ) - ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemLocation), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_id() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemLocation), + "::", + stringify!(id) + ) + ); + } + test_field_id(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Specifies the memory protection flags for mapping."] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemAccessFlags { - #[doc = "< Default, make the address range not accessible"] cudaMemAccessFlagsProtNone = 0, - #[doc = "< Make the address range read accessible"] cudaMemAccessFlagsProtRead = 1, - #[doc = "< Make the address range read-write accessible"] cudaMemAccessFlagsProtReadWrite = 3, } -#[doc = " Memory access descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaMemAccessDesc { - #[doc = "< Location on which the request is to change it's accessibility"] pub location: cudaMemLocation, - #[doc = "< ::CUmemProt accessibility flags to set on the request"] pub flags: cudaMemAccessFlags, } #[test] @@ -3083,70 +2875,65 @@ fn bindgen_test_layout_cudaMemAccessDesc() { 4usize, concat!("Alignment of ", stringify!(cudaMemAccessDesc)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(location) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(flags) - ) - ); + fn test_field_location() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(location) + ) + ); + } + test_field_location(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Defines the allocation types available"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemAllocationType { cudaMemAllocationTypeInvalid = 0, - #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current"] - #[doc = " location while the application is actively using it"] cudaMemAllocationTypePinned = 1, - #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current"] - #[doc = " location while the application is actively using it"] cudaMemAllocationTypeMax = 2147483647, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for specifying particular handle types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaMemAllocationHandleType { - #[doc = "< Does not allow any export mechanism. >"] cudaMemHandleTypeNone = 0, - #[doc = "< Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)"] cudaMemHandleTypePosixFileDescriptor = 1, - #[doc = "< Allows a Win32 NT handle to be used for exporting. (HANDLE)"] cudaMemHandleTypeWin32 = 2, - #[doc = "< Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)"] cudaMemHandleTypeWin32Kmt = 4, } -#[doc = " Specifies the properties of allocations made from the pool."] #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct cudaMemPoolProps { - #[doc = "< Allocation type. Currently must be specified as cudaMemAllocationTypePinned"] pub allocType: cudaMemAllocationType, - #[doc = "< Handle types that will be supported by allocations from the pool."] pub handleTypes: cudaMemAllocationHandleType, - #[doc = "< Location allocations should reside."] pub location: cudaMemLocation, - #[doc = " Windows-specific LPSECURITYATTRIBUTES required when"] - #[doc = " ::cudaMemHandleTypeWin32 is specified. This security attribute defines"] - #[doc = " the scope of which exported allocations may be tranferred to other"] - #[doc = " processes. In all other cases, this field is required to be zero."] pub win32SecurityAttributes: *mut ::libc::c_void, - #[doc = "< reserved for future use, must be 0"] pub reserved: [::libc::c_uchar; 64usize], } #[test] @@ -3161,63 +2948,94 @@ fn bindgen_test_layout_cudaMemPoolProps() { 8usize, concat!("Alignment of ", stringify!(cudaMemPoolProps)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).allocType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(allocType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).handleTypes as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(handleTypes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).location as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(location) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32SecurityAttributes as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(win32SecurityAttributes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(reserved) - ) - ); + fn test_field_allocType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).allocType) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(allocType) + ) + ); + } + test_field_allocType(); + fn test_field_handleTypes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handleTypes) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(handleTypes) + ) + ); + } + test_field_handleTypes(); + fn test_field_location() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(location) + ) + ); + } + test_field_location(); + fn test_field_win32SecurityAttributes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).win32SecurityAttributes) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(win32SecurityAttributes) + ) + ); + } + test_field_win32SecurityAttributes(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Opaque data for exporting a pool allocation"] #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct cudaMemPoolPtrExportData { pub reserved: [::libc::c_uchar; 64usize], } @@ -3233,32 +3051,31 @@ fn bindgen_test_layout_cudaMemPoolPtrExportData() { 1usize, concat!("Alignment of ", stringify!(cudaMemPoolPtrExportData)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolPtrExportData), - "::", - stringify!(reserved) - ) - ); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolPtrExportData), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Memory allocation node parameters"] #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct cudaMemAllocNodeParams { - #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"] pub poolProps: cudaMemPoolProps, - #[doc = "< in: number of memory access descriptors. Must not exceed the number of GPUs."] pub accessDescs: *const cudaMemAccessDesc, - #[doc = "< in: Number of `accessDescs`s"] pub accessDescCount: usize, - #[doc = "< in: size in bytes of the requested allocation"] pub bytesize: usize, - #[doc = "< out: address of the allocation returned by CUDA"] pub dptr: *mut ::libc::c_void, } #[test] @@ -3273,96 +3090,108 @@ fn bindgen_test_layout_cudaMemAllocNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaMemAllocNodeParams)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).poolProps as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(poolProps) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessDescs as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessDescCount as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescCount) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytesize as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(bytesize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dptr as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(dptr) - ) - ); + fn test_field_poolProps() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(poolProps) + ) + ); + } + test_field_poolProps(); + fn test_field_accessDescs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescs) + ) + ); + } + test_field_accessDescs(); + fn test_field_accessDescCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescCount) + ) + ); + } + test_field_accessDescCount(); + fn test_field_bytesize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(bytesize) + ) + ); + } + test_field_bytesize(); + fn test_field_dptr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize + }, + 112usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(dptr) + ) + ); + } + test_field_dptr(); } #[repr(u32)] #[non_exhaustive] -#[doc = " Graph memory attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphMemAttributeType { - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of memory, in bytes, currently associated with graphs."] - cudaGraphMemAttrUsedMemCurrent = 1, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of memory, in bytes, associated with graphs since the"] - #[doc = " last time it was reset. High watermark can only be reset to zero."] - cudaGraphMemAttrUsedMemHigh = 2, - #[doc = " (value type = cuuint64_t)"] - #[doc = " Amount of memory, in bytes, currently allocated for use by"] - #[doc = " the CUDA graphs asynchronous allocator."] - cudaGraphMemAttrReservedMemCurrent = 3, - #[doc = " (value type = cuuint64_t)"] - #[doc = " High watermark of memory, in bytes, currently allocated for use by"] - #[doc = " the CUDA graphs asynchronous allocator."] - cudaGraphMemAttrReservedMemHigh = 4, + cudaGraphMemAttrUsedMemCurrent = 0, + cudaGraphMemAttrUsedMemHigh = 1, + cudaGraphMemAttrReservedMemCurrent = 2, + cudaGraphMemAttrReservedMemHigh = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA device P2P attributes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaDeviceP2PAttr { - #[doc = "< A relative value indicating the performance of the link between two devices"] cudaDevP2PAttrPerformanceRank = 1, - #[doc = "< Peer access is enabled"] cudaDevP2PAttrAccessSupported = 2, - #[doc = "< Native atomic operation over the link supported"] cudaDevP2PAttrNativeAtomicSupported = 3, - #[doc = "< Accessing CUDA arrays over the link supported"] cudaDevP2PAttrCudaArrayAccessSupported = 4, } #[repr(C)] @@ -3382,182 +3211,108 @@ fn bindgen_test_layout_CUuuid_st() { 1usize, concat!("Alignment of ", stringify!(CUuuid_st)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bytes as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUuuid_st), - "::", - stringify!(bytes) - ) - ); + fn test_field_bytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUuuid_st), + "::", + stringify!(bytes) + ) + ); + } + test_field_bytes(); } pub type CUuuid = CUuuid_st; pub type cudaUUID_t = CUuuid_st; -#[doc = " CUDA device properties"] #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct cudaDeviceProp { - #[doc = "< ASCII string identifying device"] pub name: [::libc::c_char; 256usize], - #[doc = "< 16-byte unique identifier"] pub uuid: cudaUUID_t, - #[doc = "< 8-byte locally unique identifier. Value is undefined on TCC and non-Windows platforms"] pub luid: [::libc::c_char; 8usize], - #[doc = "< LUID device node mask. Value is undefined on TCC and non-Windows platforms"] pub luidDeviceNodeMask: ::libc::c_uint, - #[doc = "< Global memory available on device in bytes"] pub totalGlobalMem: usize, - #[doc = "< Shared memory available per block in bytes"] pub sharedMemPerBlock: usize, - #[doc = "< 32-bit registers available per block"] pub regsPerBlock: ::libc::c_int, - #[doc = "< Warp size in threads"] pub warpSize: ::libc::c_int, - #[doc = "< Maximum pitch in bytes allowed by memory copies"] pub memPitch: usize, - #[doc = "< Maximum number of threads per block"] pub maxThreadsPerBlock: ::libc::c_int, - #[doc = "< Maximum size of each dimension of a block"] pub maxThreadsDim: [::libc::c_int; 3usize], - #[doc = "< Maximum size of each dimension of a grid"] pub maxGridSize: [::libc::c_int; 3usize], - #[doc = "< Clock frequency in kilohertz"] pub clockRate: ::libc::c_int, - #[doc = "< Constant memory available on device in bytes"] pub totalConstMem: usize, - #[doc = "< Major compute capability"] pub major: ::libc::c_int, - #[doc = "< Minor compute capability"] pub minor: ::libc::c_int, - #[doc = "< Alignment requirement for textures"] pub textureAlignment: usize, - #[doc = "< Pitch alignment requirement for texture references bound to pitched memory"] pub texturePitchAlignment: usize, - #[doc = "< Device can concurrently copy memory and execute a kernel. Deprecated. Use instead asyncEngineCount."] pub deviceOverlap: ::libc::c_int, - #[doc = "< Number of multiprocessors on device"] pub multiProcessorCount: ::libc::c_int, - #[doc = "< Specified whether there is a run time limit on kernels"] pub kernelExecTimeoutEnabled: ::libc::c_int, - #[doc = "< Device is integrated as opposed to discrete"] pub integrated: ::libc::c_int, - #[doc = "< Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer"] pub canMapHostMemory: ::libc::c_int, - #[doc = "< Compute mode (See ::cudaComputeMode)"] pub computeMode: ::libc::c_int, - #[doc = "< Maximum 1D texture size"] pub maxTexture1D: ::libc::c_int, - #[doc = "< Maximum 1D mipmapped texture size"] pub maxTexture1DMipmap: ::libc::c_int, - #[doc = "< Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead."] pub maxTexture1DLinear: ::libc::c_int, - #[doc = "< Maximum 2D texture dimensions"] pub maxTexture2D: [::libc::c_int; 2usize], - #[doc = "< Maximum 2D mipmapped texture dimensions"] pub maxTexture2DMipmap: [::libc::c_int; 2usize], - #[doc = "< Maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory"] pub maxTexture2DLinear: [::libc::c_int; 3usize], - #[doc = "< Maximum 2D texture dimensions if texture gather operations have to be performed"] pub maxTexture2DGather: [::libc::c_int; 2usize], - #[doc = "< Maximum 3D texture dimensions"] pub maxTexture3D: [::libc::c_int; 3usize], - #[doc = "< Maximum alternate 3D texture dimensions"] pub maxTexture3DAlt: [::libc::c_int; 3usize], - #[doc = "< Maximum Cubemap texture dimensions"] pub maxTextureCubemap: ::libc::c_int, - #[doc = "< Maximum 1D layered texture dimensions"] pub maxTexture1DLayered: [::libc::c_int; 2usize], - #[doc = "< Maximum 2D layered texture dimensions"] pub maxTexture2DLayered: [::libc::c_int; 3usize], - #[doc = "< Maximum Cubemap layered texture dimensions"] pub maxTextureCubemapLayered: [::libc::c_int; 2usize], - #[doc = "< Maximum 1D surface size"] pub maxSurface1D: ::libc::c_int, - #[doc = "< Maximum 2D surface dimensions"] pub maxSurface2D: [::libc::c_int; 2usize], - #[doc = "< Maximum 3D surface dimensions"] pub maxSurface3D: [::libc::c_int; 3usize], - #[doc = "< Maximum 1D layered surface dimensions"] pub maxSurface1DLayered: [::libc::c_int; 2usize], - #[doc = "< Maximum 2D layered surface dimensions"] pub maxSurface2DLayered: [::libc::c_int; 3usize], - #[doc = "< Maximum Cubemap surface dimensions"] pub maxSurfaceCubemap: ::libc::c_int, - #[doc = "< Maximum Cubemap layered surface dimensions"] pub maxSurfaceCubemapLayered: [::libc::c_int; 2usize], - #[doc = "< Alignment requirements for surfaces"] pub surfaceAlignment: usize, - #[doc = "< Device can possibly execute multiple kernels concurrently"] pub concurrentKernels: ::libc::c_int, - #[doc = "< Device has ECC support enabled"] pub ECCEnabled: ::libc::c_int, - #[doc = "< PCI bus ID of the device"] pub pciBusID: ::libc::c_int, - #[doc = "< PCI device ID of the device"] pub pciDeviceID: ::libc::c_int, - #[doc = "< PCI domain ID of the device"] pub pciDomainID: ::libc::c_int, - #[doc = "< 1 if device is a Tesla device using TCC driver, 0 otherwise"] pub tccDriver: ::libc::c_int, - #[doc = "< Number of asynchronous engines"] pub asyncEngineCount: ::libc::c_int, - #[doc = "< Device shares a unified address space with the host"] pub unifiedAddressing: ::libc::c_int, - #[doc = "< Peak memory clock frequency in kilohertz"] pub memoryClockRate: ::libc::c_int, - #[doc = "< Global memory bus width in bits"] pub memoryBusWidth: ::libc::c_int, - #[doc = "< Size of L2 cache in bytes"] pub l2CacheSize: ::libc::c_int, - #[doc = "< Device's maximum l2 persisting lines capacity setting in bytes"] pub persistingL2CacheMaxSize: ::libc::c_int, - #[doc = "< Maximum resident threads per multiprocessor"] pub maxThreadsPerMultiProcessor: ::libc::c_int, - #[doc = "< Device supports stream priorities"] pub streamPrioritiesSupported: ::libc::c_int, - #[doc = "< Device supports caching globals in L1"] pub globalL1CacheSupported: ::libc::c_int, - #[doc = "< Device supports caching locals in L1"] pub localL1CacheSupported: ::libc::c_int, - #[doc = "< Shared memory available per multiprocessor in bytes"] pub sharedMemPerMultiprocessor: usize, - #[doc = "< 32-bit registers available per multiprocessor"] pub regsPerMultiprocessor: ::libc::c_int, - #[doc = "< Device supports allocating managed memory on this system"] pub managedMemory: ::libc::c_int, - #[doc = "< Device is on a multi-GPU board"] pub isMultiGpuBoard: ::libc::c_int, - #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"] pub multiGpuBoardGroupID: ::libc::c_int, - #[doc = "< Link between the device and the host supports native atomic operations"] pub hostNativeAtomicSupported: ::libc::c_int, - #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"] pub singleToDoublePrecisionPerfRatio: ::libc::c_int, - #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"] pub pageableMemoryAccess: ::libc::c_int, - #[doc = "< Device can coherently access managed memory concurrently with the CPU"] pub concurrentManagedAccess: ::libc::c_int, - #[doc = "< Device supports Compute Preemption"] pub computePreemptionSupported: ::libc::c_int, - #[doc = "< Device can access host registered memory at the same virtual address as the CPU"] pub canUseHostPointerForRegisteredMem: ::libc::c_int, - #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"] pub cooperativeLaunch: ::libc::c_int, - #[doc = "< Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated."] pub cooperativeMultiDeviceLaunch: ::libc::c_int, - #[doc = "< Per device maximum shared memory per block usable by special opt in"] pub sharedMemPerBlockOptin: usize, - #[doc = "< Device accesses pageable memory via the host's page tables"] pub pageableMemoryAccessUsesHostPageTables: ::libc::c_int, - #[doc = "< Host can directly access managed memory on the device without migration."] pub directManagedMemAccessFromHost: ::libc::c_int, - #[doc = "< Maximum number of resident blocks per multiprocessor"] pub maxBlocksPerMultiProcessor: ::libc::c_int, - #[doc = "< The maximum value of ::cudaAccessPolicyWindow::num_bytes."] pub accessPolicyMaxWindowSize: ::libc::c_int, - #[doc = "< Shared memory reserved by CUDA driver per block in bytes"] pub reservedSharedMemPerBlock: usize, } #[test] @@ -3572,1596 +3327,2709 @@ fn bindgen_test_layout_cudaDeviceProp() { 8usize, concat!("Alignment of ", stringify!(cudaDeviceProp)) ); + fn test_field_name() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(name) + ) + ); + } + test_field_name(); + fn test_field_uuid() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize + }, + 256usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(uuid) + ) + ); + } + test_field_uuid(); + fn test_field_luid() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).luid) as usize - ptr as usize + }, + 272usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luid) + ) + ); + } + test_field_luid(); + fn test_field_luidDeviceNodeMask() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).luidDeviceNodeMask) as usize - ptr as usize + }, + 280usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luidDeviceNodeMask) + ) + ); + } + test_field_luidDeviceNodeMask(); + fn test_field_totalGlobalMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).totalGlobalMem) as usize - ptr as usize + }, + 288usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalGlobalMem) + ) + ); + } + test_field_totalGlobalMem(); + fn test_field_sharedMemPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemPerBlock) as usize - ptr as usize + }, + 296usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlock) + ) + ); + } + test_field_sharedMemPerBlock(); + fn test_field_regsPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).regsPerBlock) as usize - ptr as usize + }, + 304usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerBlock) + ) + ); + } + test_field_regsPerBlock(); + fn test_field_warpSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).warpSize) as usize - ptr as usize + }, + 308usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(warpSize) + ) + ); + } + test_field_warpSize(); + fn test_field_memPitch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memPitch) as usize - ptr as usize + }, + 312usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memPitch) + ) + ); + } + test_field_memPitch(); + fn test_field_maxThreadsPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize + }, + 320usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + } + test_field_maxThreadsPerBlock(); + fn test_field_maxThreadsDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsDim) as usize - ptr as usize + }, + 324usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsDim) + ) + ); + } + test_field_maxThreadsDim(); + fn test_field_maxGridSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxGridSize) as usize - ptr as usize + }, + 336usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxGridSize) + ) + ); + } + test_field_maxGridSize(); + fn test_field_clockRate() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).clockRate) as usize - ptr as usize + }, + 348usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(clockRate) + ) + ); + } + test_field_clockRate(); + fn test_field_totalConstMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).totalConstMem) as usize - ptr as usize + }, + 352usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalConstMem) + ) + ); + } + test_field_totalConstMem(); + fn test_field_major() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize + }, + 360usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(major) + ) + ); + } + test_field_major(); + fn test_field_minor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize + }, + 364usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(minor) + ) + ); + } + test_field_minor(); + fn test_field_textureAlignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).textureAlignment) as usize - ptr as usize + }, + 368usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(textureAlignment) + ) + ); + } + test_field_textureAlignment(); + fn test_field_texturePitchAlignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).texturePitchAlignment) as usize - ptr as usize + }, + 376usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(texturePitchAlignment) + ) + ); + } + test_field_texturePitchAlignment(); + fn test_field_deviceOverlap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).deviceOverlap) as usize - ptr as usize + }, + 384usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(deviceOverlap) + ) + ); + } + test_field_deviceOverlap(); + fn test_field_multiProcessorCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).multiProcessorCount) as usize - ptr as usize + }, + 388usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiProcessorCount) + ) + ); + } + test_field_multiProcessorCount(); + fn test_field_kernelExecTimeoutEnabled() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).kernelExecTimeoutEnabled) as usize - ptr as usize + }, + 392usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(kernelExecTimeoutEnabled) + ) + ); + } + test_field_kernelExecTimeoutEnabled(); + fn test_field_integrated() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).integrated) as usize - ptr as usize + }, + 396usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(integrated) + ) + ); + } + test_field_integrated(); + fn test_field_canMapHostMemory() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).canMapHostMemory) as usize - ptr as usize + }, + 400usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canMapHostMemory) + ) + ); + } + test_field_canMapHostMemory(); + fn test_field_computeMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).computeMode) as usize - ptr as usize + }, + 404usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computeMode) + ) + ); + } + test_field_computeMode(); + fn test_field_maxTexture1D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1D) as usize - ptr as usize + }, + 408usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1D) + ) + ); + } + test_field_maxTexture1D(); + fn test_field_maxTexture1DMipmap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1DMipmap) as usize - ptr as usize + }, + 412usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DMipmap) + ) + ); + } + test_field_maxTexture1DMipmap(); + fn test_field_maxTexture1DLinear() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1DLinear) as usize - ptr as usize + }, + 416usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLinear) + ) + ); + } + test_field_maxTexture1DLinear(); + fn test_field_maxTexture2D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2D) as usize - ptr as usize + }, + 420usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2D) + ) + ); + } + test_field_maxTexture2D(); + fn test_field_maxTexture2DMipmap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DMipmap) as usize - ptr as usize + }, + 428usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DMipmap) + ) + ); + } + test_field_maxTexture2DMipmap(); + fn test_field_maxTexture2DLinear() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DLinear) as usize - ptr as usize + }, + 436usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLinear) + ) + ); + } + test_field_maxTexture2DLinear(); + fn test_field_maxTexture2DGather() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DGather) as usize - ptr as usize + }, + 448usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DGather) + ) + ); + } + test_field_maxTexture2DGather(); + fn test_field_maxTexture3D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture3D) as usize - ptr as usize + }, + 456usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3D) + ) + ); + } + test_field_maxTexture3D(); + fn test_field_maxTexture3DAlt() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture3DAlt) as usize - ptr as usize + }, + 468usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3DAlt) + ) + ); + } + test_field_maxTexture3DAlt(); + fn test_field_maxTextureCubemap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTextureCubemap) as usize - ptr as usize + }, + 480usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemap) + ) + ); + } + test_field_maxTextureCubemap(); + fn test_field_maxTexture1DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture1DLayered) as usize - ptr as usize + }, + 484usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLayered) + ) + ); + } + test_field_maxTexture1DLayered(); + fn test_field_maxTexture2DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTexture2DLayered) as usize - ptr as usize + }, + 492usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLayered) + ) + ); + } + test_field_maxTexture2DLayered(); + fn test_field_maxTextureCubemapLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxTextureCubemapLayered) as usize - ptr as usize + }, + 504usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemapLayered) + ) + ); + } + test_field_maxTextureCubemapLayered(); + fn test_field_maxSurface1D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface1D) as usize - ptr as usize + }, + 512usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1D) + ) + ); + } + test_field_maxSurface1D(); + fn test_field_maxSurface2D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface2D) as usize - ptr as usize + }, + 516usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2D) + ) + ); + } + test_field_maxSurface2D(); + fn test_field_maxSurface3D() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface3D) as usize - ptr as usize + }, + 524usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface3D) + ) + ); + } + test_field_maxSurface3D(); + fn test_field_maxSurface1DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface1DLayered) as usize - ptr as usize + }, + 536usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1DLayered) + ) + ); + } + test_field_maxSurface1DLayered(); + fn test_field_maxSurface2DLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurface2DLayered) as usize - ptr as usize + }, + 544usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2DLayered) + ) + ); + } + test_field_maxSurface2DLayered(); + fn test_field_maxSurfaceCubemap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurfaceCubemap) as usize - ptr as usize + }, + 556usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemap) + ) + ); + } + test_field_maxSurfaceCubemap(); + fn test_field_maxSurfaceCubemapLayered() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxSurfaceCubemapLayered) as usize - ptr as usize + }, + 560usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemapLayered) + ) + ); + } + test_field_maxSurfaceCubemapLayered(); + fn test_field_surfaceAlignment() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).surfaceAlignment) as usize - ptr as usize + }, + 568usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(surfaceAlignment) + ) + ); + } + test_field_surfaceAlignment(); + fn test_field_concurrentKernels() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).concurrentKernels) as usize - ptr as usize + }, + 576usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentKernels) + ) + ); + } + test_field_concurrentKernels(); + fn test_field_ECCEnabled() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ECCEnabled) as usize - ptr as usize + }, + 580usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(ECCEnabled) + ) + ); + } + test_field_ECCEnabled(); + fn test_field_pciBusID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pciBusID) as usize - ptr as usize + }, + 584usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciBusID) + ) + ); + } + test_field_pciBusID(); + fn test_field_pciDeviceID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pciDeviceID) as usize - ptr as usize + }, + 588usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDeviceID) + ) + ); + } + test_field_pciDeviceID(); + fn test_field_pciDomainID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pciDomainID) as usize - ptr as usize + }, + 592usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDomainID) + ) + ); + } + test_field_pciDomainID(); + fn test_field_tccDriver() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).tccDriver) as usize - ptr as usize + }, + 596usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(tccDriver) + ) + ); + } + test_field_tccDriver(); + fn test_field_asyncEngineCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).asyncEngineCount) as usize - ptr as usize + }, + 600usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(asyncEngineCount) + ) + ); + } + test_field_asyncEngineCount(); + fn test_field_unifiedAddressing() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).unifiedAddressing) as usize - ptr as usize + }, + 604usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(unifiedAddressing) + ) + ); + } + test_field_unifiedAddressing(); + fn test_field_memoryClockRate() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memoryClockRate) as usize - ptr as usize + }, + 608usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryClockRate) + ) + ); + } + test_field_memoryClockRate(); + fn test_field_memoryBusWidth() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memoryBusWidth) as usize - ptr as usize + }, + 612usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryBusWidth) + ) + ); + } + test_field_memoryBusWidth(); + fn test_field_l2CacheSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).l2CacheSize) as usize - ptr as usize + }, + 616usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(l2CacheSize) + ) + ); + } + test_field_l2CacheSize(); + fn test_field_persistingL2CacheMaxSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).persistingL2CacheMaxSize) as usize - ptr as usize + }, + 620usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(persistingL2CacheMaxSize) + ) + ); + } + test_field_persistingL2CacheMaxSize(); + fn test_field_maxThreadsPerMultiProcessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxThreadsPerMultiProcessor) as usize - ptr as usize + }, + 624usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerMultiProcessor) + ) + ); + } + test_field_maxThreadsPerMultiProcessor(); + fn test_field_streamPrioritiesSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).streamPrioritiesSupported) as usize - ptr as usize + }, + 628usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(streamPrioritiesSupported) + ) + ); + } + test_field_streamPrioritiesSupported(); + fn test_field_globalL1CacheSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).globalL1CacheSupported) as usize - ptr as usize + }, + 632usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(globalL1CacheSupported) + ) + ); + } + test_field_globalL1CacheSupported(); + fn test_field_localL1CacheSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).localL1CacheSupported) as usize - ptr as usize + }, + 636usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(localL1CacheSupported) + ) + ); + } + test_field_localL1CacheSupported(); + fn test_field_sharedMemPerMultiprocessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemPerMultiprocessor) as usize - ptr as usize + }, + 640usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerMultiprocessor) + ) + ); + } + test_field_sharedMemPerMultiprocessor(); + fn test_field_regsPerMultiprocessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).regsPerMultiprocessor) as usize - ptr as usize + }, + 648usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerMultiprocessor) + ) + ); + } + test_field_regsPerMultiprocessor(); + fn test_field_managedMemory() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).managedMemory) as usize - ptr as usize + }, + 652usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(managedMemory) + ) + ); + } + test_field_managedMemory(); + fn test_field_isMultiGpuBoard() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).isMultiGpuBoard) as usize - ptr as usize + }, + 656usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(isMultiGpuBoard) + ) + ); + } + test_field_isMultiGpuBoard(); + fn test_field_multiGpuBoardGroupID() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).multiGpuBoardGroupID) as usize - ptr as usize + }, + 660usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiGpuBoardGroupID) + ) + ); + } + test_field_multiGpuBoardGroupID(); + fn test_field_hostNativeAtomicSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).hostNativeAtomicSupported) as usize - ptr as usize + }, + 664usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostNativeAtomicSupported) + ) + ); + } + test_field_hostNativeAtomicSupported(); + fn test_field_singleToDoublePrecisionPerfRatio() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).singleToDoublePrecisionPerfRatio) as usize + - ptr as usize + }, + 668usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(singleToDoublePrecisionPerfRatio) + ) + ); + } + test_field_singleToDoublePrecisionPerfRatio(); + fn test_field_pageableMemoryAccess() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pageableMemoryAccess) as usize - ptr as usize + }, + 672usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccess) + ) + ); + } + test_field_pageableMemoryAccess(); + fn test_field_concurrentManagedAccess() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).concurrentManagedAccess) as usize - ptr as usize + }, + 676usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentManagedAccess) + ) + ); + } + test_field_concurrentManagedAccess(); + fn test_field_computePreemptionSupported() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).computePreemptionSupported) as usize - ptr as usize + }, + 680usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computePreemptionSupported) + ) + ); + } + test_field_computePreemptionSupported(); + fn test_field_canUseHostPointerForRegisteredMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).canUseHostPointerForRegisteredMem) as usize + - ptr as usize + }, + 684usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canUseHostPointerForRegisteredMem) + ) + ); + } + test_field_canUseHostPointerForRegisteredMem(); + fn test_field_cooperativeLaunch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cooperativeLaunch) as usize - ptr as usize + }, + 688usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeLaunch) + ) + ); + } + test_field_cooperativeLaunch(); + fn test_field_cooperativeMultiDeviceLaunch() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceLaunch) as usize - ptr as usize + }, + 692usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeMultiDeviceLaunch) + ) + ); + } + test_field_cooperativeMultiDeviceLaunch(); + fn test_field_sharedMemPerBlockOptin() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemPerBlockOptin) as usize - ptr as usize + }, + 696usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlockOptin) + ) + ); + } + test_field_sharedMemPerBlockOptin(); + fn test_field_pageableMemoryAccessUsesHostPageTables() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pageableMemoryAccessUsesHostPageTables) as usize + - ptr as usize + }, + 704usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccessUsesHostPageTables) + ) + ); + } + test_field_pageableMemoryAccessUsesHostPageTables(); + fn test_field_directManagedMemAccessFromHost() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).directManagedMemAccessFromHost) as usize - ptr as usize + }, + 708usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(directManagedMemAccessFromHost) + ) + ); + } + test_field_directManagedMemAccessFromHost(); + fn test_field_maxBlocksPerMultiProcessor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxBlocksPerMultiProcessor) as usize - ptr as usize + }, + 712usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxBlocksPerMultiProcessor) + ) + ); + } + test_field_maxBlocksPerMultiProcessor(); + fn test_field_accessPolicyMaxWindowSize() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessPolicyMaxWindowSize) as usize - ptr as usize + }, + 716usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(accessPolicyMaxWindowSize) + ) + ); + } + test_field_accessPolicyMaxWindowSize(); + fn test_field_reservedSharedMemPerBlock() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reservedSharedMemPerBlock) as usize - ptr as usize + }, + 720usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reservedSharedMemPerBlock) + ) + ); + } + test_field_reservedSharedMemPerBlock(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaIpcEventHandle_st { + pub reserved: [::libc::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_cudaIpcEventHandle_st() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(name) - ) + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcEventHandle_st)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).uuid as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(uuid) - ) + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)) ); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcEventHandle_st), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaIpcMemHandle_st { + pub reserved: [::libc::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_cudaIpcMemHandle_st() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).luid as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luid) - ) + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcMemHandle_st)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).luidDeviceNodeMask as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luidDeviceNodeMask) - ) + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)) ); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcMemHandle_st), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaExternalMemoryHandleType { + cudaExternalMemoryHandleTypeOpaqueFd = 1, + cudaExternalMemoryHandleTypeOpaqueWin32 = 2, + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, + cudaExternalMemoryHandleTypeD3D12Heap = 4, + cudaExternalMemoryHandleTypeD3D12Resource = 5, + cudaExternalMemoryHandleTypeD3D11Resource = 6, + cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, + cudaExternalMemoryHandleTypeNvSciBuf = 8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalMemoryHandleDesc { + pub type_: cudaExternalMemoryHandleType, + pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { + pub fd: ::libc::c_int, + pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciBufObject: *const ::libc::c_void, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::libc::c_void, + pub name: *const ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).totalGlobalMem as *const _ as usize }, - 288usize, + ::std::mem::size_of::(), + 16usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalGlobalMem) + "Size of: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerBlock as *const _ as usize - }, - 296usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlock) + "Alignment of ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_name() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); + } + test_field_name(); +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).regsPerBlock as *const _ as usize }, - 304usize, + ::std::mem::size_of::(), + 16usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerBlock) + "Size of: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).warpSize as *const _ as usize }, - 308usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(warpSize) + "Alignment of ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) ) ); + fn test_field_fd() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + } + test_field_fd(); + fn test_field_win32() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + } + test_field_win32(); + fn test_field_nvSciBufObject() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciBufObject) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciBufObject) + ) + ); + } + test_field_nvSciBufObject(); +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).memPitch as *const _ as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memPitch) - ) + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerBlock as *const _ as usize - }, - 320usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerBlock) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)) ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(size) + ) + ); + } + test_field_size(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryBufferDesc { + pub offset: ::libc::c_ulonglong, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxThreadsDim as *const _ as usize }, - 324usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsDim) - ) + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxGridSize as *const _ as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxGridSize) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)) ); + fn test_field_offset() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(offset) + ) + ); + } + test_field_offset(); + fn test_field_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(size) + ) + ); + } + test_field_size(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryMipmappedArrayDesc { + pub offset: ::libc::c_ulonglong, + pub formatDesc: cudaChannelFormatDesc, + pub extent: cudaExtent, + pub flags: ::libc::c_uint, + pub numLevels: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).clockRate as *const _ as usize }, - 348usize, + ::std::mem::size_of::(), + 64usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(clockRate) + "Size of: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc) ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).totalConstMem as *const _ as usize }, - 352usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalConstMem) + "Alignment of ", + stringify!(cudaExternalMemoryMipmappedArrayDesc) ) ); + fn test_field_offset() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(offset) + ) + ); + } + test_field_offset(); + fn test_field_formatDesc() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).formatDesc) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(formatDesc) + ) + ); + } + test_field_formatDesc(); + fn test_field_extent() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(extent) + ) + ); + } + test_field_extent(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_numLevels() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numLevels) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(numLevels) + ) + ); + } + test_field_numLevels(); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaExternalSemaphoreHandleType { + cudaExternalSemaphoreHandleTypeOpaqueFd = 1, + cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, + cudaExternalSemaphoreHandleTypeD3D12Fence = 4, + cudaExternalSemaphoreHandleTypeD3D11Fence = 5, + cudaExternalSemaphoreHandleTypeNvSciSync = 6, + cudaExternalSemaphoreHandleTypeKeyedMutex = 7, + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreHandleDesc { + pub type_: cudaExternalSemaphoreHandleType, + pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { + pub fd: ::libc::c_int, + pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciSyncObj: *const ::libc::c_void, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::libc::c_void, + pub name: *const ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, - 364usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(minor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).textureAlignment as *const _ as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(textureAlignment) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).texturePitchAlignment as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(texturePitchAlignment) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).deviceOverlap as *const _ as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(deviceOverlap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).multiProcessorCount as *const _ as usize - }, - 388usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiProcessorCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelExecTimeoutEnabled as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(kernelExecTimeoutEnabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).integrated as *const _ as usize }, - 396usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(integrated) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).canMapHostMemory as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canMapHostMemory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).computeMode as *const _ as usize }, - 404usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computeMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture1D as *const _ as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DMipmap as *const _ as usize - }, - 412usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DMipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DLinear as *const _ as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLinear) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture2D as *const _ as usize }, - 420usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DMipmap as *const _ as usize - }, - 428usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DMipmap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DLinear as *const _ as usize - }, - 436usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLinear) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DGather as *const _ as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DGather) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture3D as *const _ as usize }, - 456usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxTexture3DAlt as *const _ as usize }, - 468usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3DAlt) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTextureCubemap as *const _ as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture1DLayered as *const _ as usize - }, - 484usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTexture2DLayered as *const _ as usize - }, - 492usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxTextureCubemapLayered as *const _ as usize - }, - 504usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemapLayered) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface1D as *const _ as usize }, - 512usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface2D as *const _ as usize }, - 516usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2D) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxSurface3D as *const _ as usize }, - 524usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface3D) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurface1DLayered as *const _ as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurface2DLayered as *const _ as usize - }, - 544usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2DLayered) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurfaceCubemap as *const _ as usize - }, - 556usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemap) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxSurfaceCubemapLayered as *const _ as usize - }, - 560usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemapLayered) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).surfaceAlignment as *const _ as usize }, - 568usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(surfaceAlignment) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).concurrentKernels as *const _ as usize - }, - 576usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentKernels) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ECCEnabled as *const _ as usize }, - 580usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(ECCEnabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciBusID as *const _ as usize }, - 584usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciBusID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciDeviceID as *const _ as usize }, - 588usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDeviceID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pciDomainID as *const _ as usize }, - 592usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDomainID) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tccDriver as *const _ as usize }, - 596usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(tccDriver) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).asyncEngineCount as *const _ as usize }, - 600usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(asyncEngineCount) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).unifiedAddressing as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(unifiedAddressing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memoryClockRate as *const _ as usize }, - 608usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryClockRate) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).memoryBusWidth as *const _ as usize }, - 612usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryBusWidth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l2CacheSize as *const _ as usize }, - 616usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(l2CacheSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).persistingL2CacheMaxSize as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(persistingL2CacheMaxSize) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxThreadsPerMultiProcessor as *const _ - as usize - }, - 624usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerMultiProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).streamPrioritiesSupported as *const _ - as usize - }, - 628usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(streamPrioritiesSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).globalL1CacheSupported as *const _ as usize - }, - 632usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(globalL1CacheSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).localL1CacheSupported as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(localL1CacheSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerMultiprocessor as *const _ - as usize - }, - 640usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerMultiprocessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).regsPerMultiprocessor as *const _ as usize - }, - 648usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerMultiprocessor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).managedMemory as *const _ as usize }, - 652usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(managedMemory) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isMultiGpuBoard as *const _ as usize }, - 656usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(isMultiGpuBoard) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).multiGpuBoardGroupID as *const _ as usize - }, - 660usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiGpuBoardGroupID) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).hostNativeAtomicSupported as *const _ - as usize - }, - 664usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(hostNativeAtomicSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).singleToDoublePrecisionPerfRatio as *const _ - as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(singleToDoublePrecisionPerfRatio) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pageableMemoryAccess as *const _ as usize - }, - 672usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccess) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).concurrentManagedAccess as *const _ as usize - }, - 676usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentManagedAccess) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).computePreemptionSupported as *const _ - as usize - }, - 680usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computePreemptionSupported) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).canUseHostPointerForRegisteredMem as *const _ - as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canUseHostPointerForRegisteredMem) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperativeLaunch as *const _ as usize - }, - 688usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeLaunch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).cooperativeMultiDeviceLaunch as *const _ - as usize - }, - 692usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeMultiDeviceLaunch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemPerBlockOptin as *const _ as usize - }, - 696usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlockOptin) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).pageableMemoryAccessUsesHostPageTables - as *const _ as usize - }, - 704usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccessUsesHostPageTables) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).directManagedMemAccessFromHost as *const _ - as usize - }, - 708usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(directManagedMemAccessFromHost) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxBlocksPerMultiProcessor as *const _ - as usize - }, - 712usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxBlocksPerMultiProcessor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).accessPolicyMaxWindowSize as *const _ - as usize - }, - 716usize, + ::std::mem::size_of::(), + 16usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(accessPolicyMaxWindowSize) + "Size of: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reservedSharedMemPerBlock as *const _ - as usize - }, - 720usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(reservedSharedMemPerBlock) + "Alignment of ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) ) ); -} -#[doc = " CUDA IPC event handle"] -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcEventHandle_st { - pub reserved: [::libc::c_char; 64usize], + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_name() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); + } + test_field_name(); } #[test] -fn bindgen_test_layout_cudaIpcEventHandle_st() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcEventHandle_st)) - ); +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)) + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) + ) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 0usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaIpcEventHandle_st), - "::", - stringify!(reserved) + "Alignment of ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) ) ); -} -#[doc = " CUDA IPC event handle"] -pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; -#[doc = " CUDA IPC memory handle"] -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcMemHandle_st { - pub reserved: [::libc::c_char; 64usize], + fn test_field_fd() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + } + test_field_fd(); + fn test_field_win32() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + } + test_field_win32(); + fn test_field_nvSciSyncObj() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSyncObj) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciSyncObj) + ) + ); + } + test_field_nvSciSyncObj(); } #[test] -fn bindgen_test_layout_cudaIpcMemHandle_st() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcMemHandle_st)) - ); +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)) + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcMemHandle_st), - "::", - stringify!(reserved) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)) ); + fn test_field_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(type_) + ) + ); + } + test_field_type(); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); } -#[doc = " CUDA IPC memory handle"] -pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; -#[repr(u32)] -#[non_exhaustive] -#[doc = " External memory handle types"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalMemoryHandleType { - #[doc = " Handle is an opaque file descriptor"] - cudaExternalMemoryHandleTypeOpaqueFd = 1, - #[doc = " Handle is an opaque shared NT handle"] - cudaExternalMemoryHandleTypeOpaqueWin32 = 2, - #[doc = " Handle is an opaque, globally shared handle"] - cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, - #[doc = " Handle is a D3D12 heap object"] - cudaExternalMemoryHandleTypeD3D12Heap = 4, - #[doc = " Handle is a D3D12 committed resource"] - cudaExternalMemoryHandleTypeD3D12Resource = 5, - #[doc = " Handle is a shared NT handle to a D3D11 resource"] - cudaExternalMemoryHandleTypeD3D11Resource = 6, - #[doc = " Handle is a globally shared handle to a D3D11 resource"] - cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, - #[doc = " Handle is an NvSciBuf object"] - cudaExternalMemoryHandleTypeNvSciBuf = 8, -} -#[doc = " External memory handle descriptor"] #[repr(C)] #[derive(Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc { - #[doc = " Type of the handle"] - pub type_: cudaExternalMemoryHandleType, - pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, - #[doc = " Size of the memory allocation"] - pub size: ::libc::c_ulonglong, - #[doc = " Flags must either be zero or ::cudaExternalMemoryDedicated"] +pub struct cudaExternalSemaphoreSignalParams_v1 { + pub params: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, pub flags: ::libc::c_uint, } #[repr(C)] #[derive(Copy, Clone)] -pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { - #[doc = " File descriptor referencing the memory object. Valid"] - #[doc = " when type is"] - #[doc = " ::cudaExternalMemoryHandleTypeOpaqueFd"] - pub fd: ::libc::c_int, - pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - #[doc = " A handle representing NvSciBuf Object. Valid when type"] - #[doc = " is ::cudaExternalMemoryHandleTypeNvSciBuf"] - pub nvSciBufObject: *const ::libc::c_void, +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, } -#[doc = " Win32 handle referencing the semaphore object. Valid when"] -#[doc = " type is one of the following:"] -#[doc = " - ::cudaExternalMemoryHandleTypeOpaqueWin32"] -#[doc = " - ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D12Heap"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D12Resource"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D11Resource"] -#[doc = " - ::cudaExternalMemoryHandleTypeD3D11ResourceKmt"] -#[doc = " Exactly one of 'handle' and 'name' must be non-NULL. If"] -#[doc = " type is one of the following:"] -#[doc = " ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt"] -#[doc = " ::cudaExternalMemoryHandleTypeD3D11ResourceKmt"] -#[doc = " then 'name' must be NULL."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"] - pub handle: *mut ::libc::c_void, - #[doc = " Name of a valid memory object."] - #[doc = " Must be NULL if 'handle' is non-NULL."] - pub name: *const ::libc::c_void, +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), + ::std::mem::size_of::(), 8usize, - concat!( - "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .handle as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .name as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, concat!( "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fd as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciBufObject - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciBufObject) - ) - ); + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); } -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).type_ as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(flags) - ) - ); -} -#[doc = " External memory buffer descriptor"] #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryBufferDesc { - #[doc = " Offset into the memory object where the buffer's base is"] - pub offset: ::libc::c_ulonglong, - #[doc = " Size of the buffer"] - pub size: ::libc::c_ulonglong, - #[doc = " Flags reserved for future use. Must be zero."] - pub flags: ::libc::c_uint, +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)) - ); +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::std::mem::align_of::(), + ::std::mem::size_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset as *const _ as usize - }, - 0usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(offset) + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).size as *const _ as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(flags) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " External memory mipmap descriptor"] #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryMipmappedArrayDesc { - #[doc = " Offset into the memory object where the base level of the"] - #[doc = " mipmap chain is."] - pub offset: ::libc::c_ulonglong, - #[doc = " Format of base level of the mipmap chain"] - pub formatDesc: cudaChannelFormatDesc, - #[doc = " Dimensions of base level of the mipmap chain"] - pub extent: cudaExtent, - #[doc = " Flags associated with CUDA mipmapped arrays."] - #[doc = " See ::cudaMallocMipmappedArray"] - pub flags: ::libc::c_uint, - #[doc = " Total number of levels in the mipmap chain"] - pub numLevels: ::libc::c_uint, +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3() { assert_eq!( - ::std::mem::size_of::(), - 64usize, + ::std::mem::size_of::(), + 8usize, concat!( "Size of: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) - ) - ); + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).offset as *const _ - as usize - }, - 0usize, + ::std::mem::size_of::(), + 24usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(offset) + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).formatDesc as *const _ - as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(formatDesc) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extent as *const _ - as usize - }, + ::std::mem::size_of::(), 32usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(extent) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ - as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(flags) + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numLevels as *const _ - as usize - }, - 60usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(numLevels) - ) - ); -} -#[repr(u32)] -#[non_exhaustive] -#[doc = " External semaphore handle types"] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalSemaphoreHandleType { - #[doc = " Handle is an opaque file descriptor"] - cudaExternalSemaphoreHandleTypeOpaqueFd = 1, - #[doc = " Handle is an opaque shared NT handle"] - cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, - #[doc = " Handle is an opaque, globally shared handle"] - cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, - #[doc = " Handle is a shared NT handle referencing a D3D12 fence object"] - cudaExternalSemaphoreHandleTypeD3D12Fence = 4, - #[doc = " Handle is a shared NT handle referencing a D3D11 fence object"] - cudaExternalSemaphoreHandleTypeD3D11Fence = 5, - #[doc = " Opaque handle to NvSciSync Object"] - cudaExternalSemaphoreHandleTypeNvSciSync = 6, - #[doc = " Handle is a shared NT handle referencing a D3D11 keyed mutex object"] - cudaExternalSemaphoreHandleTypeKeyedMutex = 7, - #[doc = " Handle is a shared KMT handle referencing a D3D11 keyed mutex object"] - cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, - #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"] - cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, - #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"] - cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1) + ) + ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); } -#[doc = " External semaphore handle descriptor"] #[repr(C)] #[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc { - #[doc = " Type of the handle"] - pub type_: cudaExternalSemaphoreHandleType, - pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, - #[doc = " Flags reserved for the future. Must be zero."] +pub struct cudaExternalSemaphoreWaitParams_v1 { + pub params: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, pub flags: ::libc::c_uint, } #[repr(C)] #[derive(Copy, Clone)] -pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { - #[doc = " File descriptor referencing the semaphore object. Valid when"] - #[doc = " type is one of the following:"] - #[doc = " - ::cudaExternalSemaphoreHandleTypeOpaqueFd"] - #[doc = " - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd"] - pub fd: ::libc::c_int, - pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - #[doc = " Valid NvSciSyncObj. Must be non NULL"] - pub nvSciSyncObj: *const ::libc::c_void, +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, } -#[doc = " Win32 handle referencing the semaphore object. Valid when"] -#[doc = " type is one of the following:"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeOpaqueWin32"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeD3D12Fence"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeD3D11Fence"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeKeyedMutex"] -#[doc = " - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32"] -#[doc = " Exactly one of 'handle' and 'name' must be non-NULL. If"] -#[doc = " type is one of the following:"] -#[doc = " ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt"] -#[doc = " ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt"] -#[doc = " then 'name' must be NULL."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"] - pub handle: *mut ::libc::c_void, - #[doc = " Name of a valid synchronization primitive."] - #[doc = " Must be NULL if 'handle' is non-NULL."] - pub name: *const ::libc::c_void, +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + ::std::mem::size_of::(), + 8usize, concat!( "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .handle as *const _ as usize - }, - 0usize, + ::std::mem::size_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .name as *const _ as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, + pub timeoutMs: ::libc::c_uint, } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 16usize, concat!( "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fd as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).win32 - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSyncObj - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciSyncObj) - ) - ); + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); + fn test_field_timeoutMs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs) + ) + ); + } + test_field_timeoutMs(); } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), + ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).type_ as *const _ as usize - }, - 0usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(type_) + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) ) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).handle as *const _ as usize - }, + ::std::mem::align_of::(), 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(handle) - ) + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) + ) + ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1() { + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams_v1)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 24usize, + ::std::mem::align_of::(), + 8usize, concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(flags) - ) - ); + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1) + ) + ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); } -#[doc = " External semaphore signal parameters, compatible with driver type"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaExternalSemaphoreSignalParams { pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, - #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to"] - #[doc = " signal a ::cudaExternalSemaphore_t of type"] - #[doc = " ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is"] - #[doc = " ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates"] - #[doc = " that while signaling the ::cudaExternalSemaphore_t, no memory"] - #[doc = " synchronization operations should be performed for any external memory"] - #[doc = " object imported as ::cudaExternalMemoryHandleTypeNvSciBuf."] - #[doc = " For all other types of ::cudaExternalSemaphore_t, flags must be zero."] pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 16usize], } @@ -5173,11 +6041,9 @@ pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 { pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, pub reserved: [::libc::c_uint; 12usize], } -#[doc = " Parameters for fence objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Value of fence to be signaled"] pub value: ::libc::c_ulonglong, } #[test] @@ -5198,26 +6064,29 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); } #[repr(C)] #[derive(Copy, Clone)] pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { - #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType"] - #[doc = " is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."] pub fence: *mut ::libc::c_void, pub reserved: ::libc::c_ulonglong, } @@ -5239,36 +6108,45 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Parameters for keyed mutex objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { @@ -5292,20 +6170,25 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::( - ))) - .key as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { @@ -5325,58 +6208,82 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSync - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keyedMutex - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { @@ -5393,58 +6300,62 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { stringify!(cudaExternalSemaphoreSignalParams) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(reserved) - ) - ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " External semaphore wait parameters, compatible with driver type"] #[repr(C)] #[derive(Copy, Clone)] pub struct cudaExternalSemaphoreWaitParams { pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, - #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to"] - #[doc = " signal a ::cudaExternalSemaphore_t of type"] - #[doc = " ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is"] - #[doc = " ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates"] - #[doc = " that while waiting for the ::cudaExternalSemaphore_t, no memory"] - #[doc = " synchronization operations should be performed for any external memory"] - #[doc = " object imported as ::cudaExternalMemoryHandleTypeNvSciBuf."] - #[doc = " For all other types of ::cudaExternalSemaphore_t, flags must be zero."] pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 16usize], } @@ -5456,11 +6367,9 @@ pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 { pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, pub reserved: [::libc::c_uint; 10usize], } -#[doc = " Parameters for fence objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { - #[doc = " Value of fence to be waited on"] pub value: ::libc::c_ulonglong, } #[test] @@ -5481,25 +6390,29 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .value as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); + fn test_field_value() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); + } + test_field_value(); } #[repr(C)] #[derive(Copy, Clone)] pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { - #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType"] - #[doc = " is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."] pub fence: *mut ::libc::c_void, pub reserved: ::libc::c_ulonglong, } @@ -5521,40 +6434,49 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .fence as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " Parameters for keyed mutex objects"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { - #[doc = " Value of key to acquire the mutex with"] pub key: ::libc::c_ulonglong, - #[doc = " Timeout in milliseconds to wait to acquire the mutex"] pub timeoutMs: ::libc::c_uint, } #[test] @@ -5575,32 +6497,44 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .key as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())) - .timeoutMs as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(timeoutMs) - ) - ); + fn test_field_key() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + } + test_field_key(); + fn test_field_timeoutMs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + >::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs) + ) + ); + } + test_field_timeoutMs(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { @@ -5620,58 +6554,74 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).fence - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nvSciSync - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).keyedMutex - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved - as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); + fn test_field_fence() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + } + test_field_fence(); + fn test_field_nvSciSync() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + } + test_field_nvSciSync(); + fn test_field_keyedMutex() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + } + test_field_keyedMutex(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } #[test] fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { @@ -5685,230 +6635,256 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { 8usize, concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).params as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(params) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).flags as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(reserved) - ) - ); + fn test_field_params() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(params) + ) + ); + } + test_field_params(); + fn test_field_flags() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(flags) + ) + ); + } + test_field_flags(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } -#[doc = " CUDA Error types"] pub use self::cudaError as cudaError_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUstream_st { _unused: [u8; 0], } -#[doc = " CUDA stream"] pub type cudaStream_t = *mut CUstream_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUevent_st { _unused: [u8; 0], } -#[doc = " CUDA event types"] pub type cudaEvent_t = *mut CUevent_st; -#[doc = " CUDA graphics resource types"] pub type cudaGraphicsResource_t = *mut cudaGraphicsResource; -#[doc = " CUDA output file modes"] pub use self::cudaOutputMode as cudaOutputMode_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUexternalMemory_st { _unused: [u8; 0], } -#[doc = " CUDA external memory"] pub type cudaExternalMemory_t = *mut CUexternalMemory_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUexternalSemaphore_st { _unused: [u8; 0], } -#[doc = " CUDA external semaphore"] pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUgraph_st { _unused: [u8; 0], } -#[doc = " CUDA graph"] pub type cudaGraph_t = *mut CUgraph_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUgraphNode_st { _unused: [u8; 0], } -#[doc = " CUDA graph node."] pub type cudaGraphNode_t = *mut CUgraphNode_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUuserObject_st { _unused: [u8; 0], } -#[doc = " CUDA user object for graphs"] pub type cudaUserObject_t = *mut CUuserObject_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUfunc_st { _unused: [u8; 0], } -#[doc = " CUDA function"] pub type cudaFunction_t = *mut CUfunc_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CUmemPoolHandle_st { _unused: [u8; 0], } -#[doc = " CUDA memory pool"] pub type cudaMemPool_t = *mut CUmemPoolHandle_st; #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA cooperative group scope"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaCGScope { - #[doc = "< Invalid cooperative group scope"] cudaCGScopeInvalid = 0, - #[doc = "< Scope represented by a grid_group"] cudaCGScopeGrid = 1, - #[doc = "< Scope represented by a multi_grid_group"] cudaCGScopeMultiGrid = 2, } -#[doc = " CUDA launch parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaLaunchParams { - #[doc = "< Device function symbol"] pub func: *mut ::libc::c_void, - #[doc = "< Grid dimentions"] pub gridDim: dim3, - #[doc = "< Block dimentions"] pub blockDim: dim3, - #[doc = "< Arguments"] pub args: *mut *mut ::libc::c_void, - #[doc = "< Shared memory"] pub sharedMem: usize, - #[doc = "< Stream identifier"] pub stream: cudaStream_t, } #[test] fn bindgen_test_layout_cudaLaunchParams() { assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaLaunchParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaLaunchParams)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(func) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(gridDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(blockDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).args as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(args) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sharedMem as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(sharedMem) - ) + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaLaunchParams)) ); assert_eq!( - unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(stream) - ) + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchParams)) ); + fn test_field_func() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(func) + ) + ); + } + test_field_func(); + fn test_field_gridDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(gridDim) + ) + ); + } + test_field_gridDim(); + fn test_field_blockDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(blockDim) + ) + ); + } + test_field_blockDim(); + fn test_field_args() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(args) + ) + ); + } + test_field_args(); + fn test_field_sharedMem() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMem) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(sharedMem) + ) + ); + } + test_field_sharedMem(); + fn test_field_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(stream) + ) + ); + } + test_field_stream(); } -#[doc = " CUDA GPU kernel node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaKernelNodeParams { - #[doc = "< Kernel to launch"] pub func: *mut ::libc::c_void, - #[doc = "< Grid dimensions"] pub gridDim: dim3, - #[doc = "< Block dimensions"] pub blockDim: dim3, - #[doc = "< Dynamic shared-memory size per thread block in bytes"] pub sharedMemBytes: ::libc::c_uint, - #[doc = "< Array of pointers to individual kernel arguments"] pub kernelParams: *mut *mut ::libc::c_void, - #[doc = "< Pointer to kernel arguments in the \"extra\" format"] pub extra: *mut *mut ::libc::c_void, } #[test] @@ -5923,80 +6899,114 @@ fn bindgen_test_layout_cudaKernelNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaKernelNodeParams)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).func as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(func) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gridDim as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(gridDim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).blockDim as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(blockDim) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sharedMemBytes as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(sharedMemBytes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).kernelParams as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(kernelParams) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).extra as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(extra) - ) - ); + fn test_field_func() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(func) + ) + ); + } + test_field_func(); + fn test_field_gridDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(gridDim) + ) + ); + } + test_field_gridDim(); + fn test_field_blockDim() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(blockDim) + ) + ); + } + test_field_blockDim(); + fn test_field_sharedMemBytes() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(sharedMemBytes) + ) + ); + } + test_field_sharedMemBytes(); + fn test_field_kernelParams() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(kernelParams) + ) + ); + } + test_field_kernelParams(); + fn test_field_extra() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(extra) + ) + ); + } + test_field_extra(); } -#[doc = " External semaphore signal node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreSignalNodeParams { - #[doc = "< Array of external semaphore handles."] pub extSemArray: *mut cudaExternalSemaphore_t, - #[doc = "< Array of external semaphore signal parameters."] pub paramsArray: *const cudaExternalSemaphoreSignalParams, - #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."] pub numExtSems: ::libc::c_uint, } #[test] @@ -6017,55 +7027,66 @@ fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParams() { stringify!(cudaExternalSemaphoreSignalNodeParams) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extSemArray - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(extSemArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).paramsArray - as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(paramsArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numExtSems as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(numExtSems) - ) - ); + fn test_field_extSemArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(extSemArray) + ) + ); + } + test_field_extSemArray(); + fn test_field_paramsArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(paramsArray) + ) + ); + } + test_field_paramsArray(); + fn test_field_numExtSems() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(numExtSems) + ) + ); + } + test_field_numExtSems(); } -#[doc = " External semaphore wait node parameters"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cudaExternalSemaphoreWaitNodeParams { - #[doc = "< Array of external semaphore handles."] pub extSemArray: *mut cudaExternalSemaphore_t, - #[doc = "< Array of external semaphore wait parameters."] pub paramsArray: *const cudaExternalSemaphoreWaitParams, - #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."] pub numExtSems: ::libc::c_uint, } #[test] @@ -6083,74 +7104,76 @@ fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParams() { stringify!(cudaExternalSemaphoreWaitNodeParams) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).extSemArray as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(extSemArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).paramsArray as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(paramsArray) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).numExtSems as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(numExtSems) - ) - ); + fn test_field_extSemArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(extSemArray) + ) + ); + } + test_field_extSemArray(); + fn test_field_paramsArray() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(paramsArray) + ) + ); + } + test_field_paramsArray(); + fn test_field_numExtSems() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(numExtSems) + ) + ); + } + test_field_numExtSems(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Graph node types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphNodeType { - #[doc = "< GPU kernel node"] cudaGraphNodeTypeKernel = 0, - #[doc = "< Memcpy node"] cudaGraphNodeTypeMemcpy = 1, - #[doc = "< Memset node"] cudaGraphNodeTypeMemset = 2, - #[doc = "< Host (executable) node"] cudaGraphNodeTypeHost = 3, - #[doc = "< Node which executes an embedded graph"] cudaGraphNodeTypeGraph = 4, - #[doc = "< Empty (no-op) node"] cudaGraphNodeTypeEmpty = 5, - #[doc = "< External event wait node"] cudaGraphNodeTypeWaitEvent = 6, - #[doc = "< External event record node"] cudaGraphNodeTypeEventRecord = 7, - #[doc = "< External semaphore signal node"] cudaGraphNodeTypeExtSemaphoreSignal = 8, - #[doc = "< External semaphore wait node"] cudaGraphNodeTypeExtSemaphoreWait = 9, - #[doc = "< Memory allocation node"] cudaGraphNodeTypeMemAlloc = 10, - #[doc = "< Memory free node"] cudaGraphNodeTypeMemFree = 11, cudaGraphNodeTypeCount = 12, } @@ -6159,103 +7182,208 @@ pub enum cudaGraphNodeType { pub struct CUgraphExec_st { _unused: [u8; 0], } -#[doc = " CUDA executable (launchable) graph"] pub type cudaGraphExec_t = *mut CUgraphExec_st; #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Graph Update error types"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphExecUpdateResult { - #[doc = "< The update succeeded"] cudaGraphExecUpdateSuccess = 0, - #[doc = "< The update failed for an unexpected reason which is described in the return value of the function"] cudaGraphExecUpdateError = 1, - #[doc = "< The update failed because the topology changed"] cudaGraphExecUpdateErrorTopologyChanged = 2, - #[doc = "< The update failed because a node type changed"] cudaGraphExecUpdateErrorNodeTypeChanged = 3, - #[doc = "< The update failed because the function of a kernel node changed (CUDA driver < 11.2)"] cudaGraphExecUpdateErrorFunctionChanged = 4, - #[doc = "< The update failed because the parameters changed in a way that is not supported"] cudaGraphExecUpdateErrorParametersChanged = 5, - #[doc = "< The update failed because something about the node is not supported"] cudaGraphExecUpdateErrorNotSupported = 6, - #[doc = "< The update failed because the function of a kernel node changed in an unsupported way"] cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7, + cudaGraphExecUpdateErrorAttributesChanged = 8, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags to specify search options to be used with ::cudaGetDriverEntryPoint"] -#[doc = " For more details see ::cuGetProcAddress"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGetDriverEntryPointFlags { - #[doc = "< Default search mode for driver symbols."] cudaEnableDefault = 0, - #[doc = "< Search for legacy versions of driver symbols."] cudaEnableLegacyStream = 1, - #[doc = "< Search for per-thread versions of driver symbols."] cudaEnablePerThreadDefaultStream = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Graph debug write options"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphDebugDotFlags { cudaGraphDebugDotFlagsVerbose = 1, - #[doc = " Output all debug data as if every debug flag is enabled"] cudaGraphDebugDotFlagsKernelNodeParams = 4, - #[doc = " Adds cudaKernelNodeParams to output"] cudaGraphDebugDotFlagsMemcpyNodeParams = 8, - #[doc = " Adds cudaMemcpy3DParms to output"] cudaGraphDebugDotFlagsMemsetNodeParams = 16, - #[doc = " Adds cudaMemsetParams to output"] cudaGraphDebugDotFlagsHostNodeParams = 32, - #[doc = " Adds cudaHostNodeParams to output"] cudaGraphDebugDotFlagsEventNodeParams = 64, - #[doc = " Adds cudaEvent_t handle from record and wait nodes to output"] cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128, - #[doc = " Adds cudaExternalSemaphoreSignalNodeParams values to output"] cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256, - #[doc = " Adds cudaExternalSemaphoreWaitNodeParams to output"] cudaGraphDebugDotFlagsKernelNodeAttributes = 512, - #[doc = " Adds cudaKernelNodeAttrID values to output"] cudaGraphDebugDotFlagsHandles = 1024, } #[repr(u32)] #[non_exhaustive] -#[doc = " Flags for instantiating a graph"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaGraphInstantiateFlags { - #[doc = "< Automatically free memory allocated in a graph before relaunching."] cudaGraphInstantiateFlagAutoFreeOnLaunch = 1, + cudaGraphInstantiateFlagUseNodePriority = 8, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaStreamAttrID { + cudaStreamAttributeAccessPolicyWindow = 1, + cudaStreamAttributeSynchronizationPolicy = 3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaStreamAttrValue { + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub syncPolicy: cudaSynchronizationPolicy, +} +#[test] +fn bindgen_test_layout_cudaStreamAttrValue() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaStreamAttrValue)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaStreamAttrValue)) + ); + fn test_field_accessPolicyWindow() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaStreamAttrValue), + "::", + stringify!(accessPolicyWindow) + ) + ); + } + test_field_accessPolicyWindow(); + fn test_field_syncPolicy() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).syncPolicy) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaStreamAttrValue), + "::", + stringify!(syncPolicy) + ) + ); + } + test_field_syncPolicy(); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaKernelNodeAttrID { + cudaKernelNodeAttributeAccessPolicyWindow = 1, + cudaKernelNodeAttributeCooperative = 2, + cudaKernelNodeAttributePriority = 8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaKernelNodeAttrValue { + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub cooperative: ::libc::c_int, + pub priority: ::libc::c_int, +} +#[test] +fn bindgen_test_layout_cudaKernelNodeAttrValue() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaKernelNodeAttrValue)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaKernelNodeAttrValue)) + ); + fn test_field_accessPolicyWindow() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(accessPolicyWindow) + ) + ); + } + test_field_accessPolicyWindow(); + fn test_field_cooperative() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cooperative) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(cooperative) + ) + ); + } + test_field_cooperative(); + fn test_field_priority() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeAttrValue), + "::", + stringify!(priority) + ) + ); + } + test_field_priority(); } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Surface boundary modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaSurfaceBoundaryMode { - #[doc = "< Zero boundary mode"] cudaBoundaryModeZero = 0, - #[doc = "< Clamp boundary mode"] cudaBoundaryModeClamp = 1, - #[doc = "< Trap boundary mode"] cudaBoundaryModeTrap = 2, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA Surface format modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaSurfaceFormatMode { - #[doc = "< Forced format mode"] cudaFormatModeForced = 0, - #[doc = "< Auto format mode"] cudaFormatModeAuto = 1, } -#[doc = " CUDA Surface reference"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct surfaceReference { - #[doc = " Channel descriptor for surface reference"] pub channelDesc: cudaChannelFormatDesc, } #[test] @@ -6270,399 +7398,532 @@ fn bindgen_test_layout_surfaceReference() { 4usize, concat!("Alignment of ", stringify!(surfaceReference)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).channelDesc as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(surfaceReference), - "::", - stringify!(channelDesc) - ) - ); + fn test_field_channelDesc() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).channelDesc) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(surfaceReference), + "::", + stringify!(channelDesc) + ) + ); + } + test_field_channelDesc(); } -#[doc = " An opaque value that represents a CUDA Surface object"] pub type cudaSurfaceObject_t = ::libc::c_ulonglong; #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA texture address modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaTextureAddressMode { - #[doc = "< Wrapping address mode"] cudaAddressModeWrap = 0, - #[doc = "< Clamp to edge address mode"] cudaAddressModeClamp = 1, - #[doc = "< Mirror address mode"] cudaAddressModeMirror = 2, - #[doc = "< Border address mode"] cudaAddressModeBorder = 3, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA texture filter modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaTextureFilterMode { - #[doc = "< Point filter mode"] cudaFilterModePoint = 0, - #[doc = "< Linear filter mode"] cudaFilterModeLinear = 1, } #[repr(u32)] #[non_exhaustive] -#[doc = " CUDA texture read modes"] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaTextureReadMode { - #[doc = "< Read texture as specified element type"] cudaReadModeElementType = 0, - #[doc = "< Read texture as normalized float"] cudaReadModeNormalizedFloat = 1, } -#[doc = " CUDA texture reference"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct textureReference { - #[doc = " Indicates whether texture reads are normalized or not"] pub normalized: ::libc::c_int, - #[doc = " Texture filter mode"] pub filterMode: cudaTextureFilterMode, - #[doc = " Texture address mode for up to 3 dimensions"] pub addressMode: [cudaTextureAddressMode; 3usize], - #[doc = " Channel descriptor for the texture reference"] pub channelDesc: cudaChannelFormatDesc, - #[doc = " Perform sRGB->linear conversion during texture read"] pub sRGB: ::libc::c_int, - #[doc = " Limit to the anisotropy ratio"] pub maxAnisotropy: ::libc::c_uint, - #[doc = " Mipmap filter mode"] pub mipmapFilterMode: cudaTextureFilterMode, - #[doc = " Offset applied to the supplied mipmap level"] pub mipmapLevelBias: f32, - #[doc = " Lower end of the mipmap level range to clamp access to"] pub minMipmapLevelClamp: f32, - #[doc = " Upper end of the mipmap level range to clamp access to"] pub maxMipmapLevelClamp: f32, - #[doc = " Disable any trilinear filtering optimizations."] pub disableTrilinearOptimization: ::libc::c_int, pub __cudaReserved: [::libc::c_int; 14usize], -} -#[test] -fn bindgen_test_layout_textureReference() { - assert_eq!( - ::std::mem::size_of::(), - 124usize, - concat!("Size of: ", stringify!(textureReference)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(textureReference)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).normalized as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(normalized) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(filterMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).addressMode as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(addressMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).channelDesc as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(channelDesc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sRGB as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(sRGB) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(maxAnisotropy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(mipmapFilterMode) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(mipmapLevelBias) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(minMipmapLevelClamp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(maxMipmapLevelClamp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).disableTrilinearOptimization as *const _ - as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(disableTrilinearOptimization) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__cudaReserved as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(__cudaReserved) - ) - ); -} -#[doc = " CUDA texture descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaTextureDesc { - #[doc = " Texture address mode for up to 3 dimensions"] - pub addressMode: [cudaTextureAddressMode; 3usize], - #[doc = " Texture filter mode"] - pub filterMode: cudaTextureFilterMode, - #[doc = " Texture read mode"] - pub readMode: cudaTextureReadMode, - #[doc = " Perform sRGB->linear conversion during texture read"] - pub sRGB: ::libc::c_int, - #[doc = " Texture Border Color"] - pub borderColor: [f32; 4usize], - #[doc = " Indicates whether texture reads are normalized or not"] - pub normalizedCoords: ::libc::c_int, - #[doc = " Limit to the anisotropy ratio"] - pub maxAnisotropy: ::libc::c_uint, - #[doc = " Mipmap filter mode"] - pub mipmapFilterMode: cudaTextureFilterMode, - #[doc = " Offset applied to the supplied mipmap level"] - pub mipmapLevelBias: f32, - #[doc = " Lower end of the mipmap level range to clamp access to"] - pub minMipmapLevelClamp: f32, - #[doc = " Upper end of the mipmap level range to clamp access to"] - pub maxMipmapLevelClamp: f32, - #[doc = " Disable any trilinear filtering optimizations."] - pub disableTrilinearOptimization: ::libc::c_int, -} -#[test] -fn bindgen_test_layout_cudaTextureDesc() { - assert_eq!( - ::std::mem::size_of::(), - 68usize, - concat!("Size of: ", stringify!(cudaTextureDesc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cudaTextureDesc)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).addressMode as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(addressMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filterMode as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(filterMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readMode as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(readMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sRGB as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(sRGB) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).borderColor as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(borderColor) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).normalizedCoords as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(normalizedCoords) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxAnisotropy as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(maxAnisotropy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mipmapFilterMode as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(mipmapFilterMode) - ) - ); +} +#[test] +fn bindgen_test_layout_textureReference() { assert_eq!( - unsafe { &(*(::std::ptr::null::())).mipmapLevelBias as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(mipmapLevelBias) - ) + ::std::mem::size_of::(), + 124usize, + concat!("Size of: ", stringify!(textureReference)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).minMipmapLevelClamp as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(minMipmapLevelClamp) - ) + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(textureReference)) ); + fn test_field_normalized() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).normalized) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(normalized) + ) + ); + } + test_field_normalized(); + fn test_field_filterMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(filterMode) + ) + ); + } + test_field_filterMode(); + fn test_field_addressMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(addressMode) + ) + ); + } + test_field_addressMode(); + fn test_field_channelDesc() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).channelDesc) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(channelDesc) + ) + ); + } + test_field_channelDesc(); + fn test_field_sRGB() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(sRGB) + ) + ); + } + test_field_sRGB(); + fn test_field_maxAnisotropy() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(maxAnisotropy) + ) + ); + } + test_field_maxAnisotropy(); + fn test_field_mipmapFilterMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(mipmapFilterMode) + ) + ); + } + test_field_mipmapFilterMode(); + fn test_field_mipmapLevelBias() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(mipmapLevelBias) + ) + ); + } + test_field_mipmapLevelBias(); + fn test_field_minMipmapLevelClamp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(minMipmapLevelClamp) + ) + ); + } + test_field_minMipmapLevelClamp(); + fn test_field_maxMipmapLevelClamp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(maxMipmapLevelClamp) + ) + ); + } + test_field_maxMipmapLevelClamp(); + fn test_field_disableTrilinearOptimization() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).disableTrilinearOptimization) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(disableTrilinearOptimization) + ) + ); + } + test_field_disableTrilinearOptimization(); + fn test_field___cudaReserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).__cudaReserved) as usize - ptr as usize + }, + 68usize, + concat!( + "Offset of field: ", + stringify!(textureReference), + "::", + stringify!(__cudaReserved) + ) + ); + } + test_field___cudaReserved(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaTextureDesc { + pub addressMode: [cudaTextureAddressMode; 3usize], + pub filterMode: cudaTextureFilterMode, + pub readMode: cudaTextureReadMode, + pub sRGB: ::libc::c_int, + pub borderColor: [f32; 4usize], + pub normalizedCoords: ::libc::c_int, + pub maxAnisotropy: ::libc::c_uint, + pub mipmapFilterMode: cudaTextureFilterMode, + pub mipmapLevelBias: f32, + pub minMipmapLevelClamp: f32, + pub maxMipmapLevelClamp: f32, + pub disableTrilinearOptimization: ::libc::c_int, + pub seamlessCubemap: ::libc::c_int, +} +#[test] +fn bindgen_test_layout_cudaTextureDesc() { assert_eq!( - unsafe { - &(*(::std::ptr::null::())).maxMipmapLevelClamp as *const _ as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(maxMipmapLevelClamp) - ) + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(cudaTextureDesc)) ); assert_eq!( - unsafe { - &(*(::std::ptr::null::())).disableTrilinearOptimization as *const _ - as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(disableTrilinearOptimization) - ) + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(cudaTextureDesc)) ); + fn test_field_addressMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(addressMode) + ) + ); + } + test_field_addressMode(); + fn test_field_filterMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(filterMode) + ) + ); + } + test_field_filterMode(); + fn test_field_readMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).readMode) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(readMode) + ) + ); + } + test_field_readMode(); + fn test_field_sRGB() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(sRGB) + ) + ); + } + test_field_sRGB(); + fn test_field_borderColor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).borderColor) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(borderColor) + ) + ); + } + test_field_borderColor(); + fn test_field_normalizedCoords() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).normalizedCoords) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(normalizedCoords) + ) + ); + } + test_field_normalizedCoords(); + fn test_field_maxAnisotropy() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxAnisotropy) + ) + ); + } + test_field_maxAnisotropy(); + fn test_field_mipmapFilterMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapFilterMode) + ) + ); + } + test_field_mipmapFilterMode(); + fn test_field_mipmapLevelBias() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapLevelBias) + ) + ); + } + test_field_mipmapLevelBias(); + fn test_field_minMipmapLevelClamp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(minMipmapLevelClamp) + ) + ); + } + test_field_minMipmapLevelClamp(); + fn test_field_maxMipmapLevelClamp() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxMipmapLevelClamp) + ) + ); + } + test_field_maxMipmapLevelClamp(); + fn test_field_disableTrilinearOptimization() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).disableTrilinearOptimization) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(disableTrilinearOptimization) + ) + ); + } + test_field_disableTrilinearOptimization(); + fn test_field_seamlessCubemap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).seamlessCubemap) as usize - ptr as usize + }, + 68usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(seamlessCubemap) + ) + ); + } + test_field_seamlessCubemap(); } -#[doc = " An opaque value that represents a CUDA texture object"] pub type cudaTextureObject_t = ::libc::c_ulonglong; #[repr(u32)] #[non_exhaustive] @@ -6704,164 +7965,15 @@ pub const libraryPropertyType_t_PATCH_LEVEL: libraryPropertyType_t = 2; pub type libraryPropertyType_t = ::libc::c_uint; pub use self::libraryPropertyType_t as libraryPropertyType; extern "C" { - #[doc = " \\brief Destroy all allocations and reset all state on the current device"] - #[doc = " in the current process."] - #[doc = ""] - #[doc = " Explicitly destroys and cleans up all resources associated with the current"] - #[doc = " device in the current process. Any subsequent API call to this device will"] - #[doc = " reinitialize the device."] - #[doc = ""] - #[doc = " Note that this function will reset the device immediately. It is the caller's"] - #[doc = " responsibility to ensure that the device is not being accessed by any"] - #[doc = " other host threads from the process when this function is called."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSynchronize"] pub fn cudaDeviceReset() -> cudaError_t; } extern "C" { - #[doc = " \\brief Wait for compute device to finish"] - #[doc = ""] - #[doc = " Blocks until the device has completed all preceding requested tasks."] - #[doc = " ::cudaDeviceSynchronize() returns an error if one of the preceding tasks"] - #[doc = " has failed. If the ::cudaDeviceScheduleBlockingSync flag was set for"] - #[doc = " this device, the host thread will block until the device has finished"] - #[doc = " its work."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDeviceReset,"] - #[doc = " ::cuCtxSynchronize"] pub fn cudaDeviceSynchronize() -> cudaError_t; } extern "C" { - #[doc = " \\brief Set resource limits"] - #[doc = ""] - #[doc = " Setting \\p limit to \\p value is a request by the application to update"] - #[doc = " the current limit maintained by the device. The driver is free to"] - #[doc = " modify the requested value to meet h/w requirements (this could be"] - #[doc = " clamping to minimum or maximum values, rounding up to nearest element"] - #[doc = " size, etc). The application can use ::cudaDeviceGetLimit() to find out"] - #[doc = " exactly what the limit has been set to."] - #[doc = ""] - #[doc = " Setting each ::cudaLimit has its own specific restrictions, so each is"] - #[doc = " discussed here."] - #[doc = ""] - #[doc = " - ::cudaLimitStackSize controls the stack size in bytes of each GPU thread."] - #[doc = ""] - #[doc = " - ::cudaLimitPrintfFifoSize controls the size in bytes of the shared FIFO"] - #[doc = " used by the ::printf() device system call. Setting"] - #[doc = " ::cudaLimitPrintfFifoSize must not be performed after launching any kernel"] - #[doc = " that uses the ::printf() device system call - in such case"] - #[doc = " ::cudaErrorInvalidValue will be returned."] - #[doc = ""] - #[doc = " - ::cudaLimitMallocHeapSize controls the size in bytes of the heap used by"] - #[doc = " the ::malloc() and ::free() device system calls. Setting"] - #[doc = " ::cudaLimitMallocHeapSize must not be performed after launching any kernel"] - #[doc = " that uses the ::malloc() or ::free() device system calls - in such case"] - #[doc = " ::cudaErrorInvalidValue will be returned."] - #[doc = ""] - #[doc = " - ::cudaLimitDevRuntimeSyncDepth controls the maximum nesting depth of a"] - #[doc = " grid at which a thread can safely call ::cudaDeviceSynchronize(). Setting"] - #[doc = " this limit must be performed before any launch of a kernel that uses the"] - #[doc = " device runtime and calls ::cudaDeviceSynchronize() above the default sync"] - #[doc = " depth, two levels of grids. Calls to ::cudaDeviceSynchronize() will fail"] - #[doc = " with error code ::cudaErrorSyncDepthExceeded if the limitation is"] - #[doc = " violated. This limit can be set smaller than the default or up the maximum"] - #[doc = " launch depth of 24. When setting this limit, keep in mind that additional"] - #[doc = " levels of sync depth require the runtime to reserve large amounts of"] - #[doc = " device memory which can no longer be used for user allocations. If these"] - #[doc = " reservations of device memory fail, ::cudaDeviceSetLimit will return"] - #[doc = " ::cudaErrorMemoryAllocation, and the limit can be reset to a lower value."] - #[doc = " This limit is only applicable to devices of compute capability 3.5 and"] - #[doc = " higher. Attempting to set this limit on devices of compute capability less"] - #[doc = " than 3.5 will result in the error ::cudaErrorUnsupportedLimit being"] - #[doc = " returned."] - #[doc = ""] - #[doc = " - ::cudaLimitDevRuntimePendingLaunchCount controls the maximum number of"] - #[doc = " outstanding device runtime launches that can be made from the current"] - #[doc = " device. A grid is outstanding from the point of launch up until the grid"] - #[doc = " is known to have been completed. Device runtime launches which violate"] - #[doc = " this limitation fail and return ::cudaErrorLaunchPendingCountExceeded when"] - #[doc = " ::cudaGetLastError() is called after launch. If more pending launches than"] - #[doc = " the default (2048 launches) are needed for a module using the device"] - #[doc = " runtime, this limit can be increased. Keep in mind that being able to"] - #[doc = " sustain additional pending launches will require the runtime to reserve"] - #[doc = " larger amounts of device memory upfront which can no longer be used for"] - #[doc = " allocations. If these reservations fail, ::cudaDeviceSetLimit will return"] - #[doc = " ::cudaErrorMemoryAllocation, and the limit can be reset to a lower value."] - #[doc = " This limit is only applicable to devices of compute capability 3.5 and"] - #[doc = " higher. Attempting to set this limit on devices of compute capability less"] - #[doc = " than 3.5 will result in the error ::cudaErrorUnsupportedLimit being"] - #[doc = " returned."] - #[doc = ""] - #[doc = " - ::cudaLimitMaxL2FetchGranularity controls the L2 cache fetch granularity."] - #[doc = " Values can range from 0B to 128B. This is purely a performance hint and"] - #[doc = " it can be ignored or clamped depending on the platform."] - #[doc = ""] - #[doc = " - ::cudaLimitPersistingL2CacheSize controls size in bytes available"] - #[doc = " for persisting L2 cache. This is purely a performance hint and it"] - #[doc = " can be ignored or clamped depending on the platform."] - #[doc = ""] - #[doc = " \\param limit - Limit to set"] - #[doc = " \\param value - Size of limit"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorUnsupportedLimit,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDeviceGetLimit,"] - #[doc = " ::cuCtxSetLimit"] pub fn cudaDeviceSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns resource limits"] - #[doc = ""] - #[doc = " Returns in \\p *pValue the current size of \\p limit. The supported"] - #[doc = " ::cudaLimit values are:"] - #[doc = " - ::cudaLimitStackSize: stack size in bytes of each GPU thread;"] - #[doc = " - ::cudaLimitPrintfFifoSize: size in bytes of the shared FIFO used by the"] - #[doc = " ::printf() device system call."] - #[doc = " - ::cudaLimitMallocHeapSize: size in bytes of the heap used by the"] - #[doc = " ::malloc() and ::free() device system calls;"] - #[doc = " - ::cudaLimitDevRuntimeSyncDepth: maximum grid depth at which a"] - #[doc = " thread can isssue the device runtime call ::cudaDeviceSynchronize()"] - #[doc = " to wait on child grid launches to complete."] - #[doc = " - ::cudaLimitDevRuntimePendingLaunchCount: maximum number of outstanding"] - #[doc = " device runtime launches."] - #[doc = " - ::cudaLimitMaxL2FetchGranularity: L2 cache fetch granularity."] - #[doc = " - ::cudaLimitPersistingL2CacheSize: Persisting L2 cache size in bytes"] - #[doc = ""] - #[doc = " \\param limit - Limit to query"] - #[doc = " \\param pValue - Returned size of the limit"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorUnsupportedLimit,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDeviceSetLimit,"] - #[doc = " ::cuCtxGetLimit"] pub fn cudaDeviceGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; } extern "C" { @@ -6872,248 +7984,30 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the preferred cache configuration for the current device."] - #[doc = ""] - #[doc = " On devices where the L1 cache and shared memory use the same hardware"] - #[doc = " resources, this returns through \\p pCacheConfig the preferred cache"] - #[doc = " configuration for the current device. This is only a preference. The"] - #[doc = " runtime will use the requested configuration if possible, but it is free to"] - #[doc = " choose a different configuration if required to execute functions."] - #[doc = ""] - #[doc = " This will return a \\p pCacheConfig of ::cudaFuncCachePreferNone on devices"] - #[doc = " where the size of the L1 cache and shared memory are fixed."] - #[doc = ""] - #[doc = " The supported cache configurations are:"] - #[doc = " - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)"] - #[doc = " - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache"] - #[doc = " - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory"] - #[doc = " - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory"] - #[doc = ""] - #[doc = " \\param pCacheConfig - Returned cache configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSetCacheConfig,"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\","] - #[doc = " \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\","] - #[doc = " ::cuCtxGetCacheConfig"] pub fn cudaDeviceGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns numerical values that correspond to the least and"] - #[doc = " greatest stream priorities."] - #[doc = ""] - #[doc = " Returns in \\p *leastPriority and \\p *greatestPriority the numerical values that correspond"] - #[doc = " to the least and greatest stream priorities respectively. Stream priorities"] - #[doc = " follow a convention where lower numbers imply greater priorities. The range of"] - #[doc = " meaningful stream priorities is given by [\\p *greatestPriority, \\p *leastPriority]."] - #[doc = " If the user attempts to create a stream with a priority value that is"] - #[doc = " outside the the meaningful range as specified by this API, the priority is"] - #[doc = " automatically clamped down or up to either \\p *leastPriority or \\p *greatestPriority"] - #[doc = " respectively. See ::cudaStreamCreateWithPriority for details on creating a"] - #[doc = " priority stream."] - #[doc = " A NULL may be passed in for \\p *leastPriority or \\p *greatestPriority if the value"] - #[doc = " is not desired."] - #[doc = ""] - #[doc = " This function will return '0' in both \\p *leastPriority and \\p *greatestPriority if"] - #[doc = " the current context's device does not support stream priorities"] - #[doc = " (see ::cudaDeviceGetAttribute)."] - #[doc = ""] - #[doc = " \\param leastPriority - Pointer to an int in which the numerical value for least"] - #[doc = " stream priority is returned"] - #[doc = " \\param greatestPriority - Pointer to an int in which the numerical value for greatest"] - #[doc = " stream priority is returned"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreateWithPriority,"] - #[doc = " ::cudaStreamGetPriority,"] - #[doc = " ::cuCtxGetStreamPriorityRange"] pub fn cudaDeviceGetStreamPriorityRange( leastPriority: *mut ::libc::c_int, greatestPriority: *mut ::libc::c_int, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the preferred cache configuration for the current device."] - #[doc = ""] - #[doc = " On devices where the L1 cache and shared memory use the same hardware"] - #[doc = " resources, this sets through \\p cacheConfig the preferred cache"] - #[doc = " configuration for the current device. This is only a preference. The"] - #[doc = " runtime will use the requested configuration if possible, but it is free to"] - #[doc = " choose a different configuration if required to execute the function. Any"] - #[doc = " function preference set via"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\""] - #[doc = " or"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\""] - #[doc = " will be preferred over this device-wide setting. Setting the device-wide"] - #[doc = " cache configuration to ::cudaFuncCachePreferNone will cause subsequent"] - #[doc = " kernel launches to prefer to not change the cache configuration unless"] - #[doc = " required to launch the kernel."] - #[doc = ""] - #[doc = " This setting does nothing on devices where the size of the L1 cache and"] - #[doc = " shared memory are fixed."] - #[doc = ""] - #[doc = " Launching a kernel with a different preference than the most recent"] - #[doc = " preference setting may insert a device-side synchronization point."] - #[doc = ""] - #[doc = " The supported cache configurations are:"] - #[doc = " - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)"] - #[doc = " - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache"] - #[doc = " - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory"] - #[doc = " - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory"] - #[doc = ""] - #[doc = " \\param cacheConfig - Requested cache configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceGetCacheConfig,"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\","] - #[doc = " \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\","] - #[doc = " ::cuCtxSetCacheConfig"] pub fn cudaDeviceSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the shared memory configuration for the current device."] - #[doc = ""] - #[doc = " This function will return in \\p pConfig the current size of shared memory banks"] - #[doc = " on the current device. On devices with configurable shared memory banks,"] - #[doc = " ::cudaDeviceSetSharedMemConfig can be used to change this setting, so that all"] - #[doc = " subsequent kernel launches will by default use the new bank size. When"] - #[doc = " ::cudaDeviceGetSharedMemConfig is called on devices without configurable shared"] - #[doc = " memory, it will return the fixed bank size of the hardware."] - #[doc = ""] - #[doc = " The returned bank configurations can be either:"] - #[doc = " - ::cudaSharedMemBankSizeFourByte - shared memory bank width is four bytes."] - #[doc = " - ::cudaSharedMemBankSizeEightByte - shared memory bank width is eight bytes."] - #[doc = ""] - #[doc = " \\param pConfig - Returned cache configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSetCacheConfig,"] - #[doc = " ::cudaDeviceGetCacheConfig,"] - #[doc = " ::cudaDeviceSetSharedMemConfig,"] - #[doc = " ::cudaFuncSetCacheConfig,"] - #[doc = " ::cuCtxGetSharedMemConfig"] pub fn cudaDeviceGetSharedMemConfig(pConfig: *mut cudaSharedMemConfig) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the shared memory configuration for the current device."] - #[doc = ""] - #[doc = " On devices with configurable shared memory banks, this function will set"] - #[doc = " the shared memory bank size which is used for all subsequent kernel launches."] - #[doc = " Any per-function setting of shared memory set via ::cudaFuncSetSharedMemConfig"] - #[doc = " will override the device wide setting."] - #[doc = ""] - #[doc = " Changing the shared memory configuration between launches may introduce"] - #[doc = " a device side synchronization point."] - #[doc = ""] - #[doc = " Changing the shared memory bank size will not increase shared memory usage"] - #[doc = " or affect occupancy of kernels, but may have major effects on performance."] - #[doc = " Larger bank sizes will allow for greater potential bandwidth to shared memory,"] - #[doc = " but will change what kinds of accesses to shared memory will result in bank"] - #[doc = " conflicts."] - #[doc = ""] - #[doc = " This function will do nothing on devices with fixed shared memory bank size."] - #[doc = ""] - #[doc = " The supported bank configurations are:"] - #[doc = " - ::cudaSharedMemBankSizeDefault: set bank width the device default (currently,"] - #[doc = " four bytes)"] - #[doc = " - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be four bytes"] - #[doc = " natively."] - #[doc = " - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight"] - #[doc = " bytes natively."] - #[doc = ""] - #[doc = " \\param config - Requested cache configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSetCacheConfig,"] - #[doc = " ::cudaDeviceGetCacheConfig,"] - #[doc = " ::cudaDeviceGetSharedMemConfig,"] - #[doc = " ::cudaFuncSetCacheConfig,"] - #[doc = " ::cuCtxSetSharedMemConfig"] pub fn cudaDeviceSetSharedMemConfig(config: cudaSharedMemConfig) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a handle to a compute device"] - #[doc = ""] - #[doc = " Returns in \\p *device a device ordinal given a PCI bus ID string."] - #[doc = ""] - #[doc = " \\param device - Returned device ordinal"] - #[doc = ""] - #[doc = " \\param pciBusId - String in one of the following forms:"] - #[doc = " [domain]:[bus]:[device].[function]"] - #[doc = " [domain]:[bus]:[device]"] - #[doc = " [bus]:[device].[function]"] - #[doc = " where \\p domain, \\p bus, \\p device, and \\p function are all hexadecimal values"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDeviceGetPCIBusId,"] - #[doc = " ::cuDeviceGetByPCIBusId"] pub fn cudaDeviceGetByPCIBusId( device: *mut ::libc::c_int, pciBusId: *const ::libc::c_char, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a PCI Bus Id string for the device"] - #[doc = ""] - #[doc = " Returns an ASCII string identifying the device \\p dev in the NULL-terminated"] - #[doc = " string pointed to by \\p pciBusId. \\p len specifies the maximum length of the"] - #[doc = " string that may be returned."] - #[doc = ""] - #[doc = " \\param pciBusId - Returned identifier string for the device in the following format"] - #[doc = " [domain]:[bus]:[device].[function]"] - #[doc = " where \\p domain, \\p bus, \\p device, and \\p function are all hexadecimal values."] - #[doc = " pciBusId should be large enough to store 13 characters including the NULL-terminator."] - #[doc = ""] - #[doc = " \\param len - Maximum length of string to store in \\p name"] - #[doc = ""] - #[doc = " \\param device - Device to get identifier string for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDeviceGetByPCIBusId,"] - #[doc = " ::cuDeviceGetPCIBusId"] pub fn cudaDeviceGetPCIBusId( pciBusId: *mut ::libc::c_char, len: ::libc::c_int, @@ -7121,203 +8015,24 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets an interprocess handle for a previously allocated event"] - #[doc = ""] - #[doc = " Takes as input a previously allocated event. This event must have been"] - #[doc = " created with the ::cudaEventInterprocess and ::cudaEventDisableTiming"] - #[doc = " flags set. This opaque handle may be copied into other processes and"] - #[doc = " opened with ::cudaIpcOpenEventHandle to allow efficient hardware"] - #[doc = " synchronization between GPU work in different processes."] - #[doc = ""] - #[doc = " After the event has been been opened in the importing process,"] - #[doc = " ::cudaEventRecord, ::cudaEventSynchronize, ::cudaStreamWaitEvent and"] - #[doc = " ::cudaEventQuery may be used in either process. Performing operations"] - #[doc = " on the imported event after the exported event has been freed"] - #[doc = " with ::cudaEventDestroy will result in undefined behavior."] - #[doc = ""] - #[doc = " IPC functionality is restricted to devices with support for unified"] - #[doc = " addressing on Linux operating systems. IPC functionality is not supported"] - #[doc = " on Tegra platforms."] - #[doc = ""] - #[doc = " \\param handle - Pointer to a user allocated cudaIpcEventHandle"] - #[doc = " in which to return the opaque event handle"] - #[doc = " \\param event - Event allocated with ::cudaEventInterprocess and"] - #[doc = " ::cudaEventDisableTiming flags."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorMemoryAllocation,"] - #[doc = " ::cudaErrorMapBufferObjectFailed,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaEventCreate,"] - #[doc = " ::cudaEventDestroy,"] - #[doc = " ::cudaEventSynchronize,"] - #[doc = " ::cudaEventQuery,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaIpcOpenEventHandle,"] - #[doc = " ::cudaIpcGetMemHandle,"] - #[doc = " ::cudaIpcOpenMemHandle,"] - #[doc = " ::cudaIpcCloseMemHandle,"] - #[doc = " ::cuIpcGetEventHandle"] pub fn cudaIpcGetEventHandle( handle: *mut cudaIpcEventHandle_t, event: cudaEvent_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Opens an interprocess event handle for use in the current process"] - #[doc = ""] - #[doc = " Opens an interprocess event handle exported from another process with"] - #[doc = " ::cudaIpcGetEventHandle. This function returns a ::cudaEvent_t that behaves like"] - #[doc = " a locally created event with the ::cudaEventDisableTiming flag specified."] - #[doc = " This event must be freed with ::cudaEventDestroy."] - #[doc = ""] - #[doc = " Performing operations on the imported event after the exported event has"] - #[doc = " been freed with ::cudaEventDestroy will result in undefined behavior."] - #[doc = ""] - #[doc = " IPC functionality is restricted to devices with support for unified"] - #[doc = " addressing on Linux operating systems. IPC functionality is not supported"] - #[doc = " on Tegra platforms."] - #[doc = ""] - #[doc = " \\param event - Returns the imported event"] - #[doc = " \\param handle - Interprocess handle to open"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorMapBufferObjectFailed,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorDeviceUninitialized"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaEventCreate,"] - #[doc = " ::cudaEventDestroy,"] - #[doc = " ::cudaEventSynchronize,"] - #[doc = " ::cudaEventQuery,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaIpcGetEventHandle,"] - #[doc = " ::cudaIpcGetMemHandle,"] - #[doc = " ::cudaIpcOpenMemHandle,"] - #[doc = " ::cudaIpcCloseMemHandle,"] - #[doc = " ::cuIpcOpenEventHandle"] pub fn cudaIpcOpenEventHandle( event: *mut cudaEvent_t, handle: cudaIpcEventHandle_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets an interprocess memory handle for an existing device memory"] - #[doc = " allocation"] - #[doc = ""] - #[doc = " Takes a pointer to the base of an existing device memory allocation created"] - #[doc = " with ::cudaMalloc and exports it for use in another process. This is a"] - #[doc = " lightweight operation and may be called multiple times on an allocation"] - #[doc = " without adverse effects."] - #[doc = ""] - #[doc = " If a region of memory is freed with ::cudaFree and a subsequent call"] - #[doc = " to ::cudaMalloc returns memory with the same device address,"] - #[doc = " ::cudaIpcGetMemHandle will return a unique handle for the"] - #[doc = " new memory."] - #[doc = ""] - #[doc = " IPC functionality is restricted to devices with support for unified"] - #[doc = " addressing on Linux operating systems. IPC functionality is not supported"] - #[doc = " on Tegra platforms."] - #[doc = ""] - #[doc = " \\param handle - Pointer to user allocated ::cudaIpcMemHandle to return"] - #[doc = " the handle in."] - #[doc = " \\param devPtr - Base pointer to previously allocated device memory"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorMemoryAllocation,"] - #[doc = " ::cudaErrorMapBufferObjectFailed,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMalloc,"] - #[doc = " ::cudaFree,"] - #[doc = " ::cudaIpcGetEventHandle,"] - #[doc = " ::cudaIpcOpenEventHandle,"] - #[doc = " ::cudaIpcOpenMemHandle,"] - #[doc = " ::cudaIpcCloseMemHandle,"] - #[doc = " ::cuIpcGetMemHandle"] pub fn cudaIpcGetMemHandle( handle: *mut cudaIpcMemHandle_t, devPtr: *mut ::libc::c_void, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Opens an interprocess memory handle exported from another process"] - #[doc = " and returns a device pointer usable in the local process."] - #[doc = ""] - #[doc = " Maps memory exported from another process with ::cudaIpcGetMemHandle into"] - #[doc = " the current device address space. For contexts on different devices"] - #[doc = " ::cudaIpcOpenMemHandle can attempt to enable peer access between the"] - #[doc = " devices as if the user called ::cudaDeviceEnablePeerAccess. This behavior is"] - #[doc = " controlled by the ::cudaIpcMemLazyEnablePeerAccess flag."] - #[doc = " ::cudaDeviceCanAccessPeer can determine if a mapping is possible."] - #[doc = ""] - #[doc = " ::cudaIpcOpenMemHandle can open handles to devices that may not be visible"] - #[doc = " in the process calling the API."] - #[doc = ""] - #[doc = " Contexts that may open ::cudaIpcMemHandles are restricted in the following way."] - #[doc = " ::cudaIpcMemHandles from each device in a given process may only be opened"] - #[doc = " by one context per device per other process."] - #[doc = ""] - #[doc = " If the memory handle has already been opened by the current context, the"] - #[doc = " reference count on the handle is incremented by 1 and the existing device pointer"] - #[doc = " is returned."] - #[doc = ""] - #[doc = " Memory returned from ::cudaIpcOpenMemHandle must be freed with"] - #[doc = " ::cudaIpcCloseMemHandle."] - #[doc = ""] - #[doc = " Calling ::cudaFree on an exported memory region before calling"] - #[doc = " ::cudaIpcCloseMemHandle in the importing context will result in undefined"] - #[doc = " behavior."] - #[doc = ""] - #[doc = " IPC functionality is restricted to devices with support for unified"] - #[doc = " addressing on Linux operating systems. IPC functionality is not supported"] - #[doc = " on Tegra platforms."] - #[doc = ""] - #[doc = " \\param devPtr - Returned device pointer"] - #[doc = " \\param handle - ::cudaIpcMemHandle to open"] - #[doc = " \\param flags - Flags for this operation. Must be specified as ::cudaIpcMemLazyEnablePeerAccess"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorMapBufferObjectFailed,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorDeviceUninitialized,"] - #[doc = " ::cudaErrorTooManyPeers,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\note No guarantees are made about the address returned in \\p *devPtr."] - #[doc = " In particular, multiple processes may not receive the same address for the same \\p handle."] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMalloc,"] - #[doc = " ::cudaFree,"] - #[doc = " ::cudaIpcGetEventHandle,"] - #[doc = " ::cudaIpcOpenEventHandle,"] - #[doc = " ::cudaIpcGetMemHandle,"] - #[doc = " ::cudaIpcCloseMemHandle,"] - #[doc = " ::cudaDeviceEnablePeerAccess,"] - #[doc = " ::cudaDeviceCanAccessPeer,"] - #[doc = " ::cuIpcOpenMemHandle"] pub fn cudaIpcOpenMemHandle( devPtr: *mut *mut ::libc::c_void, handle: cudaIpcMemHandle_t, @@ -7325,38 +8040,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Attempts to close memory mapped with cudaIpcOpenMemHandle"] - #[doc = ""] - #[doc = " Decrements the reference count of the memory returnd by ::cudaIpcOpenMemHandle by 1."] - #[doc = " When the reference count reaches 0, this API unmaps the memory. The original allocation"] - #[doc = " in the exporting process as well as imported mappings in other processes"] - #[doc = " will be unaffected."] - #[doc = ""] - #[doc = " Any resources used to enable peer access will be freed if this is the"] - #[doc = " last mapping using them."] - #[doc = ""] - #[doc = " IPC functionality is restricted to devices with support for unified"] - #[doc = " addressing on Linux operating systems. IPC functionality is not supported"] - #[doc = " on Tegra platforms."] - #[doc = ""] - #[doc = " \\param devPtr - Device pointer returned by ::cudaIpcOpenMemHandle"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorMapBufferObjectFailed,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMalloc,"] - #[doc = " ::cudaFree,"] - #[doc = " ::cudaIpcGetEventHandle,"] - #[doc = " ::cudaIpcOpenEventHandle,"] - #[doc = " ::cudaIpcGetMemHandle,"] - #[doc = " ::cudaIpcOpenMemHandle,"] - #[doc = " ::cuIpcCloseMemHandle"] pub fn cudaIpcCloseMemHandle(devPtr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { @@ -7366,831 +8049,43 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Exit and clean up from CUDA launches"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Note that this function is deprecated because its name does not"] - #[doc = " reflect its behavior. Its functionality is identical to the"] - #[doc = " non-deprecated function ::cudaDeviceReset(), which should be used"] - #[doc = " instead."] - #[doc = ""] - #[doc = " Explicitly destroys all cleans up all resources associated with the current"] - #[doc = " device in the current process. Any subsequent API call to this device will"] - #[doc = " reinitialize the device."] - #[doc = ""] - #[doc = " Note that this function will reset the device immediately. It is the caller's"] - #[doc = " responsibility to ensure that the device is not being accessed by any"] - #[doc = " other host threads from the process when this function is called."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceReset"] pub fn cudaThreadExit() -> cudaError_t; } extern "C" { - #[doc = " \\brief Wait for compute device to finish"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Note that this function is deprecated because its name does not"] - #[doc = " reflect its behavior. Its functionality is similar to the"] - #[doc = " non-deprecated function ::cudaDeviceSynchronize(), which should be used"] - #[doc = " instead."] - #[doc = ""] - #[doc = " Blocks until the device has completed all preceding requested tasks."] - #[doc = " ::cudaThreadSynchronize() returns an error if one of the preceding tasks"] - #[doc = " has failed. If the ::cudaDeviceScheduleBlockingSync flag was set for"] - #[doc = " this device, the host thread will block until the device has finished"] - #[doc = " its work."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSynchronize"] pub fn cudaThreadSynchronize() -> cudaError_t; } extern "C" { - #[doc = " \\brief Set resource limits"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Note that this function is deprecated because its name does not"] - #[doc = " reflect its behavior. Its functionality is identical to the"] - #[doc = " non-deprecated function ::cudaDeviceSetLimit(), which should be used"] - #[doc = " instead."] - #[doc = ""] - #[doc = " Setting \\p limit to \\p value is a request by the application to update"] - #[doc = " the current limit maintained by the device. The driver is free to"] - #[doc = " modify the requested value to meet h/w requirements (this could be"] - #[doc = " clamping to minimum or maximum values, rounding up to nearest element"] - #[doc = " size, etc). The application can use ::cudaThreadGetLimit() to find out"] - #[doc = " exactly what the limit has been set to."] - #[doc = ""] - #[doc = " Setting each ::cudaLimit has its own specific restrictions, so each is"] - #[doc = " discussed here."] - #[doc = ""] - #[doc = " - ::cudaLimitStackSize controls the stack size of each GPU thread."] - #[doc = ""] - #[doc = " - ::cudaLimitPrintfFifoSize controls the size of the shared FIFO"] - #[doc = " used by the ::printf() device system call."] - #[doc = " Setting ::cudaLimitPrintfFifoSize must be performed before"] - #[doc = " launching any kernel that uses the ::printf() device"] - #[doc = " system call, otherwise ::cudaErrorInvalidValue will be returned."] - #[doc = ""] - #[doc = " - ::cudaLimitMallocHeapSize controls the size of the heap used"] - #[doc = " by the ::malloc() and ::free() device system calls. Setting"] - #[doc = " ::cudaLimitMallocHeapSize must be performed before launching"] - #[doc = " any kernel that uses the ::malloc() or ::free() device system calls,"] - #[doc = " otherwise ::cudaErrorInvalidValue will be returned."] - #[doc = ""] - #[doc = " \\param limit - Limit to set"] - #[doc = " \\param value - Size in bytes of limit"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorUnsupportedLimit,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSetLimit"] pub fn cudaThreadSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns resource limits"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Note that this function is deprecated because its name does not"] - #[doc = " reflect its behavior. Its functionality is identical to the"] - #[doc = " non-deprecated function ::cudaDeviceGetLimit(), which should be used"] - #[doc = " instead."] - #[doc = ""] - #[doc = " Returns in \\p *pValue the current size of \\p limit. The supported"] - #[doc = " ::cudaLimit values are:"] - #[doc = " - ::cudaLimitStackSize: stack size of each GPU thread;"] - #[doc = " - ::cudaLimitPrintfFifoSize: size of the shared FIFO used by the"] - #[doc = " ::printf() device system call."] - #[doc = " - ::cudaLimitMallocHeapSize: size of the heap used by the"] - #[doc = " ::malloc() and ::free() device system calls;"] - #[doc = ""] - #[doc = " \\param limit - Limit to query"] - #[doc = " \\param pValue - Returned size in bytes of limit"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorUnsupportedLimit,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceGetLimit"] pub fn cudaThreadGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the preferred cache configuration for the current device."] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Note that this function is deprecated because its name does not"] - #[doc = " reflect its behavior. Its functionality is identical to the"] - #[doc = " non-deprecated function ::cudaDeviceGetCacheConfig(), which should be"] - #[doc = " used instead."] - #[doc = ""] - #[doc = " On devices where the L1 cache and shared memory use the same hardware"] - #[doc = " resources, this returns through \\p pCacheConfig the preferred cache"] - #[doc = " configuration for the current device. This is only a preference. The"] - #[doc = " runtime will use the requested configuration if possible, but it is free to"] - #[doc = " choose a different configuration if required to execute functions."] - #[doc = ""] - #[doc = " This will return a \\p pCacheConfig of ::cudaFuncCachePreferNone on devices"] - #[doc = " where the size of the L1 cache and shared memory are fixed."] - #[doc = ""] - #[doc = " The supported cache configurations are:"] - #[doc = " - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)"] - #[doc = " - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache"] - #[doc = " - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory"] - #[doc = ""] - #[doc = " \\param pCacheConfig - Returned cache configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceGetCacheConfig"] pub fn cudaThreadGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the preferred cache configuration for the current device."] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Note that this function is deprecated because its name does not"] - #[doc = " reflect its behavior. Its functionality is identical to the"] - #[doc = " non-deprecated function ::cudaDeviceSetCacheConfig(), which should be"] - #[doc = " used instead."] - #[doc = ""] - #[doc = " On devices where the L1 cache and shared memory use the same hardware"] - #[doc = " resources, this sets through \\p cacheConfig the preferred cache"] - #[doc = " configuration for the current device. This is only a preference. The"] - #[doc = " runtime will use the requested configuration if possible, but it is free to"] - #[doc = " choose a different configuration if required to execute the function. Any"] - #[doc = " function preference set via"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\""] - #[doc = " or"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\""] - #[doc = " will be preferred over this device-wide setting. Setting the device-wide"] - #[doc = " cache configuration to ::cudaFuncCachePreferNone will cause subsequent"] - #[doc = " kernel launches to prefer to not change the cache configuration unless"] - #[doc = " required to launch the kernel."] - #[doc = ""] - #[doc = " This setting does nothing on devices where the size of the L1 cache and"] - #[doc = " shared memory are fixed."] - #[doc = ""] - #[doc = " Launching a kernel with a different preference than the most recent"] - #[doc = " preference setting may insert a device-side synchronization point."] - #[doc = ""] - #[doc = " The supported cache configurations are:"] - #[doc = " - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)"] - #[doc = " - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache"] - #[doc = " - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory"] - #[doc = ""] - #[doc = " \\param cacheConfig - Requested cache configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSetCacheConfig"] pub fn cudaThreadSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the last error from a runtime call"] - #[doc = ""] - #[doc = " Returns the last error that has been produced by any of the runtime calls"] - #[doc = " in the same host thread and resets it to ::cudaSuccess."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorMissingConfiguration,"] - #[doc = " ::cudaErrorMemoryAllocation,"] - #[doc = " ::cudaErrorInitializationError,"] - #[doc = " ::cudaErrorLaunchFailure,"] - #[doc = " ::cudaErrorLaunchTimeout,"] - #[doc = " ::cudaErrorLaunchOutOfResources,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidConfiguration,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorUnmapBufferObjectFailed,"] - #[doc = " ::cudaErrorInvalidDevicePointer,"] - #[doc = " ::cudaErrorInvalidTexture,"] - #[doc = " ::cudaErrorInvalidTextureBinding,"] - #[doc = " ::cudaErrorInvalidChannelDescriptor,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection,"] - #[doc = " ::cudaErrorInvalidFilterSetting,"] - #[doc = " ::cudaErrorInvalidNormSetting,"] - #[doc = " ::cudaErrorUnknown,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorInsufficientDriver,"] - #[doc = " ::cudaErrorNoDevice,"] - #[doc = " ::cudaErrorSetOnActiveProcess,"] - #[doc = " ::cudaErrorStartupFailure,"] - #[doc = " ::cudaErrorInvalidPtx,"] - #[doc = " ::cudaErrorUnsupportedPtxVersion,"] - #[doc = " ::cudaErrorNoKernelImageForDevice,"] - #[doc = " ::cudaErrorJitCompilerNotFound,"] - #[doc = " ::cudaErrorJitCompilationDisabled"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaPeekAtLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError"] pub fn cudaGetLastError() -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the last error from a runtime call"] - #[doc = ""] - #[doc = " Returns the last error that has been produced by any of the runtime calls"] - #[doc = " in the same host thread. Note that this call does not reset the error to"] - #[doc = " ::cudaSuccess like ::cudaGetLastError()."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorMissingConfiguration,"] - #[doc = " ::cudaErrorMemoryAllocation,"] - #[doc = " ::cudaErrorInitializationError,"] - #[doc = " ::cudaErrorLaunchFailure,"] - #[doc = " ::cudaErrorLaunchTimeout,"] - #[doc = " ::cudaErrorLaunchOutOfResources,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidConfiguration,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorUnmapBufferObjectFailed,"] - #[doc = " ::cudaErrorInvalidDevicePointer,"] - #[doc = " ::cudaErrorInvalidTexture,"] - #[doc = " ::cudaErrorInvalidTextureBinding,"] - #[doc = " ::cudaErrorInvalidChannelDescriptor,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection,"] - #[doc = " ::cudaErrorInvalidFilterSetting,"] - #[doc = " ::cudaErrorInvalidNormSetting,"] - #[doc = " ::cudaErrorUnknown,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorInsufficientDriver,"] - #[doc = " ::cudaErrorNoDevice,"] - #[doc = " ::cudaErrorSetOnActiveProcess,"] - #[doc = " ::cudaErrorStartupFailure,"] - #[doc = " ::cudaErrorInvalidPtx,"] - #[doc = " ::cudaErrorUnsupportedPtxVersion,"] - #[doc = " ::cudaErrorNoKernelImageForDevice,"] - #[doc = " ::cudaErrorJitCompilerNotFound,"] - #[doc = " ::cudaErrorJitCompilationDisabled"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError"] pub fn cudaPeekAtLastError() -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the string representation of an error code enum name"] - #[doc = ""] - #[doc = " Returns a string containing the name of an error code in the enum. If the error"] - #[doc = " code is not recognized, \"unrecognized error code\" is returned."] - #[doc = ""] - #[doc = " \\param error - Error code to convert to string"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " \\p char* pointer to a NULL-terminated string"] - #[doc = ""] - #[doc = " \\sa ::cudaGetErrorString, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError,"] - #[doc = " ::cuGetErrorName"] pub fn cudaGetErrorName(error: cudaError_t) -> *const ::libc::c_char; } extern "C" { - #[doc = " \\brief Returns the description string for an error code"] - #[doc = ""] - #[doc = " Returns the description string for an error code. If the error"] - #[doc = " code is not recognized, \"unrecognized error code\" is returned."] - #[doc = ""] - #[doc = " \\param error - Error code to convert to string"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " \\p char* pointer to a NULL-terminated string"] - #[doc = ""] - #[doc = " \\sa ::cudaGetErrorName, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError,"] - #[doc = " ::cuGetErrorString"] pub fn cudaGetErrorString(error: cudaError_t) -> *const ::libc::c_char; } extern "C" { - #[doc = " \\brief Returns the number of compute-capable devices"] - #[doc = ""] - #[doc = " Returns in \\p *count the number of devices with compute capability greater"] - #[doc = " or equal to 2.0 that are available for execution."] - #[doc = ""] - #[doc = " \\param count - Returns the number of devices with compute capability"] - #[doc = " greater or equal to 2.0"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDevice, ::cudaSetDevice, ::cudaGetDeviceProperties,"] - #[doc = " ::cudaChooseDevice,"] - #[doc = " ::cuDeviceGetCount"] pub fn cudaGetDeviceCount(count: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns information about the compute-device"] - #[doc = ""] - #[doc = " Returns in \\p *prop the properties of device \\p dev. The ::cudaDeviceProp"] - #[doc = " structure is defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaDeviceProp {"] - #[doc = "char name[256];"] - #[doc = "cudaUUID_t uuid;"] - #[doc = "size_t totalGlobalMem;"] - #[doc = "size_t sharedMemPerBlock;"] - #[doc = "int regsPerBlock;"] - #[doc = "int warpSize;"] - #[doc = "size_t memPitch;"] - #[doc = "int maxThreadsPerBlock;"] - #[doc = "int maxThreadsDim[3];"] - #[doc = "int maxGridSize[3];"] - #[doc = "int clockRate;"] - #[doc = "size_t totalConstMem;"] - #[doc = "int major;"] - #[doc = "int minor;"] - #[doc = "size_t textureAlignment;"] - #[doc = "size_t texturePitchAlignment;"] - #[doc = "int deviceOverlap;"] - #[doc = "int multiProcessorCount;"] - #[doc = "int kernelExecTimeoutEnabled;"] - #[doc = "int integrated;"] - #[doc = "int canMapHostMemory;"] - #[doc = "int computeMode;"] - #[doc = "int maxTexture1D;"] - #[doc = "int maxTexture1DMipmap;"] - #[doc = "int maxTexture1DLinear;"] - #[doc = "int maxTexture2D[2];"] - #[doc = "int maxTexture2DMipmap[2];"] - #[doc = "int maxTexture2DLinear[3];"] - #[doc = "int maxTexture2DGather[2];"] - #[doc = "int maxTexture3D[3];"] - #[doc = "int maxTexture3DAlt[3];"] - #[doc = "int maxTextureCubemap;"] - #[doc = "int maxTexture1DLayered[2];"] - #[doc = "int maxTexture2DLayered[3];"] - #[doc = "int maxTextureCubemapLayered[2];"] - #[doc = "int maxSurface1D;"] - #[doc = "int maxSurface2D[2];"] - #[doc = "int maxSurface3D[3];"] - #[doc = "int maxSurface1DLayered[2];"] - #[doc = "int maxSurface2DLayered[3];"] - #[doc = "int maxSurfaceCubemap;"] - #[doc = "int maxSurfaceCubemapLayered[2];"] - #[doc = "size_t surfaceAlignment;"] - #[doc = "int concurrentKernels;"] - #[doc = "int ECCEnabled;"] - #[doc = "int pciBusID;"] - #[doc = "int pciDeviceID;"] - #[doc = "int pciDomainID;"] - #[doc = "int tccDriver;"] - #[doc = "int asyncEngineCount;"] - #[doc = "int unifiedAddressing;"] - #[doc = "int memoryClockRate;"] - #[doc = "int memoryBusWidth;"] - #[doc = "int l2CacheSize;"] - #[doc = "int persistingL2CacheMaxSize;"] - #[doc = "int maxThreadsPerMultiProcessor;"] - #[doc = "int streamPrioritiesSupported;"] - #[doc = "int globalL1CacheSupported;"] - #[doc = "int localL1CacheSupported;"] - #[doc = "size_t sharedMemPerMultiprocessor;"] - #[doc = "int regsPerMultiprocessor;"] - #[doc = "int managedMemory;"] - #[doc = "int isMultiGpuBoard;"] - #[doc = "int multiGpuBoardGroupID;"] - #[doc = "int singleToDoublePrecisionPerfRatio;"] - #[doc = "int pageableMemoryAccess;"] - #[doc = "int concurrentManagedAccess;"] - #[doc = "int computePreemptionSupported;"] - #[doc = "int canUseHostPointerForRegisteredMem;"] - #[doc = "int cooperativeLaunch;"] - #[doc = "int cooperativeMultiDeviceLaunch;"] - #[doc = "int pageableMemoryAccessUsesHostPageTables;"] - #[doc = "int directManagedMemAccessFromHost;"] - #[doc = "int accessPolicyMaxWindowSize;"] - #[doc = "}"] - #[doc = "\\endcode"] - #[doc = " where:"] - #[doc = " - \\ref ::cudaDeviceProp::name \"name[256]\" is an ASCII string identifying"] - #[doc = " the device;"] - #[doc = " - \\ref ::cudaDeviceProp::uuid \"uuid\" is a 16-byte unique identifier."] - #[doc = " - \\ref ::cudaDeviceProp::totalGlobalMem \"totalGlobalMem\" is the total"] - #[doc = " amount of global memory available on the device in bytes;"] - #[doc = " - \\ref ::cudaDeviceProp::sharedMemPerBlock \"sharedMemPerBlock\" is the"] - #[doc = " maximum amount of shared memory available to a thread block in bytes;"] - #[doc = " - \\ref ::cudaDeviceProp::regsPerBlock \"regsPerBlock\" is the maximum number"] - #[doc = " of 32-bit registers available to a thread block;"] - #[doc = " - \\ref ::cudaDeviceProp::warpSize \"warpSize\" is the warp size in threads;"] - #[doc = " - \\ref ::cudaDeviceProp::memPitch \"memPitch\" is the maximum pitch in"] - #[doc = " bytes allowed by the memory copy functions that involve memory regions"] - #[doc = " allocated through ::cudaMallocPitch();"] - #[doc = " - \\ref ::cudaDeviceProp::maxThreadsPerBlock \"maxThreadsPerBlock\" is the"] - #[doc = " maximum number of threads per block;"] - #[doc = " - \\ref ::cudaDeviceProp::maxThreadsDim \"maxThreadsDim[3]\" contains the"] - #[doc = " maximum size of each dimension of a block;"] - #[doc = " - \\ref ::cudaDeviceProp::maxGridSize \"maxGridSize[3]\" contains the"] - #[doc = " maximum size of each dimension of a grid;"] - #[doc = " - \\ref ::cudaDeviceProp::clockRate \"clockRate\" is the clock frequency in"] - #[doc = " kilohertz;"] - #[doc = " - \\ref ::cudaDeviceProp::totalConstMem \"totalConstMem\" is the total amount"] - #[doc = " of constant memory available on the device in bytes;"] - #[doc = " - \\ref ::cudaDeviceProp::major \"major\","] - #[doc = " \\ref ::cudaDeviceProp::minor \"minor\" are the major and minor revision"] - #[doc = " numbers defining the device's compute capability;"] - #[doc = " - \\ref ::cudaDeviceProp::textureAlignment \"textureAlignment\" is the"] - #[doc = " alignment requirement; texture base addresses that are aligned to"] - #[doc = " \\ref ::cudaDeviceProp::textureAlignment \"textureAlignment\" bytes do not"] - #[doc = " need an offset applied to texture fetches;"] - #[doc = " - \\ref ::cudaDeviceProp::texturePitchAlignment \"texturePitchAlignment\" is the"] - #[doc = " pitch alignment requirement for 2D texture references that are bound to"] - #[doc = " pitched memory;"] - #[doc = " - \\ref ::cudaDeviceProp::deviceOverlap \"deviceOverlap\" is 1 if the device"] - #[doc = " can concurrently copy memory between host and device while executing a"] - #[doc = " kernel, or 0 if not. Deprecated, use instead asyncEngineCount."] - #[doc = " - \\ref ::cudaDeviceProp::multiProcessorCount \"multiProcessorCount\" is the"] - #[doc = " number of multiprocessors on the device;"] - #[doc = " - \\ref ::cudaDeviceProp::kernelExecTimeoutEnabled \"kernelExecTimeoutEnabled\""] - #[doc = " is 1 if there is a run time limit for kernels executed on the device, or"] - #[doc = " 0 if not."] - #[doc = " - \\ref ::cudaDeviceProp::integrated \"integrated\" is 1 if the device is an"] - #[doc = " integrated (motherboard) GPU and 0 if it is a discrete (card) component."] - #[doc = " - \\ref ::cudaDeviceProp::canMapHostMemory \"canMapHostMemory\" is 1 if the"] - #[doc = " device can map host memory into the CUDA address space for use with"] - #[doc = " ::cudaHostAlloc()/::cudaHostGetDevicePointer(), or 0 if not;"] - #[doc = " - \\ref ::cudaDeviceProp::computeMode \"computeMode\" is the compute mode"] - #[doc = " that the device is currently in. Available modes are as follows:"] - #[doc = " - cudaComputeModeDefault: Default mode - Device is not restricted and"] - #[doc = " multiple threads can use ::cudaSetDevice() with this device."] - #[doc = " - cudaComputeModeExclusive: Compute-exclusive mode - Only one thread will"] - #[doc = " be able to use ::cudaSetDevice() with this device."] - #[doc = " - cudaComputeModeProhibited: Compute-prohibited mode - No threads can use"] - #[doc = " ::cudaSetDevice() with this device."] - #[doc = " - cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many"] - #[doc = " threads in one process will be able to use ::cudaSetDevice() with this device."] - #[doc = "
If ::cudaSetDevice() is called on an already occupied \\p device with"] - #[doc = " computeMode ::cudaComputeModeExclusive, ::cudaErrorDeviceAlreadyInUse"] - #[doc = " will be immediately returned indicating the device cannot be used."] - #[doc = " When an occupied exclusive mode device is chosen with ::cudaSetDevice,"] - #[doc = " all subsequent non-device management runtime functions will return"] - #[doc = " ::cudaErrorDevicesUnavailable."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture1D \"maxTexture1D\" is the maximum 1D"] - #[doc = " texture size."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture1DMipmap \"maxTexture1DMipmap\" is the maximum"] - #[doc = " 1D mipmapped texture texture size."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture1DLinear \"maxTexture1DLinear\" is the maximum"] - #[doc = " 1D texture size for textures bound to linear memory."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture2D \"maxTexture2D[2]\" contains the maximum"] - #[doc = " 2D texture dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture2DMipmap \"maxTexture2DMipmap[2]\" contains the"] - #[doc = " maximum 2D mipmapped texture dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture2DLinear \"maxTexture2DLinear[3]\" contains the"] - #[doc = " maximum 2D texture dimensions for 2D textures bound to pitch linear memory."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture2DGather \"maxTexture2DGather[2]\" contains the"] - #[doc = " maximum 2D texture dimensions if texture gather operations have to be performed."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture3D \"maxTexture3D[3]\" contains the maximum"] - #[doc = " 3D texture dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture3DAlt \"maxTexture3DAlt[3]\""] - #[doc = " contains the maximum alternate 3D texture dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxTextureCubemap \"maxTextureCubemap\" is the"] - #[doc = " maximum cubemap texture width or height."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture1DLayered \"maxTexture1DLayered[2]\" contains"] - #[doc = " the maximum 1D layered texture dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxTexture2DLayered \"maxTexture2DLayered[3]\" contains"] - #[doc = " the maximum 2D layered texture dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxTextureCubemapLayered \"maxTextureCubemapLayered[2]\""] - #[doc = " contains the maximum cubemap layered texture dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxSurface1D \"maxSurface1D\" is the maximum 1D"] - #[doc = " surface size."] - #[doc = " - \\ref ::cudaDeviceProp::maxSurface2D \"maxSurface2D[2]\" contains the maximum"] - #[doc = " 2D surface dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxSurface3D \"maxSurface3D[3]\" contains the maximum"] - #[doc = " 3D surface dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxSurface1DLayered \"maxSurface1DLayered[2]\" contains"] - #[doc = " the maximum 1D layered surface dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxSurface2DLayered \"maxSurface2DLayered[3]\" contains"] - #[doc = " the maximum 2D layered surface dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::maxSurfaceCubemap \"maxSurfaceCubemap\" is the maximum"] - #[doc = " cubemap surface width or height."] - #[doc = " - \\ref ::cudaDeviceProp::maxSurfaceCubemapLayered \"maxSurfaceCubemapLayered[2]\""] - #[doc = " contains the maximum cubemap layered surface dimensions."] - #[doc = " - \\ref ::cudaDeviceProp::surfaceAlignment \"surfaceAlignment\" specifies the"] - #[doc = " alignment requirements for surfaces."] - #[doc = " - \\ref ::cudaDeviceProp::concurrentKernels \"concurrentKernels\" is 1 if the"] - #[doc = " device supports executing multiple kernels within the same context"] - #[doc = " simultaneously, or 0 if not. It is not guaranteed that multiple kernels"] - #[doc = " will be resident on the device concurrently so this feature should not be"] - #[doc = " relied upon for correctness;"] - #[doc = " - \\ref ::cudaDeviceProp::ECCEnabled \"ECCEnabled\" is 1 if the device has ECC"] - #[doc = " support turned on, or 0 if not."] - #[doc = " - \\ref ::cudaDeviceProp::pciBusID \"pciBusID\" is the PCI bus identifier of"] - #[doc = " the device."] - #[doc = " - \\ref ::cudaDeviceProp::pciDeviceID \"pciDeviceID\" is the PCI device"] - #[doc = " (sometimes called slot) identifier of the device."] - #[doc = " - \\ref ::cudaDeviceProp::pciDomainID \"pciDomainID\" is the PCI domain identifier"] - #[doc = " of the device."] - #[doc = " - \\ref ::cudaDeviceProp::tccDriver \"tccDriver\" is 1 if the device is using a"] - #[doc = " TCC driver or 0 if not."] - #[doc = " - \\ref ::cudaDeviceProp::asyncEngineCount \"asyncEngineCount\" is 1 when the"] - #[doc = " device can concurrently copy memory between host and device while executing"] - #[doc = " a kernel. It is 2 when the device can concurrently copy memory between host"] - #[doc = " and device in both directions and execute a kernel at the same time. It is"] - #[doc = " 0 if neither of these is supported."] - #[doc = " - \\ref ::cudaDeviceProp::unifiedAddressing \"unifiedAddressing\" is 1 if the device"] - #[doc = " shares a unified address space with the host and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::memoryClockRate \"memoryClockRate\" is the peak memory"] - #[doc = " clock frequency in kilohertz."] - #[doc = " - \\ref ::cudaDeviceProp::memoryBusWidth \"memoryBusWidth\" is the memory bus width"] - #[doc = " in bits."] - #[doc = " - \\ref ::cudaDeviceProp::l2CacheSize \"l2CacheSize\" is L2 cache size in bytes."] - #[doc = " - \\ref ::cudaDeviceProp::persistingL2CacheMaxSize \"persistingL2CacheMaxSize\" is L2 cache's maximum persisting lines size in bytes."] - #[doc = " - \\ref ::cudaDeviceProp::maxThreadsPerMultiProcessor \"maxThreadsPerMultiProcessor\""] - #[doc = " is the number of maximum resident threads per multiprocessor."] - #[doc = " - \\ref ::cudaDeviceProp::streamPrioritiesSupported \"streamPrioritiesSupported\""] - #[doc = " is 1 if the device supports stream priorities, or 0 if it is not supported."] - #[doc = " - \\ref ::cudaDeviceProp::globalL1CacheSupported \"globalL1CacheSupported\""] - #[doc = " is 1 if the device supports caching of globals in L1 cache, or 0 if it is not supported."] - #[doc = " - \\ref ::cudaDeviceProp::localL1CacheSupported \"localL1CacheSupported\""] - #[doc = " is 1 if the device supports caching of locals in L1 cache, or 0 if it is not supported."] - #[doc = " - \\ref ::cudaDeviceProp::sharedMemPerMultiprocessor \"sharedMemPerMultiprocessor\" is the"] - #[doc = " maximum amount of shared memory available to a multiprocessor in bytes; this amount is"] - #[doc = " shared by all thread blocks simultaneously resident on a multiprocessor;"] - #[doc = " - \\ref ::cudaDeviceProp::regsPerMultiprocessor \"regsPerMultiprocessor\" is the maximum number"] - #[doc = " of 32-bit registers available to a multiprocessor; this number is shared"] - #[doc = " by all thread blocks simultaneously resident on a multiprocessor;"] - #[doc = " - \\ref ::cudaDeviceProp::managedMemory \"managedMemory\""] - #[doc = " is 1 if the device supports allocating managed memory on this system, or 0 if it is not supported."] - #[doc = " - \\ref ::cudaDeviceProp::isMultiGpuBoard \"isMultiGpuBoard\""] - #[doc = " is 1 if the device is on a multi-GPU board (e.g. Gemini cards), and 0 if not;"] - #[doc = " - \\ref ::cudaDeviceProp::multiGpuBoardGroupID \"multiGpuBoardGroupID\" is a unique identifier"] - #[doc = " for a group of devices associated with the same board."] - #[doc = " Devices on the same multi-GPU board will share the same identifier;"] - #[doc = " - \\ref ::cudaDeviceProp::singleToDoublePrecisionPerfRatio \"singleToDoublePrecisionPerfRatio\""] - #[doc = " is the ratio of single precision performance (in floating-point operations per second)"] - #[doc = " to double precision performance."] - #[doc = " - \\ref ::cudaDeviceProp::pageableMemoryAccess \"pageableMemoryAccess\" is 1 if the device supports"] - #[doc = " coherently accessing pageable memory without calling cudaHostRegister on it, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::concurrentManagedAccess \"concurrentManagedAccess\" is 1 if the device can"] - #[doc = " coherently access managed memory concurrently with the CPU, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::computePreemptionSupported \"computePreemptionSupported\" is 1 if the device"] - #[doc = " supports Compute Preemption, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::canUseHostPointerForRegisteredMem \"canUseHostPointerForRegisteredMem\" is 1 if"] - #[doc = " the device can access host registered memory at the same virtual address as the CPU, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::cooperativeLaunch \"cooperativeLaunch\" is 1 if the device supports launching"] - #[doc = " cooperative kernels via ::cudaLaunchCooperativeKernel, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::cooperativeMultiDeviceLaunch \"cooperativeMultiDeviceLaunch\" is 1 if the device"] - #[doc = " supports launching cooperative kernels via ::cudaLaunchCooperativeKernelMultiDevice, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::pageableMemoryAccessUsesHostPageTables \"pageableMemoryAccessUsesHostPageTables\" is 1 if the device accesses"] - #[doc = " pageable memory via the host's page tables, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::directManagedMemAccessFromHost \"directManagedMemAccessFromHost\" is 1 if the host can directly access managed"] - #[doc = " memory on the device without migration, and 0 otherwise."] - #[doc = " - \\ref ::cudaDeviceProp::maxBlocksPerMultiProcessor \"maxBlocksPerMultiProcessor\" is the maximum number of thread blocks"] - #[doc = " that can reside on a multiprocessor."] - #[doc = " - \\ref ::cudaDeviceProp::accessPolicyMaxWindowSize \"accessPolicyMaxWindowSize\" is"] - #[doc = " the maximum value of ::cudaAccessPolicyWindow::num_bytes."] - #[doc = ""] - #[doc = " \\param prop - Properties for the specified device"] - #[doc = " \\param device - Device number to get properties for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice,"] - #[doc = " ::cudaDeviceGetAttribute,"] - #[doc = " ::cuDeviceGetAttribute,"] - #[doc = " ::cuDeviceGetName"] pub fn cudaGetDeviceProperties(prop: *mut cudaDeviceProp, device: ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns information about the device"] - #[doc = ""] - #[doc = " Returns in \\p *value the integer value of the attribute \\p attr on device"] - #[doc = " \\p device. The supported attributes are:"] - #[doc = " - ::cudaDevAttrMaxThreadsPerBlock: Maximum number of threads per block;"] - #[doc = " - ::cudaDevAttrMaxBlockDimX: Maximum x-dimension of a block;"] - #[doc = " - ::cudaDevAttrMaxBlockDimY: Maximum y-dimension of a block;"] - #[doc = " - ::cudaDevAttrMaxBlockDimZ: Maximum z-dimension of a block;"] - #[doc = " - ::cudaDevAttrMaxGridDimX: Maximum x-dimension of a grid;"] - #[doc = " - ::cudaDevAttrMaxGridDimY: Maximum y-dimension of a grid;"] - #[doc = " - ::cudaDevAttrMaxGridDimZ: Maximum z-dimension of a grid;"] - #[doc = " - ::cudaDevAttrMaxSharedMemoryPerBlock: Maximum amount of shared memory"] - #[doc = " available to a thread block in bytes;"] - #[doc = " - ::cudaDevAttrTotalConstantMemory: Memory available on device for"] - #[doc = " __constant__ variables in a CUDA C kernel in bytes;"] - #[doc = " - ::cudaDevAttrWarpSize: Warp size in threads;"] - #[doc = " - ::cudaDevAttrMaxPitch: Maximum pitch in bytes allowed by the memory copy"] - #[doc = " functions that involve memory regions allocated through ::cudaMallocPitch();"] - #[doc = " - ::cudaDevAttrMaxTexture1DWidth: Maximum 1D texture width;"] - #[doc = " - ::cudaDevAttrMaxTexture1DLinearWidth: Maximum width for a 1D texture bound"] - #[doc = " to linear memory;"] - #[doc = " - ::cudaDevAttrMaxTexture1DMipmappedWidth: Maximum mipmapped 1D texture width;"] - #[doc = " - ::cudaDevAttrMaxTexture2DWidth: Maximum 2D texture width;"] - #[doc = " - ::cudaDevAttrMaxTexture2DHeight: Maximum 2D texture height;"] - #[doc = " - ::cudaDevAttrMaxTexture2DLinearWidth: Maximum width for a 2D texture"] - #[doc = " bound to linear memory;"] - #[doc = " - ::cudaDevAttrMaxTexture2DLinearHeight: Maximum height for a 2D texture"] - #[doc = " bound to linear memory;"] - #[doc = " - ::cudaDevAttrMaxTexture2DLinearPitch: Maximum pitch in bytes for a 2D"] - #[doc = " texture bound to linear memory;"] - #[doc = " - ::cudaDevAttrMaxTexture2DMipmappedWidth: Maximum mipmapped 2D texture"] - #[doc = " width;"] - #[doc = " - ::cudaDevAttrMaxTexture2DMipmappedHeight: Maximum mipmapped 2D texture"] - #[doc = " height;"] - #[doc = " - ::cudaDevAttrMaxTexture3DWidth: Maximum 3D texture width;"] - #[doc = " - ::cudaDevAttrMaxTexture3DHeight: Maximum 3D texture height;"] - #[doc = " - ::cudaDevAttrMaxTexture3DDepth: Maximum 3D texture depth;"] - #[doc = " - ::cudaDevAttrMaxTexture3DWidthAlt: Alternate maximum 3D texture width,"] - #[doc = " 0 if no alternate maximum 3D texture size is supported;"] - #[doc = " - ::cudaDevAttrMaxTexture3DHeightAlt: Alternate maximum 3D texture height,"] - #[doc = " 0 if no alternate maximum 3D texture size is supported;"] - #[doc = " - ::cudaDevAttrMaxTexture3DDepthAlt: Alternate maximum 3D texture depth,"] - #[doc = " 0 if no alternate maximum 3D texture size is supported;"] - #[doc = " - ::cudaDevAttrMaxTextureCubemapWidth: Maximum cubemap texture width or"] - #[doc = " height;"] - #[doc = " - ::cudaDevAttrMaxTexture1DLayeredWidth: Maximum 1D layered texture width;"] - #[doc = " - ::cudaDevAttrMaxTexture1DLayeredLayers: Maximum layers in a 1D layered"] - #[doc = " texture;"] - #[doc = " - ::cudaDevAttrMaxTexture2DLayeredWidth: Maximum 2D layered texture width;"] - #[doc = " - ::cudaDevAttrMaxTexture2DLayeredHeight: Maximum 2D layered texture height;"] - #[doc = " - ::cudaDevAttrMaxTexture2DLayeredLayers: Maximum layers in a 2D layered"] - #[doc = " texture;"] - #[doc = " - ::cudaDevAttrMaxTextureCubemapLayeredWidth: Maximum cubemap layered"] - #[doc = " texture width or height;"] - #[doc = " - ::cudaDevAttrMaxTextureCubemapLayeredLayers: Maximum layers in a cubemap"] - #[doc = " layered texture;"] - #[doc = " - ::cudaDevAttrMaxSurface1DWidth: Maximum 1D surface width;"] - #[doc = " - ::cudaDevAttrMaxSurface2DWidth: Maximum 2D surface width;"] - #[doc = " - ::cudaDevAttrMaxSurface2DHeight: Maximum 2D surface height;"] - #[doc = " - ::cudaDevAttrMaxSurface3DWidth: Maximum 3D surface width;"] - #[doc = " - ::cudaDevAttrMaxSurface3DHeight: Maximum 3D surface height;"] - #[doc = " - ::cudaDevAttrMaxSurface3DDepth: Maximum 3D surface depth;"] - #[doc = " - ::cudaDevAttrMaxSurface1DLayeredWidth: Maximum 1D layered surface width;"] - #[doc = " - ::cudaDevAttrMaxSurface1DLayeredLayers: Maximum layers in a 1D layered"] - #[doc = " surface;"] - #[doc = " - ::cudaDevAttrMaxSurface2DLayeredWidth: Maximum 2D layered surface width;"] - #[doc = " - ::cudaDevAttrMaxSurface2DLayeredHeight: Maximum 2D layered surface height;"] - #[doc = " - ::cudaDevAttrMaxSurface2DLayeredLayers: Maximum layers in a 2D layered"] - #[doc = " surface;"] - #[doc = " - ::cudaDevAttrMaxSurfaceCubemapWidth: Maximum cubemap surface width;"] - #[doc = " - ::cudaDevAttrMaxSurfaceCubemapLayeredWidth: Maximum cubemap layered"] - #[doc = " surface width;"] - #[doc = " - ::cudaDevAttrMaxSurfaceCubemapLayeredLayers: Maximum layers in a cubemap"] - #[doc = " layered surface;"] - #[doc = " - ::cudaDevAttrMaxRegistersPerBlock: Maximum number of 32-bit registers"] - #[doc = " available to a thread block;"] - #[doc = " - ::cudaDevAttrClockRate: Peak clock frequency in kilohertz;"] - #[doc = " - ::cudaDevAttrTextureAlignment: Alignment requirement; texture base"] - #[doc = " addresses aligned to ::textureAlign bytes do not need an offset applied"] - #[doc = " to texture fetches;"] - #[doc = " - ::cudaDevAttrTexturePitchAlignment: Pitch alignment requirement for 2D"] - #[doc = " texture references bound to pitched memory;"] - #[doc = " - ::cudaDevAttrGpuOverlap: 1 if the device can concurrently copy memory"] - #[doc = " between host and device while executing a kernel, or 0 if not;"] - #[doc = " - ::cudaDevAttrMultiProcessorCount: Number of multiprocessors on the device;"] - #[doc = " - ::cudaDevAttrKernelExecTimeout: 1 if there is a run time limit for kernels"] - #[doc = " executed on the device, or 0 if not;"] - #[doc = " - ::cudaDevAttrIntegrated: 1 if the device is integrated with the memory"] - #[doc = " subsystem, or 0 if not;"] - #[doc = " - ::cudaDevAttrCanMapHostMemory: 1 if the device can map host memory into"] - #[doc = " the CUDA address space, or 0 if not;"] - #[doc = " - ::cudaDevAttrComputeMode: Compute mode is the compute mode that the device"] - #[doc = " is currently in. Available modes are as follows:"] - #[doc = " - ::cudaComputeModeDefault: Default mode - Device is not restricted and"] - #[doc = " multiple threads can use ::cudaSetDevice() with this device."] - #[doc = " - ::cudaComputeModeExclusive: Compute-exclusive mode - Only one thread will"] - #[doc = " be able to use ::cudaSetDevice() with this device."] - #[doc = " - ::cudaComputeModeProhibited: Compute-prohibited mode - No threads can use"] - #[doc = " ::cudaSetDevice() with this device."] - #[doc = " - ::cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many"] - #[doc = " threads in one process will be able to use ::cudaSetDevice() with this"] - #[doc = " device."] - #[doc = " - ::cudaDevAttrConcurrentKernels: 1 if the device supports executing"] - #[doc = " multiple kernels within the same context simultaneously, or 0 if"] - #[doc = " not. It is not guaranteed that multiple kernels will be resident on the"] - #[doc = " device concurrently so this feature should not be relied upon for"] - #[doc = " correctness;"] - #[doc = " - ::cudaDevAttrEccEnabled: 1 if error correction is enabled on the device,"] - #[doc = " 0 if error correction is disabled or not supported by the device;"] - #[doc = " - ::cudaDevAttrPciBusId: PCI bus identifier of the device;"] - #[doc = " - ::cudaDevAttrPciDeviceId: PCI device (also known as slot) identifier of"] - #[doc = " the device;"] - #[doc = " - ::cudaDevAttrTccDriver: 1 if the device is using a TCC driver. TCC is only"] - #[doc = " available on Tesla hardware running Windows Vista or later;"] - #[doc = " - ::cudaDevAttrMemoryClockRate: Peak memory clock frequency in kilohertz;"] - #[doc = " - ::cudaDevAttrGlobalMemoryBusWidth: Global memory bus width in bits;"] - #[doc = " - ::cudaDevAttrL2CacheSize: Size of L2 cache in bytes. 0 if the device"] - #[doc = " doesn't have L2 cache;"] - #[doc = " - ::cudaDevAttrMaxThreadsPerMultiProcessor: Maximum resident threads per"] - #[doc = " multiprocessor;"] - #[doc = " - ::cudaDevAttrUnifiedAddressing: 1 if the device shares a unified address"] - #[doc = " space with the host, or 0 if not;"] - #[doc = " - ::cudaDevAttrComputeCapabilityMajor: Major compute capability version"] - #[doc = " number;"] - #[doc = " - ::cudaDevAttrComputeCapabilityMinor: Minor compute capability version"] - #[doc = " number;"] - #[doc = " - ::cudaDevAttrStreamPrioritiesSupported: 1 if the device supports stream"] - #[doc = " priorities, or 0 if not;"] - #[doc = " - ::cudaDevAttrGlobalL1CacheSupported: 1 if device supports caching globals"] - #[doc = " in L1 cache, 0 if not;"] - #[doc = " - ::cudaDevAttrLocalL1CacheSupported: 1 if device supports caching locals"] - #[doc = " in L1 cache, 0 if not;"] - #[doc = " - ::cudaDevAttrMaxSharedMemoryPerMultiprocessor: Maximum amount of shared memory"] - #[doc = " available to a multiprocessor in bytes; this amount is shared by all"] - #[doc = " thread blocks simultaneously resident on a multiprocessor;"] - #[doc = " - ::cudaDevAttrMaxRegistersPerMultiprocessor: Maximum number of 32-bit registers"] - #[doc = " available to a multiprocessor; this number is shared by all thread blocks"] - #[doc = " simultaneously resident on a multiprocessor;"] - #[doc = " - ::cudaDevAttrManagedMemory: 1 if device supports allocating"] - #[doc = " managed memory, 0 if not;"] - #[doc = " - ::cudaDevAttrIsMultiGpuBoard: 1 if device is on a multi-GPU board, 0 if not;"] - #[doc = " - ::cudaDevAttrMultiGpuBoardGroupID: Unique identifier for a group of devices on the"] - #[doc = " same multi-GPU board;"] - #[doc = " - ::cudaDevAttrHostNativeAtomicSupported: 1 if the link between the device and the"] - #[doc = " host supports native atomic operations;"] - #[doc = " - ::cudaDevAttrSingleToDoublePrecisionPerfRatio: Ratio of single precision performance"] - #[doc = " (in floating-point operations per second) to double precision performance;"] - #[doc = " - ::cudaDevAttrPageableMemoryAccess: 1 if the device supports coherently accessing"] - #[doc = " pageable memory without calling cudaHostRegister on it, and 0 otherwise."] - #[doc = " - ::cudaDevAttrConcurrentManagedAccess: 1 if the device can coherently access managed"] - #[doc = " memory concurrently with the CPU, and 0 otherwise."] - #[doc = " - ::cudaDevAttrComputePreemptionSupported: 1 if the device supports"] - #[doc = " Compute Preemption, 0 if not."] - #[doc = " - ::cudaDevAttrCanUseHostPointerForRegisteredMem: 1 if the device can access host"] - #[doc = " registered memory at the same virtual address as the CPU, and 0 otherwise."] - #[doc = " - ::cudaDevAttrCooperativeLaunch: 1 if the device supports launching cooperative kernels"] - #[doc = " via ::cudaLaunchCooperativeKernel, and 0 otherwise."] - #[doc = " - ::cudaDevAttrCooperativeMultiDeviceLaunch: 1 if the device supports launching cooperative"] - #[doc = " kernels via ::cudaLaunchCooperativeKernelMultiDevice, and 0 otherwise."] - #[doc = " - ::cudaDevAttrCanFlushRemoteWrites: 1 if the device supports flushing of outstanding"] - #[doc = " remote writes, and 0 otherwise."] - #[doc = " - ::cudaDevAttrHostRegisterSupported: 1 if the device supports host memory registration"] - #[doc = " via ::cudaHostRegister, and 0 otherwise."] - #[doc = " - ::cudaDevAttrPageableMemoryAccessUsesHostPageTables: 1 if the device accesses pageable memory via the"] - #[doc = " host's page tables, and 0 otherwise."] - #[doc = " - ::cudaDevAttrDirectManagedMemAccessFromHost: 1 if the host can directly access managed memory on the device"] - #[doc = " without migration, and 0 otherwise."] - #[doc = " - ::cudaDevAttrMaxSharedMemoryPerBlockOptin: Maximum per block shared memory size on the device. This value can"] - #[doc = " be opted into when using ::cudaFuncSetAttribute"] - #[doc = " - ::cudaDevAttrMaxBlocksPerMultiprocessor: Maximum number of thread blocks that can reside on a multiprocessor."] - #[doc = " - ::cudaDevAttrMaxPersistingL2CacheSize: Maximum L2 persisting lines capacity setting in bytes."] - #[doc = " - ::cudaDevAttrMaxAccessPolicyWindowSize: Maximum value of cudaAccessPolicyWindow::num_bytes."] - #[doc = " - ::cudaDevAttrHostRegisterReadOnly: Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly"] - #[doc = " to register memory that must be mapped as read-only to the GPU"] - #[doc = " - ::cudaDevAttrSparseCudaArraySupported: 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays."] - #[doc = ""] - #[doc = " \\param value - Returned device attribute value"] - #[doc = " \\param attr - Device attribute to query"] - #[doc = " \\param device - Device number to query"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice,"] - #[doc = " ::cudaGetDeviceProperties,"] - #[doc = " ::cuDeviceGetAttribute"] pub fn cudaDeviceGetAttribute( value: *mut ::libc::c_int, attr: cudaDeviceAttr, @@ -8198,111 +8093,18 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the default mempool of a device"] - #[doc = ""] - #[doc = " The default mempool of a device contains device memory from that device."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuDeviceGetDefaultMemPool, ::cudaMallocAsync, ::cudaMemPoolTrimTo, ::cudaMemPoolGetAttribute, ::cudaDeviceSetMemPool, ::cudaMemPoolSetAttribute, ::cudaMemPoolSetAccess"] pub fn cudaDeviceGetDefaultMemPool( memPool: *mut cudaMemPool_t, device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the current memory pool of a device"] - #[doc = ""] - #[doc = " The memory pool must be local to the specified device."] - #[doc = " Unless a mempool is specified in the ::cudaMallocAsync call,"] - #[doc = " ::cudaMallocAsync allocates from the current mempool of the provided stream's device."] - #[doc = " By default, a device's current memory pool is its default memory pool."] - #[doc = ""] - #[doc = " \\note Use ::cudaMallocFromPoolAsync to specify asynchronous allocations from a device different"] - #[doc = " than the one the stream runs on."] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\notefnerr"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuDeviceSetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolDestroy, ::cudaMallocFromPoolAsync"] pub fn cudaDeviceSetMemPool(device: ::libc::c_int, memPool: cudaMemPool_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets the current mempool for a device"] - #[doc = ""] - #[doc = " Returns the last pool provided to ::cudaDeviceSetMemPool for this device"] - #[doc = " or the device's default memory pool if ::cudaDeviceSetMemPool has never been called."] - #[doc = " By default the current mempool is the default mempool for a device,"] - #[doc = " otherwise the returned pool must have been set with ::cuDeviceSetMemPool or ::cudaDeviceSetMemPool."] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceSetMemPool"] pub fn cudaDeviceGetMemPool(memPool: *mut cudaMemPool_t, device: ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Return NvSciSync attributes that this device can support."] - #[doc = ""] - #[doc = " Returns in \\p nvSciSyncAttrList, the properties of NvSciSync that"] - #[doc = " this CUDA device, \\p dev can support. The returned \\p nvSciSyncAttrList"] - #[doc = " can be used to create an NvSciSync that matches this device's capabilities."] - #[doc = ""] - #[doc = " If NvSciSyncAttrKey_RequiredPerm field in \\p nvSciSyncAttrList is"] - #[doc = " already set this API will return ::cudaErrorInvalidValue."] - #[doc = ""] - #[doc = " The applications should set \\p nvSciSyncAttrList to a valid"] - #[doc = " NvSciSyncAttrList failing which this API will return"] - #[doc = " ::cudaErrorInvalidHandle."] - #[doc = ""] - #[doc = " The \\p flags controls how applications intends to use"] - #[doc = " the NvSciSync created from the \\p nvSciSyncAttrList. The valid flags are:"] - #[doc = " - ::cudaNvSciSyncAttrSignal, specifies that the applications intends to"] - #[doc = " signal an NvSciSync on this CUDA device."] - #[doc = " - ::cudaNvSciSyncAttrWait, specifies that the applications intends to"] - #[doc = " wait on an NvSciSync on this CUDA device."] - #[doc = ""] - #[doc = " At least one of these flags must be set, failing which the API"] - #[doc = " returns ::cudaErrorInvalidValue. Both the flags are orthogonal"] - #[doc = " to one another: a developer may set both these flags that allows to"] - #[doc = " set both wait and signal specific attributes in the same \\p nvSciSyncAttrList."] - #[doc = ""] - #[doc = " \\param nvSciSyncAttrList - Return NvSciSync attributes supported."] - #[doc = " \\param device - Valid Cuda Device to get NvSciSync attributes for."] - #[doc = " \\param flags - flags describing NvSciSync usage."] - #[doc = ""] - #[doc = " \\return"] - #[doc = ""] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorDeviceUninitialized,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidHandle,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaImportExternalSemaphore,"] - #[doc = " ::cudaDestroyExternalSemaphore,"] - #[doc = " ::cudaSignalExternalSemaphoresAsync,"] - #[doc = " ::cudaWaitExternalSemaphoresAsync"] pub fn cudaDeviceGetNvSciSyncAttributes( nvSciSyncAttrList: *mut ::libc::c_void, device: ::libc::c_int, @@ -8310,42 +8112,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Queries attributes of the link between two devices."] - #[doc = ""] - #[doc = " Returns in \\p *value the value of the requested attribute \\p attrib of the"] - #[doc = " link between \\p srcDevice and \\p dstDevice. The supported attributes are:"] - #[doc = " - ::cudaDevP2PAttrPerformanceRank: A relative value indicating the"] - #[doc = " performance of the link between two devices. Lower value means better"] - #[doc = " performance (0 being the value used for most performant link)."] - #[doc = " - ::cudaDevP2PAttrAccessSupported: 1 if peer access is enabled."] - #[doc = " - ::cudaDevP2PAttrNativeAtomicSupported: 1 if native atomic operations over"] - #[doc = " the link are supported."] - #[doc = " - ::cudaDevP2PAttrCudaArrayAccessSupported: 1 if accessing CUDA arrays over"] - #[doc = " the link is supported."] - #[doc = ""] - #[doc = " Returns ::cudaErrorInvalidDevice if \\p srcDevice or \\p dstDevice are not valid"] - #[doc = " or if they represent the same device."] - #[doc = ""] - #[doc = " Returns ::cudaErrorInvalidValue if \\p attrib is not valid or if \\p value is"] - #[doc = " a null pointer."] - #[doc = ""] - #[doc = " \\param value - Returned value of the requested attribute"] - #[doc = " \\param attrib - The requested attribute of the link between \\p srcDevice and \\p dstDevice."] - #[doc = " \\param srcDevice - The source device of the target link."] - #[doc = " \\param dstDevice - The destination device of the target link."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaCtxEnablePeerAccess,"] - #[doc = " ::cudaCtxDisablePeerAccess,"] - #[doc = " ::cudaCtxCanAccessPeer,"] - #[doc = " ::cuDeviceGetP2PAttribute"] pub fn cudaDeviceGetP2PAttribute( value: *mut ::libc::c_int, attr: cudaDeviceP2PAttr, @@ -8354,322 +8120,34 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Select compute-device which best matches criteria"] - #[doc = ""] - #[doc = " Returns in \\p *device the device which has properties that best match"] - #[doc = " \\p *prop."] - #[doc = ""] - #[doc = " \\param device - Device with best match"] - #[doc = " \\param prop - Desired device properties"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice,"] - #[doc = " ::cudaGetDeviceProperties"] pub fn cudaChooseDevice(device: *mut ::libc::c_int, prop: *const cudaDeviceProp) -> cudaError_t; } extern "C" { - #[doc = " \\brief Set device to be used for GPU executions"] - #[doc = ""] - #[doc = " Sets \\p device as the current device for the calling host thread."] - #[doc = " Valid device id's are 0 to (::cudaGetDeviceCount() - 1)."] - #[doc = ""] - #[doc = " Any device memory subsequently allocated from this host thread"] - #[doc = " using ::cudaMalloc(), ::cudaMallocPitch() or ::cudaMallocArray()"] - #[doc = " will be physically resident on \\p device. Any host memory allocated"] - #[doc = " from this host thread using ::cudaMallocHost() or ::cudaHostAlloc()"] - #[doc = " or ::cudaHostRegister() will have its lifetime associated with"] - #[doc = " \\p device. Any streams or events created from this host thread will"] - #[doc = " be associated with \\p device. Any kernels launched from this host"] - #[doc = " thread using the <<<>>> operator or ::cudaLaunchKernel() will be executed"] - #[doc = " on \\p device."] - #[doc = ""] - #[doc = " This call may be made from any host thread, to any device, and at"] - #[doc = " any time. This function will do no synchronization with the previous"] - #[doc = " or new device, and should be considered a very low overhead call."] - #[doc = ""] - #[doc = " \\param device - Device on which the active host thread should execute the"] - #[doc = " device code."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorDeviceAlreadyInUse"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,"] - #[doc = " ::cudaChooseDevice,"] - #[doc = " ::cuCtxSetCurrent"] pub fn cudaSetDevice(device: ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns which device is currently being used"] - #[doc = ""] - #[doc = " Returns in \\p *device the current device for the calling host thread."] - #[doc = ""] - #[doc = " \\param device - Returns the device on which the active host thread"] - #[doc = " executes the device code."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties,"] - #[doc = " ::cudaChooseDevice,"] - #[doc = " ::cuCtxGetCurrent"] pub fn cudaGetDevice(device: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Set a list of devices that can be used for CUDA"] - #[doc = ""] - #[doc = " Sets a list of devices for CUDA execution in priority order using"] - #[doc = " \\p device_arr. The parameter \\p len specifies the number of elements in the"] - #[doc = " list. CUDA will try devices from the list sequentially until it finds one"] - #[doc = " that works. If this function is not called, or if it is called with a \\p len"] - #[doc = " of 0, then CUDA will go back to its default behavior of trying devices"] - #[doc = " sequentially from a default list containing all of the available CUDA"] - #[doc = " devices in the system. If a specified device ID in the list does not exist,"] - #[doc = " this function will return ::cudaErrorInvalidDevice. If \\p len is not 0 and"] - #[doc = " \\p device_arr is NULL or if \\p len exceeds the number of devices in"] - #[doc = " the system, then ::cudaErrorInvalidValue is returned."] - #[doc = ""] - #[doc = " \\param device_arr - List of devices to try"] - #[doc = " \\param len - Number of devices in specified list"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties,"] - #[doc = " ::cudaSetDeviceFlags,"] - #[doc = " ::cudaChooseDevice"] pub fn cudaSetValidDevices(device_arr: *mut ::libc::c_int, len: ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets flags to be used for device executions"] - #[doc = ""] - #[doc = " Records \\p flags as the flags for the current device. If the current device"] - #[doc = " has been set and that device has already been initialized, the previous flags"] - #[doc = " are overwritten. If the current device has not been initialized, it is"] - #[doc = " initialized with the provided flags. If no device has been made current to"] - #[doc = " the calling thread, a default device is selected and initialized with the"] - #[doc = " provided flags."] - #[doc = ""] - #[doc = " The two LSBs of the \\p flags parameter can be used to control how the CPU"] - #[doc = " thread interacts with the OS scheduler when waiting for results from the"] - #[doc = " device."] - #[doc = ""] - #[doc = " - ::cudaDeviceScheduleAuto: The default value if the \\p flags parameter is"] - #[doc = " zero, uses a heuristic based on the number of active CUDA contexts in the"] - #[doc = " process \\p C and the number of logical processors in the system \\p P. If"] - #[doc = " \\p C \\> \\p P, then CUDA will yield to other OS threads when waiting for the"] - #[doc = " device, otherwise CUDA will not yield while waiting for results and"] - #[doc = " actively spin on the processor. Additionally, on Tegra devices,"] - #[doc = " ::cudaDeviceScheduleAuto uses a heuristic based on the power profile of"] - #[doc = " the platform and may choose ::cudaDeviceScheduleBlockingSync for low-powered"] - #[doc = " devices."] - #[doc = " - ::cudaDeviceScheduleSpin: Instruct CUDA to actively spin when waiting for"] - #[doc = " results from the device. This can decrease latency when waiting for the"] - #[doc = " device, but may lower the performance of CPU threads if they are performing"] - #[doc = " work in parallel with the CUDA thread."] - #[doc = " - ::cudaDeviceScheduleYield: Instruct CUDA to yield its thread when waiting"] - #[doc = " for results from the device. This can increase latency when waiting for the"] - #[doc = " device, but can increase the performance of CPU threads performing work in"] - #[doc = " parallel with the device."] - #[doc = " - ::cudaDeviceScheduleBlockingSync: Instruct CUDA to block the CPU thread"] - #[doc = " on a synchronization primitive when waiting for the device to finish work."] - #[doc = " - ::cudaDeviceBlockingSync: Instruct CUDA to block the CPU thread on a"] - #[doc = " synchronization primitive when waiting for the device to finish work.
"] - #[doc = " \\ref deprecated \"Deprecated:\" This flag was deprecated as of CUDA 4.0 and"] - #[doc = " replaced with ::cudaDeviceScheduleBlockingSync."] - #[doc = " - ::cudaDeviceMapHost: This flag enables allocating pinned"] - #[doc = " host memory that is accessible to the device. It is implicit for the"] - #[doc = " runtime but may be absent if a context is created using the driver API."] - #[doc = " If this flag is not set, ::cudaHostGetDevicePointer() will always return"] - #[doc = " a failure code."] - #[doc = " - ::cudaDeviceLmemResizeToMax: Instruct CUDA to not reduce local memory"] - #[doc = " after resizing local memory for a kernel. This can prevent thrashing by"] - #[doc = " local memory allocations when launching many kernels with high local"] - #[doc = " memory usage at the cost of potentially increased memory usage.
"] - #[doc = " \\ref deprecated \"Deprecated:\" This flag is deprecated and the behavior enabled"] - #[doc = " by this flag is now the default and cannot be disabled."] - #[doc = ""] - #[doc = " \\param flags - Parameters for device operation"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceFlags, ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,"] - #[doc = " ::cudaSetDevice, ::cudaSetValidDevices,"] - #[doc = " ::cudaChooseDevice,"] - #[doc = " ::cuDevicePrimaryCtxSetFlags"] pub fn cudaSetDeviceFlags(flags: ::libc::c_uint) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets the flags for the current device"] - #[doc = ""] - #[doc = ""] - #[doc = " Returns in \\p flags the flags for the current device. If there is a current"] - #[doc = " device for the calling thread, the flags for the device are returned. If"] - #[doc = " there is no current device, the flags for the first device are returned,"] - #[doc = " which may be the default flags. Compare to the behavior of"] - #[doc = " ::cudaSetDeviceFlags."] - #[doc = ""] - #[doc = " Typically, the flags returned should match the behavior that will be seen"] - #[doc = " if the calling thread uses a device after this call, without any change to"] - #[doc = " the flags or current device inbetween by this or another thread. Note that"] - #[doc = " if the device is not initialized, it is possible for another thread to"] - #[doc = " change the flags for the current device before it is initialized."] - #[doc = " Additionally, when using exclusive mode, if this thread has not requested a"] - #[doc = " specific device, it may use a device other than the first device, contrary"] - #[doc = " to the assumption made by this function."] - #[doc = ""] - #[doc = " If a context has been created via the driver API and is current to the"] - #[doc = " calling thread, the flags for that context are always returned."] - #[doc = ""] - #[doc = " Flags returned by this function may specifically include ::cudaDeviceMapHost"] - #[doc = " even though it is not accepted by ::cudaSetDeviceFlags because it is"] - #[doc = " implicit in runtime API flags. The reason for this is that the current"] - #[doc = " context may have been created via the driver API in which case the flag is"] - #[doc = " not implicit and may be unset."] - #[doc = ""] - #[doc = " \\param flags - Pointer to store the device flags"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDevice, ::cudaGetDeviceProperties,"] - #[doc = " ::cudaSetDevice, ::cudaSetDeviceFlags,"] - #[doc = " ::cuCtxGetFlags,"] - #[doc = " ::cuDevicePrimaryCtxGetState"] pub fn cudaGetDeviceFlags(flags: *mut ::libc::c_uint) -> cudaError_t; } extern "C" { - #[doc = " \\brief Create an asynchronous stream"] - #[doc = ""] - #[doc = " Creates a new asynchronous stream."] - #[doc = ""] - #[doc = " \\param pStream - Pointer to new stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreateWithPriority,"] - #[doc = " ::cudaStreamCreateWithFlags,"] - #[doc = " ::cudaStreamGetPriority,"] - #[doc = " ::cudaStreamGetFlags,"] - #[doc = " ::cudaStreamQuery,"] - #[doc = " ::cudaStreamSynchronize,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaStreamAddCallback,"] - #[doc = " ::cudaStreamDestroy,"] - #[doc = " ::cuStreamCreate"] pub fn cudaStreamCreate(pStream: *mut cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Create an asynchronous stream"] - #[doc = ""] - #[doc = " Creates a new asynchronous stream. The \\p flags argument determines the"] - #[doc = " behaviors of the stream. Valid values for \\p flags are"] - #[doc = " - ::cudaStreamDefault: Default stream creation flag."] - #[doc = " - ::cudaStreamNonBlocking: Specifies that work running in the created"] - #[doc = " stream may run concurrently with work in stream 0 (the NULL stream), and that"] - #[doc = " the created stream should perform no implicit synchronization with stream 0."] - #[doc = ""] - #[doc = " \\param pStream - Pointer to new stream identifier"] - #[doc = " \\param flags - Parameters for stream creation"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate,"] - #[doc = " ::cudaStreamCreateWithPriority,"] - #[doc = " ::cudaStreamGetFlags,"] - #[doc = " ::cudaStreamQuery,"] - #[doc = " ::cudaStreamSynchronize,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaStreamAddCallback,"] - #[doc = " ::cudaStreamDestroy,"] - #[doc = " ::cuStreamCreate"] pub fn cudaStreamCreateWithFlags( pStream: *mut cudaStream_t, flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Create an asynchronous stream with the specified priority"] - #[doc = ""] - #[doc = " Creates a stream with the specified priority and returns a handle in \\p pStream."] - #[doc = " This API alters the scheduler priority of work in the stream. Work in a higher"] - #[doc = " priority stream may preempt work already executing in a low priority stream."] - #[doc = ""] - #[doc = " \\p priority follows a convention where lower numbers represent higher priorities."] - #[doc = " '0' represents default priority. The range of meaningful numerical priorities can"] - #[doc = " be queried using ::cudaDeviceGetStreamPriorityRange. If the specified priority is"] - #[doc = " outside the numerical range returned by ::cudaDeviceGetStreamPriorityRange,"] - #[doc = " it will automatically be clamped to the lowest or the highest number in the range."] - #[doc = ""] - #[doc = " \\param pStream - Pointer to new stream identifier"] - #[doc = " \\param flags - Flags for stream creation. See ::cudaStreamCreateWithFlags for a list of valid flags that can be passed"] - #[doc = " \\param priority - Priority of the stream. Lower numbers represent higher priorities."] - #[doc = " See ::cudaDeviceGetStreamPriorityRange for more information about"] - #[doc = " the meaningful stream priorities that can be passed."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\note Stream priorities are supported only on GPUs"] - #[doc = " with compute capability 3.5 or higher."] - #[doc = ""] - #[doc = " \\note In the current implementation, only compute kernels launched in"] - #[doc = " priority streams are affected by the stream's priority. Stream priorities have"] - #[doc = " no effect on host-to-device and device-to-host memory operations."] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate,"] - #[doc = " ::cudaStreamCreateWithFlags,"] - #[doc = " ::cudaDeviceGetStreamPriorityRange,"] - #[doc = " ::cudaStreamGetPriority,"] - #[doc = " ::cudaStreamQuery,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaStreamAddCallback,"] - #[doc = " ::cudaStreamSynchronize,"] - #[doc = " ::cudaStreamDestroy,"] - #[doc = " ::cuStreamCreateWithPriority"] pub fn cudaStreamCreateWithPriority( pStream: *mut cudaStream_t, flags: ::libc::c_uint, @@ -8677,109 +8155,21 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Query the priority of a stream"] - #[doc = ""] - #[doc = " Query the priority of a stream. The priority is returned in in \\p priority."] - #[doc = " Note that if the stream was created with a priority outside the meaningful"] - #[doc = " numerical range returned by ::cudaDeviceGetStreamPriorityRange,"] - #[doc = " this function returns the clamped priority."] - #[doc = " See ::cudaStreamCreateWithPriority for details about priority clamping."] - #[doc = ""] - #[doc = " \\param hStream - Handle to the stream to be queried"] - #[doc = " \\param priority - Pointer to a signed integer in which the stream's priority is returned"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreateWithPriority,"] - #[doc = " ::cudaDeviceGetStreamPriorityRange,"] - #[doc = " ::cudaStreamGetFlags,"] - #[doc = " ::cuStreamGetPriority"] pub fn cudaStreamGetPriority( hStream: cudaStream_t, priority: *mut ::libc::c_int, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Query the flags of a stream"] - #[doc = ""] - #[doc = " Query the flags of a stream. The flags are returned in \\p flags."] - #[doc = " See ::cudaStreamCreateWithFlags for a list of valid flags."] - #[doc = ""] - #[doc = " \\param hStream - Handle to the stream to be queried"] - #[doc = " \\param flags - Pointer to an unsigned integer in which the stream's flags are returned"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreateWithPriority,"] - #[doc = " ::cudaStreamCreateWithFlags,"] - #[doc = " ::cudaStreamGetPriority,"] - #[doc = " ::cuStreamGetFlags"] pub fn cudaStreamGetFlags(hStream: cudaStream_t, flags: *mut ::libc::c_uint) -> cudaError_t; } extern "C" { - #[doc = " \\brief Resets all persisting lines in cache to normal status."] - #[doc = ""] - #[doc = " Resets all persisting lines in cache to normal status."] - #[doc = " Takes effect on function return."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaAccessPolicyWindow"] pub fn cudaCtxResetPersistingL2Cache() -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies attributes from source stream to destination stream."] - #[doc = ""] - #[doc = " Copies attributes from source stream \\p src to destination stream \\p dst."] - #[doc = " Both streams must have the same context."] - #[doc = ""] - #[doc = " \\param[out] dst Destination stream"] - #[doc = " \\param[in] src Source stream"] - #[doc = " For attributes see ::cudaStreamAttrID"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaAccessPolicyWindow"] pub fn cudaStreamCopyAttributes(dst: cudaStream_t, src: cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Queries stream attribute."] - #[doc = ""] - #[doc = " Queries attribute \\p attr from \\p hStream and stores it in corresponding"] - #[doc = " member of \\p value_out."] - #[doc = ""] - #[doc = " \\param[in] hStream"] - #[doc = " \\param[in] attr"] - #[doc = " \\param[out] value_out"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaAccessPolicyWindow"] pub fn cudaStreamGetAttribute( hStream: cudaStream_t, attr: cudaStreamAttrID, @@ -8787,24 +8177,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets stream attribute."] - #[doc = ""] - #[doc = " Sets attribute \\p attr on \\p hStream from corresponding attribute of"] - #[doc = " \\p value. The updated attribute will be applied to subsequent work"] - #[doc = " submitted to the stream. It will not affect previously submitted work."] - #[doc = ""] - #[doc = " \\param[out] hStream"] - #[doc = " \\param[in] attr"] - #[doc = " \\param[in] value"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaAccessPolicyWindow"] pub fn cudaStreamSetAttribute( hStream: cudaStream_t, attr: cudaStreamAttrID, @@ -8812,141 +8184,19 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys and cleans up an asynchronous stream"] - #[doc = ""] - #[doc = " Destroys and cleans up the asynchronous stream specified by \\p stream."] - #[doc = ""] - #[doc = " In case the device is still doing work in the stream \\p stream"] - #[doc = " when ::cudaStreamDestroy() is called, the function will return immediately"] - #[doc = " and the resources associated with \\p stream will be released automatically"] - #[doc = " once the device has completed all work in \\p stream."] - #[doc = ""] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate,"] - #[doc = " ::cudaStreamCreateWithFlags,"] - #[doc = " ::cudaStreamQuery,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaStreamSynchronize,"] - #[doc = " ::cudaStreamAddCallback,"] - #[doc = " ::cuStreamDestroy"] pub fn cudaStreamDestroy(stream: cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Make a compute stream wait on an event"] - #[doc = ""] - #[doc = " Makes all future work submitted to \\p stream wait for all work captured in"] - #[doc = " \\p event. See ::cudaEventRecord() for details on what is captured by an event."] - #[doc = " The synchronization will be performed efficiently on the device when applicable."] - #[doc = " \\p event may be from a different device than \\p stream."] - #[doc = ""] - #[doc = " flags include:"] - #[doc = " - ::cudaEventWaitDefault: Default event creation flag."] - #[doc = " - ::cudaEventWaitExternal: Event is captured in the graph as an external"] - #[doc = " event node when performing stream capture."] - #[doc = ""] - #[doc = " \\param stream - Stream to wait"] - #[doc = " \\param event - Event to wait on"] - #[doc = " \\param flags - Parameters for the operation(See above)"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy,"] - #[doc = " ::cuStreamWaitEvent"] pub fn cudaStreamWaitEvent( stream: cudaStream_t, event: cudaEvent_t, flags: ::libc::c_uint, ) -> cudaError_t; } -#[doc = " Type of stream callback functions."] -#[doc = " \\param stream The stream as passed to ::cudaStreamAddCallback, may be NULL."] -#[doc = " \\param status ::cudaSuccess or any persistent error on the stream."] -#[doc = " \\param userData User parameter provided at registration."] pub type cudaStreamCallback_t = ::std::option::Option< unsafe extern "C" fn(stream: cudaStream_t, status: cudaError_t, userData: *mut ::libc::c_void), >; extern "C" { - #[doc = " \\brief Add a callback to a compute stream"] - #[doc = ""] - #[doc = " \\note This function is slated for eventual deprecation and removal. If"] - #[doc = " you do not require the callback to execute in case of a device error,"] - #[doc = " consider using ::cudaLaunchHostFunc. Additionally, this function is not"] - #[doc = " supported with ::cudaStreamBeginCapture and ::cudaStreamEndCapture, unlike"] - #[doc = " ::cudaLaunchHostFunc."] - #[doc = ""] - #[doc = " Adds a callback to be called on the host after all currently enqueued"] - #[doc = " items in the stream have completed. For each"] - #[doc = " cudaStreamAddCallback call, a callback will be executed exactly once."] - #[doc = " The callback will block later work in the stream until it is finished."] - #[doc = ""] - #[doc = " The callback may be passed ::cudaSuccess or an error code. In the event"] - #[doc = " of a device error, all subsequently executed callbacks will receive an"] - #[doc = " appropriate ::cudaError_t."] - #[doc = ""] - #[doc = " Callbacks must not make any CUDA API calls. Attempting to use CUDA APIs"] - #[doc = " may result in ::cudaErrorNotPermitted. Callbacks must not perform any"] - #[doc = " synchronization that may depend on outstanding device work or other callbacks"] - #[doc = " that are not mandated to run earlier. Callbacks without a mandated order"] - #[doc = " (in independent streams) execute in undefined order and may be serialized."] - #[doc = ""] - #[doc = " For the purposes of Unified Memory, callback execution makes a number of"] - #[doc = " guarantees:"] - #[doc = "
    "] - #[doc = "
  • The callback stream is considered idle for the duration of the"] - #[doc = " callback. Thus, for example, a callback may always use memory attached"] - #[doc = " to the callback stream.
  • "] - #[doc = "
  • The start of execution of a callback has the same effect as"] - #[doc = " synchronizing an event recorded in the same stream immediately prior to"] - #[doc = " the callback. It thus synchronizes streams which have been \"joined\""] - #[doc = " prior to the callback.
  • "] - #[doc = "
  • Adding device work to any stream does not have the effect of making"] - #[doc = " the stream active until all preceding callbacks have executed. Thus, for"] - #[doc = " example, a callback might use global attached memory even if work has"] - #[doc = " been added to another stream, if it has been properly ordered with an"] - #[doc = " event.
  • "] - #[doc = "
  • Completion of a callback does not cause a stream to become"] - #[doc = " active except as described above. The callback stream will remain idle"] - #[doc = " if no device work follows the callback, and will remain idle across"] - #[doc = " consecutive callbacks without device work in between. Thus, for example,"] - #[doc = " stream synchronization can be done by signaling from a callback at the"] - #[doc = " end of the stream.
  • "] - #[doc = "
"] - #[doc = ""] - #[doc = " \\param stream - Stream to add callback to"] - #[doc = " \\param callback - The function to call once preceding stream operations are complete"] - #[doc = " \\param userData - User specified data to be passed to the callback function"] - #[doc = " \\param flags - Reserved for future use, must be 0"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamWaitEvent, ::cudaStreamDestroy, ::cudaMallocManaged, ::cudaStreamAttachMemAsync,"] - #[doc = " ::cudaLaunchHostFunc, ::cuStreamAddCallback"] pub fn cudaStreamAddCallback( stream: cudaStream_t, callback: cudaStreamCallback_t, @@ -8955,49 +8205,9 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Waits for stream tasks to complete"] - #[doc = ""] - #[doc = " Blocks until \\p stream has completed all operations. If the"] - #[doc = " ::cudaDeviceScheduleBlockingSync flag was set for this device,"] - #[doc = " the host thread will block until the stream is finished with"] - #[doc = " all of its tasks."] - #[doc = ""] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamWaitEvent, ::cudaStreamAddCallback, ::cudaStreamDestroy,"] - #[doc = " ::cuStreamSynchronize"] pub fn cudaStreamSynchronize(stream: cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Queries an asynchronous stream for completion status"] - #[doc = ""] - #[doc = " Returns ::cudaSuccess if all operations in \\p stream have"] - #[doc = " completed, or ::cudaErrorNotReady if not."] - #[doc = ""] - #[doc = " For the purposes of Unified Memory, a return value of ::cudaSuccess"] - #[doc = " is equivalent to having called ::cudaStreamSynchronize()."] - #[doc = ""] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorNotReady,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamWaitEvent, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy,"] - #[doc = " ::cuStreamQuery"] pub fn cudaStreamQuery(stream: cudaStream_t) -> cudaError_t; } extern "C" { @@ -9009,187 +8219,22 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Begins graph capture on a stream"] - #[doc = ""] - #[doc = " Begin graph capture on \\p stream. When a stream is in capture mode, all operations"] - #[doc = " pushed into the stream will not be executed, but will instead be captured into"] - #[doc = " a graph, which will be returned via ::cudaStreamEndCapture. Capture may not be initiated"] - #[doc = " if \\p stream is ::cudaStreamLegacy. Capture must be ended on the same stream in which"] - #[doc = " it was initiated, and it may only be initiated if the stream is not already in capture"] - #[doc = " mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id"] - #[doc = " representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo."] - #[doc = ""] - #[doc = " If \\p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be"] - #[doc = " called on this stream from the same thread."] - #[doc = ""] - #[doc = " \\note Kernels captured using this API must not use texture and surface references."] - #[doc = " Reading or writing through any texture or surface reference is undefined"] - #[doc = " behavior. This restriction does not apply to texture and surface objects."] - #[doc = ""] - #[doc = " \\param stream - Stream in which to initiate capture"] - #[doc = " \\param mode - Controls the interaction of this capture sequence with other API"] - #[doc = " calls that are potentially unsafe. For more details see"] - #[doc = " ::cudaThreadExchangeStreamCaptureMode."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaStreamCreate,"] - #[doc = " ::cudaStreamIsCapturing,"] - #[doc = " ::cudaStreamEndCapture,"] - #[doc = " ::cudaThreadExchangeStreamCaptureMode"] pub fn cudaStreamBeginCapture(stream: cudaStream_t, mode: cudaStreamCaptureMode) -> cudaError_t; } extern "C" { - #[doc = " \\brief Swaps the stream capture interaction mode for a thread"] - #[doc = ""] - #[doc = " Sets the calling thread's stream capture interaction mode to the value contained"] - #[doc = " in \\p *mode, and overwrites \\p *mode with the previous mode for the thread. To"] - #[doc = " facilitate deterministic behavior across function or module boundaries, callers"] - #[doc = " are encouraged to use this API in a push-pop fashion: \\code"] - #[doc = "cudaStreamCaptureMode mode = desiredMode;"] - #[doc = "cudaThreadExchangeStreamCaptureMode(&mode);"] - #[doc = "..."] - #[doc = "cudaThreadExchangeStreamCaptureMode(&mode); // restore previous mode"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " During stream capture (see ::cudaStreamBeginCapture), some actions, such as a call"] - #[doc = " to ::cudaMalloc, may be unsafe. In the case of ::cudaMalloc, the operation is"] - #[doc = " not enqueued asynchronously to a stream, and is not observed by stream capture."] - #[doc = " Therefore, if the sequence of operations captured via ::cudaStreamBeginCapture"] - #[doc = " depended on the allocation being replayed whenever the graph is launched, the"] - #[doc = " captured graph would be invalid."] - #[doc = ""] - #[doc = " Therefore, stream capture places restrictions on API calls that can be made within"] - #[doc = " or concurrently to a ::cudaStreamBeginCapture-::cudaStreamEndCapture sequence. This"] - #[doc = " behavior can be controlled via this API and flags to ::cudaStreamBeginCapture."] - #[doc = ""] - #[doc = " A thread's mode is one of the following:"] - #[doc = " - \\p cudaStreamCaptureModeGlobal: This is the default mode. If the local thread has"] - #[doc = " an ongoing capture sequence that was not initiated with"] - #[doc = " \\p cudaStreamCaptureModeRelaxed at \\p cuStreamBeginCapture, or if any other thread"] - #[doc = " has a concurrent capture sequence initiated with \\p cudaStreamCaptureModeGlobal,"] - #[doc = " this thread is prohibited from potentially unsafe API calls."] - #[doc = " - \\p cudaStreamCaptureModeThreadLocal: If the local thread has an ongoing capture"] - #[doc = " sequence not initiated with \\p cudaStreamCaptureModeRelaxed, it is prohibited"] - #[doc = " from potentially unsafe API calls. Concurrent capture sequences in other threads"] - #[doc = " are ignored."] - #[doc = " - \\p cudaStreamCaptureModeRelaxed: The local thread is not prohibited from potentially"] - #[doc = " unsafe API calls. Note that the thread is still prohibited from API calls which"] - #[doc = " necessarily conflict with stream capture, for example, attempting ::cudaEventQuery"] - #[doc = " on an event that was last recorded inside a capture sequence."] - #[doc = ""] - #[doc = " \\param mode - Pointer to mode value to swap with the current mode"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaStreamBeginCapture"] pub fn cudaThreadExchangeStreamCaptureMode(mode: *mut cudaStreamCaptureMode) -> cudaError_t; } extern "C" { - #[doc = " \\brief Ends capture on a stream, returning the captured graph"] - #[doc = ""] - #[doc = " End capture on \\p stream, returning the captured graph via \\p pGraph."] - #[doc = " Capture must have been initiated on \\p stream via a call to ::cudaStreamBeginCapture."] - #[doc = " If capture was invalidated, due to a violation of the rules of stream capture, then"] - #[doc = " a NULL graph will be returned."] - #[doc = ""] - #[doc = " If the \\p mode argument to ::cudaStreamBeginCapture was not"] - #[doc = " ::cudaStreamCaptureModeRelaxed, this call must be from the same thread as"] - #[doc = " ::cudaStreamBeginCapture."] - #[doc = ""] - #[doc = " \\param stream - Stream to query"] - #[doc = " \\param pGraph - The captured graph"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorStreamCaptureWrongThread"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaStreamCreate,"] - #[doc = " ::cudaStreamBeginCapture,"] - #[doc = " ::cudaStreamIsCapturing"] pub fn cudaStreamEndCapture(stream: cudaStream_t, pGraph: *mut cudaGraph_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a stream's capture status"] - #[doc = ""] - #[doc = " Return the capture status of \\p stream via \\p pCaptureStatus. After a successful"] - #[doc = " call, \\p *pCaptureStatus will contain one of the following:"] - #[doc = " - ::cudaStreamCaptureStatusNone: The stream is not capturing."] - #[doc = " - ::cudaStreamCaptureStatusActive: The stream is capturing."] - #[doc = " - ::cudaStreamCaptureStatusInvalidated: The stream was capturing but an error"] - #[doc = " has invalidated the capture sequence. The capture sequence must be terminated"] - #[doc = " with ::cudaStreamEndCapture on the stream where it was initiated in order to"] - #[doc = " continue using \\p stream."] - #[doc = ""] - #[doc = " Note that, if this is called on ::cudaStreamLegacy (the \"null stream\") while"] - #[doc = " a blocking stream on the same device is capturing, it will return"] - #[doc = " ::cudaErrorStreamCaptureImplicit and \\p *pCaptureStatus is unspecified"] - #[doc = " after the call. The blocking stream capture is not invalidated."] - #[doc = ""] - #[doc = " When a blocking stream is capturing, the legacy stream is in an"] - #[doc = " unusable state until the blocking stream capture is terminated. The legacy"] - #[doc = " stream is not supported for stream capture, but attempted use would have an"] - #[doc = " implicit dependency on the capturing stream(s)."] - #[doc = ""] - #[doc = " \\param stream - Stream to query"] - #[doc = " \\param pCaptureStatus - Returns the stream's capture status"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorStreamCaptureImplicit"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaStreamCreate,"] - #[doc = " ::cudaStreamBeginCapture,"] - #[doc = " ::cudaStreamEndCapture"] pub fn cudaStreamIsCapturing( stream: cudaStream_t, pCaptureStatus: *mut cudaStreamCaptureStatus, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Query capture status of a stream"] - #[doc = ""] - #[doc = " Note there is a later version of this API, ::cudaStreamGetCaptureInfo_v2. It will"] - #[doc = " supplant this version in 12.0, which is retained for minor version compatibility."] - #[doc = ""] - #[doc = " Query the capture status of a stream and get a unique id representing"] - #[doc = " the capture sequence over the lifetime of the process."] - #[doc = ""] - #[doc = " If called on ::cudaStreamLegacy (the \"null stream\") while a stream not created"] - #[doc = " with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit."] - #[doc = ""] - #[doc = " A valid id is returned only if both of the following are true:"] - #[doc = " - the call returns ::cudaSuccess"] - #[doc = " - captureStatus is set to ::cudaStreamCaptureStatusActive"] - #[doc = ""] - #[doc = " \\param stream - Stream to query"] - #[doc = " \\param pCaptureStatus - Returns the stream's capture status"] - #[doc = " \\param pId - Returns the unique id of the capture sequence"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorStreamCaptureImplicit"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaStreamGetCaptureInfo_v2,"] - #[doc = " ::cudaStreamBeginCapture,"] - #[doc = " ::cudaStreamIsCapturing"] pub fn cudaStreamGetCaptureInfo( stream: cudaStream_t, pCaptureStatus: *mut cudaStreamCaptureStatus, @@ -9197,57 +8242,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Query a stream's capture state (11.3+)"] - #[doc = ""] - #[doc = " Query stream state related to stream capture."] - #[doc = ""] - #[doc = " If called on ::cudaStreamLegacy (the \"null stream\") while a stream not created"] - #[doc = " with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit."] - #[doc = ""] - #[doc = " Valid data (other than capture status) is returned only if both of the following are true:"] - #[doc = " - the call returns cudaSuccess"] - #[doc = " - the returned capture status is ::cudaStreamCaptureStatusActive"] - #[doc = ""] - #[doc = " This version of cudaStreamGetCaptureInfo is introduced in CUDA 11.3 and will supplant the"] - #[doc = " previous version ::cudaStreamGetCaptureInfo in 12.0. Developers requiring compatibility"] - #[doc = " across minor versions to CUDA 11.0 (driver version 445) can do one of the following:"] - #[doc = " - Use the older version of the API, ::cudaStreamGetCaptureInfo"] - #[doc = " - Pass null for all of \\p graph_out, \\p dependencies_out, and \\p numDependencies_out."] - #[doc = ""] - #[doc = " \\param stream - The stream to query"] - #[doc = " \\param captureStatus_out - Location to return the capture status of the stream; required"] - #[doc = " \\param id_out - Optional location to return an id for the capture sequence, which is"] - #[doc = " unique over the lifetime of the process"] - #[doc = " \\param graph_out - Optional location to return the graph being captured into. All"] - #[doc = " operations other than destroy and node removal are permitted on the graph"] - #[doc = " while the capture sequence is in progress. This API does not transfer"] - #[doc = " ownership of the graph, which is transferred or destroyed at"] - #[doc = " ::cudaStreamEndCapture. Note that the graph handle may be invalidated before"] - #[doc = " end of capture for certain errors. Nodes that are or become"] - #[doc = " unreachable from the original stream at ::cudaStreamEndCapture due to direct"] - #[doc = " actions on the graph do not trigger ::cudaErrorStreamCaptureUnjoined."] - #[doc = " \\param dependencies_out - Optional location to store a pointer to an array of nodes."] - #[doc = " The next node to be captured in the stream will depend on this set of nodes,"] - #[doc = " absent operations such as event wait which modify this set. The array pointer"] - #[doc = " is valid until the next API call which operates on the stream or until end of"] - #[doc = " capture. The node handles may be copied out and are valid until they or the"] - #[doc = " graph is destroyed. The driver-owned array may also be passed directly to"] - #[doc = " APIs that operate on the graph (not the stream) without copying."] - #[doc = " \\param numDependencies_out - Optional location to store the size of the array"] - #[doc = " returned in dependencies_out."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorStreamCaptureImplicit"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaStreamGetCaptureInfo,"] - #[doc = " ::cudaStreamBeginCapture,"] - #[doc = " ::cudaStreamIsCapturing,"] - #[doc = " ::cudaStreamUpdateCaptureDependencies"] pub fn cudaStreamGetCaptureInfo_v2( stream: cudaStream_t, captureStatus_out: *mut cudaStreamCaptureStatus, @@ -9258,35 +8252,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Update the set of dependencies in a capturing stream (11.3+)"] - #[doc = ""] - #[doc = " Modifies the dependency set of a capturing stream. The dependency set is the set"] - #[doc = " of nodes that the next captured node in the stream will depend on."] - #[doc = ""] - #[doc = " Valid flags are ::cudaStreamAddCaptureDependencies and"] - #[doc = " ::cudaStreamSetCaptureDependencies. These control whether the set passed to"] - #[doc = " the API is added to the existing set or replaces it. A flags value of 0 defaults"] - #[doc = " to ::cudaStreamAddCaptureDependencies."] - #[doc = ""] - #[doc = " Nodes that are removed from the dependency set via this API do not result in"] - #[doc = " ::cudaErrorStreamCaptureUnjoined if they are unreachable from the stream at"] - #[doc = " ::cudaStreamEndCapture."] - #[doc = ""] - #[doc = " Returns ::cudaErrorIllegalState if the stream is not capturing."] - #[doc = ""] - #[doc = " This API is new in CUDA 11.3. Developers requiring compatibility across minor"] - #[doc = " versions of the CUDA driver to 11.0 should not use this API or provide a fallback."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorIllegalState"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaStreamBeginCapture,"] - #[doc = " ::cudaStreamGetCaptureInfo,"] - #[doc = " ::cudaStreamGetCaptureInfo_v2"] pub fn cudaStreamUpdateCaptureDependencies( stream: cudaStream_t, dependencies: *mut cudaGraphNode_t, @@ -9295,101 +8260,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates an event object"] - #[doc = ""] - #[doc = " Creates an event object for the current device using ::cudaEventDefault."] - #[doc = ""] - #[doc = " \\param event - Newly created event"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorLaunchFailure,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaEventCreate(cudaEvent_t*, unsigned int) \"cudaEventCreate (C++ API)\","] - #[doc = " ::cudaEventCreateWithFlags, ::cudaEventRecord, ::cudaEventQuery,"] - #[doc = " ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cuEventCreate"] pub fn cudaEventCreate(event: *mut cudaEvent_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates an event object with the specified flags"] - #[doc = ""] - #[doc = " Creates an event object for the current device with the specified flags. Valid"] - #[doc = " flags include:"] - #[doc = " - ::cudaEventDefault: Default event creation flag."] - #[doc = " - ::cudaEventBlockingSync: Specifies that event should use blocking"] - #[doc = " synchronization. A host thread that uses ::cudaEventSynchronize() to wait"] - #[doc = " on an event created with this flag will block until the event actually"] - #[doc = " completes."] - #[doc = " - ::cudaEventDisableTiming: Specifies that the created event does not need"] - #[doc = " to record timing data. Events created with this flag specified and"] - #[doc = " the ::cudaEventBlockingSync flag not specified will provide the best"] - #[doc = " performance when used with ::cudaStreamWaitEvent() and ::cudaEventQuery()."] - #[doc = " - ::cudaEventInterprocess: Specifies that the created event may be used as an"] - #[doc = " interprocess event by ::cudaIpcGetEventHandle(). ::cudaEventInterprocess must"] - #[doc = " be specified along with ::cudaEventDisableTiming."] - #[doc = ""] - #[doc = " \\param event - Newly created event"] - #[doc = " \\param flags - Flags for new event"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorLaunchFailure,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\","] - #[doc = " ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cuEventCreate"] pub fn cudaEventCreateWithFlags(event: *mut cudaEvent_t, flags: ::libc::c_uint) -> cudaError_t; } extern "C" { - #[doc = " \\brief Records an event"] - #[doc = ""] - #[doc = " Captures in \\p event the contents of \\p stream at the time of this call."] - #[doc = " \\p event and \\p stream must be on the same device."] - #[doc = " Calls such as ::cudaEventQuery() or ::cudaStreamWaitEvent() will then"] - #[doc = " examine or wait for completion of the work that was captured. Uses of"] - #[doc = " \\p stream after this call do not modify \\p event. See note on default"] - #[doc = " stream behavior for what is captured in the default case."] - #[doc = ""] - #[doc = " ::cudaEventRecord() can be called multiple times on the same event and"] - #[doc = " will overwrite the previously captured state. Other APIs such as"] - #[doc = " ::cudaStreamWaitEvent() use the most recently captured state at the time"] - #[doc = " of the API call, and are not affected by later calls to"] - #[doc = " ::cudaEventRecord(). Before the first call to ::cudaEventRecord(), an"] - #[doc = " event represents an empty set of work, so for example ::cudaEventQuery()"] - #[doc = " would return ::cudaSuccess."] - #[doc = ""] - #[doc = " \\param event - Event to record"] - #[doc = " \\param stream - Stream in which to record event"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorLaunchFailure"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\","] - #[doc = " ::cudaEventCreateWithFlags, ::cudaEventQuery,"] - #[doc = " ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaEventRecordWithFlags,"] - #[doc = " ::cuEventRecord"] pub fn cudaEventRecord(event: cudaEvent_t, stream: cudaStream_t) -> cudaError_t; } extern "C" { @@ -9400,350 +8276,24 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Queries an event's status"] - #[doc = ""] - #[doc = " Queries the status of all work currently captured by \\p event. See"] - #[doc = " ::cudaEventRecord() for details on what is captured by an event."] - #[doc = ""] - #[doc = " Returns ::cudaSuccess if all captured work has been completed, or"] - #[doc = " ::cudaErrorNotReady if any captured work is incomplete."] - #[doc = ""] - #[doc = " For the purposes of Unified Memory, a return value of ::cudaSuccess"] - #[doc = " is equivalent to having called ::cudaEventSynchronize()."] - #[doc = ""] - #[doc = " \\param event - Event to query"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorNotReady,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorLaunchFailure"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\","] - #[doc = " ::cudaEventCreateWithFlags, ::cudaEventRecord,"] - #[doc = " ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,"] - #[doc = " ::cuEventQuery"] pub fn cudaEventQuery(event: cudaEvent_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Waits for an event to complete"] - #[doc = ""] - #[doc = " Waits until the completion of all work currently captured in \\p event."] - #[doc = " See ::cudaEventRecord() for details on what is captured by an event."] - #[doc = ""] - #[doc = " Waiting for an event that was created with the ::cudaEventBlockingSync"] - #[doc = " flag will cause the calling CPU thread to block until the event has"] - #[doc = " been completed by the device. If the ::cudaEventBlockingSync flag has"] - #[doc = " not been set, then the CPU thread will busy-wait until the event has"] - #[doc = " been completed by the device."] - #[doc = ""] - #[doc = " \\param event - Event to wait for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorLaunchFailure"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\","] - #[doc = " ::cudaEventCreateWithFlags, ::cudaEventRecord,"] - #[doc = " ::cudaEventQuery, ::cudaEventDestroy, ::cudaEventElapsedTime,"] - #[doc = " ::cuEventSynchronize"] pub fn cudaEventSynchronize(event: cudaEvent_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys an event object"] - #[doc = ""] - #[doc = " Destroys the event specified by \\p event."] - #[doc = ""] - #[doc = " An event may be destroyed before it is complete (i.e., while"] - #[doc = " ::cudaEventQuery() would return ::cudaErrorNotReady). In this case, the"] - #[doc = " call does not block on completion of the event, and any associated"] - #[doc = " resources will automatically be released asynchronously at completion."] - #[doc = ""] - #[doc = " \\param event - Event to destroy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorLaunchFailure"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\","] - #[doc = " ::cudaEventCreateWithFlags, ::cudaEventQuery,"] - #[doc = " ::cudaEventSynchronize, ::cudaEventRecord, ::cudaEventElapsedTime,"] - #[doc = " ::cuEventDestroy"] pub fn cudaEventDestroy(event: cudaEvent_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Computes the elapsed time between events"] - #[doc = ""] - #[doc = " Computes the elapsed time between two events (in milliseconds with a"] - #[doc = " resolution of around 0.5 microseconds)."] - #[doc = ""] - #[doc = " If either event was last recorded in a non-NULL stream, the resulting time"] - #[doc = " may be greater than expected (even if both used the same stream handle). This"] - #[doc = " happens because the ::cudaEventRecord() operation takes place asynchronously"] - #[doc = " and there is no guarantee that the measured latency is actually just between"] - #[doc = " the two events. Any number of other different stream operations could execute"] - #[doc = " in between the two measured events, thus altering the timing in a significant"] - #[doc = " way."] - #[doc = ""] - #[doc = " If ::cudaEventRecord() has not been called on either event, then"] - #[doc = " ::cudaErrorInvalidResourceHandle is returned. If ::cudaEventRecord() has been"] - #[doc = " called on both events but one or both of them has not yet been completed"] - #[doc = " (that is, ::cudaEventQuery() would return ::cudaErrorNotReady on at least one"] - #[doc = " of the events), ::cudaErrorNotReady is returned. If either event was created"] - #[doc = " with the ::cudaEventDisableTiming flag, then this function will return"] - #[doc = " ::cudaErrorInvalidResourceHandle."] - #[doc = ""] - #[doc = " \\param ms - Time between \\p start and \\p end in ms"] - #[doc = " \\param start - Starting event"] - #[doc = " \\param end - Ending event"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorNotReady,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorLaunchFailure"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\","] - #[doc = " ::cudaEventCreateWithFlags, ::cudaEventQuery,"] - #[doc = " ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventRecord,"] - #[doc = " ::cuEventElapsedTime"] pub fn cudaEventElapsedTime(ms: *mut f32, start: cudaEvent_t, end: cudaEvent_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Imports an external memory object"] - #[doc = ""] - #[doc = " Imports an externally allocated memory object and returns"] - #[doc = " a handle to that in \\p extMem_out."] - #[doc = ""] - #[doc = " The properties of the handle being imported must be described in"] - #[doc = " \\p memHandleDesc. The ::cudaExternalMemoryHandleDesc structure"] - #[doc = " is defined as follows:"] - #[doc = ""] - #[doc = " \\code"] - #[doc = "typedef struct cudaExternalMemoryHandleDesc_st {"] - #[doc = "cudaExternalMemoryHandleType type;"] - #[doc = "union {"] - #[doc = "int fd;"] - #[doc = "struct {"] - #[doc = "void *handle;"] - #[doc = "const void *name;"] - #[doc = "} win32;"] - #[doc = "const void *nvSciBufObject;"] - #[doc = "} handle;"] - #[doc = "unsigned long long size;"] - #[doc = "unsigned int flags;"] - #[doc = "} cudaExternalMemoryHandleDesc;"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " where ::cudaExternalMemoryHandleDesc::type specifies the type"] - #[doc = " of handle being imported. ::cudaExternalMemoryHandleType is"] - #[doc = " defined as:"] - #[doc = ""] - #[doc = " \\code"] - #[doc = "typedef enum cudaExternalMemoryHandleType_enum {"] - #[doc = "cudaExternalMemoryHandleTypeOpaqueFd = 1,"] - #[doc = "cudaExternalMemoryHandleTypeOpaqueWin32 = 2,"] - #[doc = "cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3,"] - #[doc = "cudaExternalMemoryHandleTypeD3D12Heap = 4,"] - #[doc = "cudaExternalMemoryHandleTypeD3D12Resource = 5,"] - #[doc = "cudaExternalMemoryHandleTypeD3D11Resource = 6,"] - #[doc = "cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7,"] - #[doc = "cudaExternalMemoryHandleTypeNvSciBuf = 8"] - #[doc = "} cudaExternalMemoryHandleType;"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeOpaqueFd, then"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::fd must be a valid"] - #[doc = " file descriptor referencing a memory object. Ownership of"] - #[doc = " the file descriptor is transferred to the CUDA driver when the"] - #[doc = " handle is imported successfully. Performing any operations on the"] - #[doc = " file descriptor after it is imported results in undefined behavior."] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeOpaqueWin32, then exactly one"] - #[doc = " of ::cudaExternalMemoryHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it must represent a valid shared NT handle that"] - #[doc = " references a memory object. Ownership of this handle is"] - #[doc = " not transferred to CUDA after the import operation, so the"] - #[doc = " application must release the handle using the appropriate system"] - #[doc = " call. If ::cudaExternalMemoryHandleDesc::handle::win32::name"] - #[doc = " is not NULL, then it must point to a NULL-terminated array of"] - #[doc = " UTF-16 characters that refers to a memory object."] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt, then"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::handle must"] - #[doc = " be non-NULL and"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::name"] - #[doc = " must be NULL. The handle specified must be a globally shared KMT"] - #[doc = " handle. This handle does not hold a reference to the underlying"] - #[doc = " object, and thus will be invalid when all references to the"] - #[doc = " memory object are destroyed."] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeD3D12Heap, then exactly one"] - #[doc = " of ::cudaExternalMemoryHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it must represent a valid shared NT handle that"] - #[doc = " is returned by ID3D12Device::CreateSharedHandle when referring to a"] - #[doc = " ID3D12Heap object. This handle holds a reference to the underlying"] - #[doc = " object. If ::cudaExternalMemoryHandleDesc::handle::win32::name"] - #[doc = " is not NULL, then it must point to a NULL-terminated array of"] - #[doc = " UTF-16 characters that refers to a ID3D12Heap object."] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeD3D12Resource, then exactly one"] - #[doc = " of ::cudaExternalMemoryHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it must represent a valid shared NT handle that"] - #[doc = " is returned by ID3D12Device::CreateSharedHandle when referring to a"] - #[doc = " ID3D12Resource object. This handle holds a reference to the"] - #[doc = " underlying object. If"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::name"] - #[doc = " is not NULL, then it must point to a NULL-terminated array of"] - #[doc = " UTF-16 characters that refers to a ID3D12Resource object."] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeD3D11Resource,then exactly one"] - #[doc = " of ::cudaExternalMemoryHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle is"] - #[doc = " not NULL, then it must represent a valid shared NT handle that is"] - #[doc = " returned by IDXGIResource1::CreateSharedHandle when referring to a"] - #[doc = " ID3D11Resource object. If"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::name"] - #[doc = " is not NULL, then it must point to a NULL-terminated array of"] - #[doc = " UTF-16 characters that refers to a ID3D11Resource object."] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeD3D11ResourceKmt, then"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::win32::handle must"] - #[doc = " be non-NULL and ::cudaExternalMemoryHandleDesc::handle::win32::name"] - #[doc = " must be NULL. The handle specified must be a valid shared KMT"] - #[doc = " handle that is returned by IDXGIResource::GetSharedHandle when"] - #[doc = " referring to a ID3D11Resource object."] - #[doc = ""] - #[doc = " If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeNvSciBuf, then"] - #[doc = " ::cudaExternalMemoryHandleDesc::handle::nvSciBufObject must be NON-NULL"] - #[doc = " and reference a valid NvSciBuf object."] - #[doc = " If the NvSciBuf object imported into CUDA is also mapped by other drivers, then the"] - #[doc = " application must use ::cudaWaitExternalSemaphoresAsync or ::cudaSignalExternalSemaphoresAsync"] - #[doc = " as approprriate barriers to maintain coherence between CUDA and the other drivers."] - #[doc = ""] - #[doc = " The size of the memory object must be specified in"] - #[doc = " ::cudaExternalMemoryHandleDesc::size."] - #[doc = ""] - #[doc = " Specifying the flag ::cudaExternalMemoryDedicated in"] - #[doc = " ::cudaExternalMemoryHandleDesc::flags indicates that the"] - #[doc = " resource is a dedicated resource. The definition of what a"] - #[doc = " dedicated resource is outside the scope of this extension."] - #[doc = " This flag must be set if ::cudaExternalMemoryHandleDesc::type"] - #[doc = " is one of the following:"] - #[doc = " ::cudaExternalMemoryHandleTypeD3D12Resource"] - #[doc = " ::cudaExternalMemoryHandleTypeD3D11Resource"] - #[doc = " ::cudaExternalMemoryHandleTypeD3D11ResourceKmt"] - #[doc = ""] - #[doc = " \\param extMem_out - Returned handle to an external memory object"] - #[doc = " \\param memHandleDesc - Memory import handle descriptor"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\note If the Vulkan memory imported into CUDA is mapped on the CPU then the"] - #[doc = " application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges"] - #[doc = " as well as appropriate Vulkan pipeline barriers to maintain coherence between"] - #[doc = " CPU and GPU. For more information on these APIs, please refer to \"Synchronization"] - #[doc = " and Cache Control\" chapter from Vulkan specification."] - #[doc = ""] - #[doc = ""] - #[doc = " \\sa ::cudaDestroyExternalMemory,"] - #[doc = " ::cudaExternalMemoryGetMappedBuffer,"] - #[doc = " ::cudaExternalMemoryGetMappedMipmappedArray"] pub fn cudaImportExternalMemory( extMem_out: *mut cudaExternalMemory_t, memHandleDesc: *const cudaExternalMemoryHandleDesc, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Maps a buffer onto an imported memory object"] - #[doc = ""] - #[doc = " Maps a buffer onto an imported memory object and returns a device"] - #[doc = " pointer in \\p devPtr."] - #[doc = ""] - #[doc = " The properties of the buffer being mapped must be described in"] - #[doc = " \\p bufferDesc. The ::cudaExternalMemoryBufferDesc structure is"] - #[doc = " defined as follows:"] - #[doc = ""] - #[doc = " \\code"] - #[doc = "typedef struct cudaExternalMemoryBufferDesc_st {"] - #[doc = "unsigned long long offset;"] - #[doc = "unsigned long long size;"] - #[doc = "unsigned int flags;"] - #[doc = "} cudaExternalMemoryBufferDesc;"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " where ::cudaExternalMemoryBufferDesc::offset is the offset in"] - #[doc = " the memory object where the buffer's base address is."] - #[doc = " ::cudaExternalMemoryBufferDesc::size is the size of the buffer."] - #[doc = " ::cudaExternalMemoryBufferDesc::flags must be zero."] - #[doc = ""] - #[doc = " The offset and size have to be suitably aligned to match the"] - #[doc = " requirements of the external API. Mapping two buffers whose ranges"] - #[doc = " overlap may or may not result in the same virtual address being"] - #[doc = " returned for the overlapped portion. In such cases, the application"] - #[doc = " must ensure that all accesses to that region from the GPU are"] - #[doc = " volatile. Otherwise writes made via one address are not guaranteed"] - #[doc = " to be visible via the other address, even if they're issued by the"] - #[doc = " same thread. It is recommended that applications map the combined"] - #[doc = " range instead of mapping separate buffers and then apply the"] - #[doc = " appropriate offsets to the returned pointer to derive the"] - #[doc = " individual buffers."] - #[doc = ""] - #[doc = " The returned pointer \\p devPtr must be freed using ::cudaFree."] - #[doc = ""] - #[doc = " \\param devPtr - Returned device pointer to buffer"] - #[doc = " \\param extMem - Handle to external memory object"] - #[doc = " \\param bufferDesc - Buffer descriptor"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaImportExternalMemory,"] - #[doc = " ::cudaDestroyExternalMemory,"] - #[doc = " ::cudaExternalMemoryGetMappedMipmappedArray"] pub fn cudaExternalMemoryGetMappedBuffer( devPtr: *mut *mut ::libc::c_void, extMem: cudaExternalMemory_t, @@ -9751,61 +8301,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Maps a CUDA mipmapped array onto an external memory object"] - #[doc = ""] - #[doc = " Maps a CUDA mipmapped array onto an external object and returns a"] - #[doc = " handle to it in \\p mipmap."] - #[doc = ""] - #[doc = " The properties of the CUDA mipmapped array being mapped must be"] - #[doc = " described in \\p mipmapDesc. The structure"] - #[doc = " ::cudaExternalMemoryMipmappedArrayDesc is defined as follows:"] - #[doc = ""] - #[doc = " \\code"] - #[doc = "typedef struct cudaExternalMemoryMipmappedArrayDesc_st {"] - #[doc = "unsigned long long offset;"] - #[doc = "cudaChannelFormatDesc formatDesc;"] - #[doc = "cudaExtent extent;"] - #[doc = "unsigned int flags;"] - #[doc = "unsigned int numLevels;"] - #[doc = "} cudaExternalMemoryMipmappedArrayDesc;"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " where ::cudaExternalMemoryMipmappedArrayDesc::offset is the"] - #[doc = " offset in the memory object where the base level of the mipmap"] - #[doc = " chain is."] - #[doc = " ::cudaExternalMemoryMipmappedArrayDesc::formatDesc describes the"] - #[doc = " format of the data."] - #[doc = " ::cudaExternalMemoryMipmappedArrayDesc::extent specifies the"] - #[doc = " dimensions of the base level of the mipmap chain."] - #[doc = " ::cudaExternalMemoryMipmappedArrayDesc::flags are flags associated"] - #[doc = " with CUDA mipmapped arrays. For further details, please refer to"] - #[doc = " the documentation for ::cudaMalloc3DArray. Note that if the mipmapped"] - #[doc = " array is bound as a color target in the graphics API, then the flag"] - #[doc = " ::cudaArrayColorAttachment must be specified in"] - #[doc = " ::cudaExternalMemoryMipmappedArrayDesc::flags."] - #[doc = " ::cudaExternalMemoryMipmappedArrayDesc::numLevels specifies"] - #[doc = " the total number of levels in the mipmap chain."] - #[doc = ""] - #[doc = " The returned CUDA mipmapped array must be freed using ::cudaFreeMipmappedArray."] - #[doc = ""] - #[doc = " \\param mipmap - Returned CUDA mipmapped array"] - #[doc = " \\param extMem - Handle to external memory object"] - #[doc = " \\param mipmapDesc - CUDA array descriptor"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaImportExternalMemory,"] - #[doc = " ::cudaDestroyExternalMemory,"] - #[doc = " ::cudaExternalMemoryGetMappedBuffer"] - #[doc = ""] - #[doc = " \\note If ::cudaExternalMemoryHandleDesc::type is"] - #[doc = " ::cudaExternalMemoryHandleTypeNvSciBuf, then"] - #[doc = " ::cudaExternalMemoryMipmappedArrayDesc::numLevels must not be greater than 1."] pub fn cudaExternalMemoryGetMappedMipmappedArray( mipmap: *mut cudaMipmappedArray_t, extMem: cudaExternalMemory_t, @@ -9813,178 +8308,9 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys an external memory object."] - #[doc = ""] - #[doc = " Destroys the specified external memory object. Any existing buffers"] - #[doc = " and CUDA mipmapped arrays mapped onto this object must no longer be"] - #[doc = " used and must be explicitly freed using ::cudaFree and"] - #[doc = " ::cudaFreeMipmappedArray respectively."] - #[doc = ""] - #[doc = " \\param extMem - External memory object to be destroyed"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa ::cudaImportExternalMemory,"] - #[doc = " ::cudaExternalMemoryGetMappedBuffer,"] - #[doc = " ::cudaExternalMemoryGetMappedMipmappedArray"] pub fn cudaDestroyExternalMemory(extMem: cudaExternalMemory_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Imports an external semaphore"] - #[doc = ""] - #[doc = " Imports an externally allocated synchronization object and returns"] - #[doc = " a handle to that in \\p extSem_out."] - #[doc = ""] - #[doc = " The properties of the handle being imported must be described in"] - #[doc = " \\p semHandleDesc. The ::cudaExternalSemaphoreHandleDesc is defined"] - #[doc = " as follows:"] - #[doc = ""] - #[doc = " \\code"] - #[doc = "typedef struct cudaExternalSemaphoreHandleDesc_st {"] - #[doc = "cudaExternalSemaphoreHandleType type;"] - #[doc = "union {"] - #[doc = "int fd;"] - #[doc = "struct {"] - #[doc = "void *handle;"] - #[doc = "const void *name;"] - #[doc = "} win32;"] - #[doc = "const void* NvSciSyncObj;"] - #[doc = "} handle;"] - #[doc = "unsigned int flags;"] - #[doc = "} cudaExternalSemaphoreHandleDesc;"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " where ::cudaExternalSemaphoreHandleDesc::type specifies the type of"] - #[doc = " handle being imported. ::cudaExternalSemaphoreHandleType is defined"] - #[doc = " as:"] - #[doc = ""] - #[doc = " \\code"] - #[doc = "typedef enum cudaExternalSemaphoreHandleType_enum {"] - #[doc = "cudaExternalSemaphoreHandleTypeOpaqueFd = 1,"] - #[doc = "cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2,"] - #[doc = "cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3,"] - #[doc = "cudaExternalSemaphoreHandleTypeD3D12Fence = 4,"] - #[doc = "cudaExternalSemaphoreHandleTypeD3D11Fence = 5,"] - #[doc = "cudaExternalSemaphoreHandleTypeNvSciSync = 6,"] - #[doc = "cudaExternalSemaphoreHandleTypeKeyedMutex = 7,"] - #[doc = "cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8,"] - #[doc = "cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9,"] - #[doc = "cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10"] - #[doc = "} cudaExternalSemaphoreHandleType;"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeOpaqueFd, then"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file"] - #[doc = " descriptor referencing a synchronization object. Ownership of the"] - #[doc = " file descriptor is transferred to the CUDA driver when the handle"] - #[doc = " is imported successfully. Performing any operations on the file"] - #[doc = " descriptor after it is imported results in undefined behavior."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeOpaqueWin32, then exactly one of"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it must represent a valid shared NT handle that"] - #[doc = " references a synchronization object. Ownership of this handle is"] - #[doc = " not transferred to CUDA after the import operation, so the"] - #[doc = " application must release the handle using the appropriate system"] - #[doc = " call. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name is"] - #[doc = " not NULL, then it must name a valid synchronization object."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt, then"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be"] - #[doc = " non-NULL and ::cudaExternalSemaphoreHandleDesc::handle::win32::name"] - #[doc = " must be NULL. The handle specified must be a globally shared KMT"] - #[doc = " handle. This handle does not hold a reference to the underlying"] - #[doc = " object, and thus will be invalid when all references to the"] - #[doc = " synchronization object are destroyed."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeD3D12Fence, then exactly one of"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it must represent a valid shared NT handle that"] - #[doc = " is returned by ID3D12Device::CreateSharedHandle when referring to a"] - #[doc = " ID3D12Fence object. This handle holds a reference to the underlying"] - #[doc = " object. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name"] - #[doc = " is not NULL, then it must name a valid synchronization object that"] - #[doc = " refers to a valid ID3D12Fence object."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeD3D11Fence, then exactly one of"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it must represent a valid shared NT handle that"] - #[doc = " is returned by ID3D11Fence::CreateSharedHandle. If"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::name"] - #[doc = " is not NULL, then it must name a valid synchronization object that"] - #[doc = " refers to a valid ID3D11Fence object."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeNvSciSync, then"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::nvSciSyncObj"] - #[doc = " represents a valid NvSciSyncObj."] - #[doc = ""] - #[doc = " ::cudaExternalSemaphoreHandleTypeKeyedMutex, then exactly one of"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it represent a valid shared NT handle that"] - #[doc = " is returned by IDXGIResource1::CreateSharedHandle when referring to"] - #[doc = " a IDXGIKeyedMutex object."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt, then"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be"] - #[doc = " non-NULL and ::cudaExternalSemaphoreHandleDesc::handle::win32::name"] - #[doc = " must be NULL. The handle specified must represent a valid KMT"] - #[doc = " handle that is returned by IDXGIResource::GetSharedHandle when"] - #[doc = " referring to a IDXGIKeyedMutex object."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, then"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file"] - #[doc = " descriptor referencing a synchronization object. Ownership of the"] - #[doc = " file descriptor is transferred to the CUDA driver when the handle"] - #[doc = " is imported successfully. Performing any operations on the file"] - #[doc = " descriptor after it is imported results in undefined behavior."] - #[doc = ""] - #[doc = " If ::cudaExternalSemaphoreHandleDesc::type is"] - #[doc = " ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32, then exactly one of"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and"] - #[doc = " ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be"] - #[doc = " NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle"] - #[doc = " is not NULL, then it must represent a valid shared NT handle that"] - #[doc = " references a synchronization object. Ownership of this handle is"] - #[doc = " not transferred to CUDA after the import operation, so the"] - #[doc = " application must release the handle using the appropriate system"] - #[doc = " call. If ::cudaExternalSemaphoreHandleDesc::handle::win32::name is"] - #[doc = " not NULL, then it must name a valid synchronization object."] - #[doc = ""] - #[doc = " \\param extSem_out - Returned handle to an external semaphore"] - #[doc = " \\param semHandleDesc - Semaphore import handle descriptor"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDestroyExternalSemaphore,"] - #[doc = " ::cudaSignalExternalSemaphoresAsync,"] - #[doc = " ::cudaWaitExternalSemaphoresAsync"] pub fn cudaImportExternalSemaphore( extSem_out: *mut cudaExternalSemaphore_t, semHandleDesc: *const cudaExternalSemaphoreHandleDesc, @@ -10007,74 +8333,9 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys an external semaphore"] - #[doc = ""] - #[doc = " Destroys an external semaphore object and releases any references"] - #[doc = " to the underlying resource. Any outstanding signals or waits must"] - #[doc = " have completed before the semaphore is destroyed."] - #[doc = ""] - #[doc = " \\param extSem - External semaphore to be destroyed"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa ::cudaImportExternalSemaphore,"] - #[doc = " ::cudaSignalExternalSemaphoresAsync,"] - #[doc = " ::cudaWaitExternalSemaphoresAsync"] pub fn cudaDestroyExternalSemaphore(extSem: cudaExternalSemaphore_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Launches a device function"] - #[doc = ""] - #[doc = " The function invokes kernel \\p func on \\p gridDim (\\p gridDim.x × \\p gridDim.y"] - #[doc = " × \\p gridDim.z) grid of blocks. Each block contains \\p blockDim (\\p blockDim.x ×"] - #[doc = " \\p blockDim.y × \\p blockDim.z) threads."] - #[doc = ""] - #[doc = " If the kernel has N parameters the \\p args should point to array of N pointers."] - #[doc = " Each pointer, from args[0] to args[N - 1], point to the region"] - #[doc = " of memory from which the actual parameter will be copied."] - #[doc = ""] - #[doc = " For templated functions, pass the function symbol as follows:"] - #[doc = " func_name"] - #[doc = ""] - #[doc = " \\p sharedMem sets the amount of dynamic shared memory that will be available to"] - #[doc = " each thread block."] - #[doc = ""] - #[doc = " \\p stream specifies a stream the invocation is associated to."] - #[doc = ""] - #[doc = " \\param func - Device function symbol"] - #[doc = " \\param gridDim - Grid dimentions"] - #[doc = " \\param blockDim - Block dimentions"] - #[doc = " \\param args - Arguments"] - #[doc = " \\param sharedMem - Shared memory"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidConfiguration,"] - #[doc = " ::cudaErrorLaunchFailure,"] - #[doc = " ::cudaErrorLaunchTimeout,"] - #[doc = " ::cudaErrorLaunchOutOfResources,"] - #[doc = " ::cudaErrorSharedObjectInitFailed,"] - #[doc = " ::cudaErrorInvalidPtx,"] - #[doc = " ::cudaErrorUnsupportedPtxVersion,"] - #[doc = " ::cudaErrorNoKernelImageForDevice,"] - #[doc = " ::cudaErrorJitCompilerNotFound,"] - #[doc = " ::cudaErrorJitCompilationDisabled"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C++ API)\","] - #[doc = " ::cuLaunchKernel"] pub fn cudaLaunchKernel( func: *const ::libc::c_void, gridDim: dim3, @@ -10085,59 +8346,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Launches a device function where thread blocks can cooperate and synchronize as they execute"] - #[doc = ""] - #[doc = " The function invokes kernel \\p func on \\p gridDim (\\p gridDim.x × \\p gridDim.y"] - #[doc = " × \\p gridDim.z) grid of blocks. Each block contains \\p blockDim (\\p blockDim.x ×"] - #[doc = " \\p blockDim.y × \\p blockDim.z) threads."] - #[doc = ""] - #[doc = " The device on which this kernel is invoked must have a non-zero value for"] - #[doc = " the device attribute ::cudaDevAttrCooperativeLaunch."] - #[doc = ""] - #[doc = " The total number of blocks launched cannot exceed the maximum number of blocks per"] - #[doc = " multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or"] - #[doc = " ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors"] - #[doc = " as specified by the device attribute ::cudaDevAttrMultiProcessorCount."] - #[doc = ""] - #[doc = " The kernel cannot make use of CUDA dynamic parallelism."] - #[doc = ""] - #[doc = " If the kernel has N parameters the \\p args should point to array of N pointers."] - #[doc = " Each pointer, from args[0] to args[N - 1], point to the region"] - #[doc = " of memory from which the actual parameter will be copied."] - #[doc = ""] - #[doc = " For templated functions, pass the function symbol as follows:"] - #[doc = " func_name"] - #[doc = ""] - #[doc = " \\p sharedMem sets the amount of dynamic shared memory that will be available to"] - #[doc = " each thread block."] - #[doc = ""] - #[doc = " \\p stream specifies a stream the invocation is associated to."] - #[doc = ""] - #[doc = " \\param func - Device function symbol"] - #[doc = " \\param gridDim - Grid dimentions"] - #[doc = " \\param blockDim - Block dimentions"] - #[doc = " \\param args - Arguments"] - #[doc = " \\param sharedMem - Shared memory"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidConfiguration,"] - #[doc = " ::cudaErrorLaunchFailure,"] - #[doc = " ::cudaErrorLaunchTimeout,"] - #[doc = " ::cudaErrorLaunchOutOfResources,"] - #[doc = " ::cudaErrorCooperativeLaunchTooLarge,"] - #[doc = " ::cudaErrorSharedObjectInitFailed"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaLaunchCooperativeKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchCooperativeKernel (C++ API)\","] - #[doc = " ::cudaLaunchCooperativeKernelMultiDevice,"] - #[doc = " ::cuLaunchCooperativeKernel"] pub fn cudaLaunchCooperativeKernel( func: *const ::libc::c_void, gridDim: dim3, @@ -10148,103 +8356,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Launches device functions on multiple devices where thread blocks can cooperate and synchronize as they execute"] - #[doc = ""] - #[doc = " \\deprecated This function is deprecated as of CUDA 11.3."] - #[doc = ""] - #[doc = " Invokes kernels as specified in the \\p launchParamsList array where each element"] - #[doc = " of the array specifies all the parameters required to perform a single kernel launch."] - #[doc = " These kernels can cooperate and synchronize as they execute. The size of the array is"] - #[doc = " specified by \\p numDevices."] - #[doc = ""] - #[doc = " No two kernels can be launched on the same device. All the devices targeted by this"] - #[doc = " multi-device launch must be identical. All devices must have a non-zero value for the"] - #[doc = " device attribute ::cudaDevAttrCooperativeMultiDeviceLaunch."] - #[doc = ""] - #[doc = " The same kernel must be launched on all devices. Note that any __device__ or __constant__"] - #[doc = " variables are independently instantiated on every device. It is the application's"] - #[doc = " responsiblity to ensure these variables are initialized and used appropriately."] - #[doc = ""] - #[doc = " The size of the grids as specified in blocks, the size of the blocks themselves and the"] - #[doc = " amount of shared memory used by each thread block must also match across all launched kernels."] - #[doc = ""] - #[doc = " The streams used to launch these kernels must have been created via either ::cudaStreamCreate"] - #[doc = " or ::cudaStreamCreateWithPriority or ::cudaStreamCreateWithPriority. The NULL stream or"] - #[doc = " ::cudaStreamLegacy or ::cudaStreamPerThread cannot be used."] - #[doc = ""] - #[doc = " The total number of blocks launched per kernel cannot exceed the maximum number of blocks"] - #[doc = " per multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or"] - #[doc = " ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors"] - #[doc = " as specified by the device attribute ::cudaDevAttrMultiProcessorCount. Since the"] - #[doc = " total number of blocks launched per device has to match across all devices, the maximum"] - #[doc = " number of blocks that can be launched per device will be limited by the device with the"] - #[doc = " least number of multiprocessors."] - #[doc = ""] - #[doc = " The kernel cannot make use of CUDA dynamic parallelism."] - #[doc = ""] - #[doc = " The ::cudaLaunchParams structure is defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaLaunchParams"] - #[doc = "{"] - #[doc = "void *func;"] - #[doc = "dim3 gridDim;"] - #[doc = "dim3 blockDim;"] - #[doc = "void **args;"] - #[doc = "size_t sharedMem;"] - #[doc = "cudaStream_t stream;"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = " where:"] - #[doc = " - ::cudaLaunchParams::func specifies the kernel to be launched. This same functions must"] - #[doc = " be launched on all devices. For templated functions, pass the function symbol as follows:"] - #[doc = " func_name"] - #[doc = " - ::cudaLaunchParams::gridDim specifies the width, height and depth of the grid in blocks."] - #[doc = " This must match across all kernels launched."] - #[doc = " - ::cudaLaunchParams::blockDim is the width, height and depth of each thread block. This"] - #[doc = " must match across all kernels launched."] - #[doc = " - ::cudaLaunchParams::args specifies the arguments to the kernel. If the kernel has"] - #[doc = " N parameters then ::cudaLaunchParams::args should point to array of N pointers. Each"] - #[doc = " pointer, from ::cudaLaunchParams::args[0] to ::cudaLaunchParams::args[N - 1],"] - #[doc = " point to the region of memory from which the actual parameter will be copied."] - #[doc = " - ::cudaLaunchParams::sharedMem is the dynamic shared-memory size per thread block in bytes."] - #[doc = " This must match across all kernels launched."] - #[doc = " - ::cudaLaunchParams::stream is the handle to the stream to perform the launch in. This cannot"] - #[doc = " be the NULL stream or ::cudaStreamLegacy or ::cudaStreamPerThread."] - #[doc = ""] - #[doc = " By default, the kernel won't begin execution on any GPU until all prior work in all the specified"] - #[doc = " streams has completed. This behavior can be overridden by specifying the flag"] - #[doc = " ::cudaCooperativeLaunchMultiDeviceNoPreSync. When this flag is specified, each kernel"] - #[doc = " will only wait for prior work in the stream corresponding to that GPU to complete before it begins"] - #[doc = " execution."] - #[doc = ""] - #[doc = " Similarly, by default, any subsequent work pushed in any of the specified streams will not begin"] - #[doc = " execution until the kernels on all GPUs have completed. This behavior can be overridden by specifying"] - #[doc = " the flag ::cudaCooperativeLaunchMultiDeviceNoPostSync. When this flag is specified,"] - #[doc = " any subsequent work pushed in any of the specified streams will only wait for the kernel launched"] - #[doc = " on the GPU corresponding to that stream to complete before it begins execution."] - #[doc = ""] - #[doc = " \\param launchParamsList - List of launch parameters, one per device"] - #[doc = " \\param numDevices - Size of the \\p launchParamsList array"] - #[doc = " \\param flags - Flags to control launch behavior"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidConfiguration,"] - #[doc = " ::cudaErrorLaunchFailure,"] - #[doc = " ::cudaErrorLaunchTimeout,"] - #[doc = " ::cudaErrorLaunchOutOfResources,"] - #[doc = " ::cudaErrorCooperativeLaunchTooLarge,"] - #[doc = " ::cudaErrorSharedObjectInitFailed"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaLaunchCooperativeKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchCooperativeKernel (C++ API)\","] - #[doc = " ::cudaLaunchCooperativeKernel,"] - #[doc = " ::cuLaunchCooperativeKernelMultiDevice"] pub fn cudaLaunchCooperativeKernelMultiDevice( launchParamsList: *mut cudaLaunchParams, numDevices: ::libc::c_uint, @@ -10252,179 +8363,24 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the preferred cache configuration for a device function"] - #[doc = ""] - #[doc = " On devices where the L1 cache and shared memory use the same hardware"] - #[doc = " resources, this sets through \\p cacheConfig the preferred cache configuration"] - #[doc = " for the function specified via \\p func. This is only a preference. The"] - #[doc = " runtime will use the requested configuration if possible, but it is free to"] - #[doc = " choose a different configuration if required to execute \\p func."] - #[doc = ""] - #[doc = " \\p func is a device function symbol and must be declared as a"] - #[doc = " \\c __global__ function. If the specified function does not exist,"] - #[doc = " then ::cudaErrorInvalidDeviceFunction is returned. For templated functions,"] - #[doc = " pass the function symbol as follows: func_name"] - #[doc = ""] - #[doc = " This setting does nothing on devices where the size of the L1 cache and"] - #[doc = " shared memory are fixed."] - #[doc = ""] - #[doc = " Launching a kernel with a different preference than the most recent"] - #[doc = " preference setting may insert a device-side synchronization point."] - #[doc = ""] - #[doc = " The supported cache configurations are:"] - #[doc = " - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)"] - #[doc = " - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache"] - #[doc = " - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory"] - #[doc = " - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory"] - #[doc = ""] - #[doc = " \\param func - Device function symbol"] - #[doc = " \\param cacheConfig - Requested cache configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDeviceFunction"] - #[doc = " \\notefnerr"] - #[doc = " \\note_string_api_deprecation2"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\","] - #[doc = " \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\","] - #[doc = " \\ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C API)\","] - #[doc = " ::cudaThreadGetCacheConfig,"] - #[doc = " ::cudaThreadSetCacheConfig,"] - #[doc = " ::cuFuncSetCacheConfig"] pub fn cudaFuncSetCacheConfig( func: *const ::libc::c_void, cacheConfig: cudaFuncCache, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the shared memory configuration for a device function"] - #[doc = ""] - #[doc = " On devices with configurable shared memory banks, this function will"] - #[doc = " force all subsequent launches of the specified device function to have"] - #[doc = " the given shared memory bank size configuration. On any given launch of the"] - #[doc = " function, the shared memory configuration of the device will be temporarily"] - #[doc = " changed if needed to suit the function's preferred configuration. Changes in"] - #[doc = " shared memory configuration between subsequent launches of functions,"] - #[doc = " may introduce a device side synchronization point."] - #[doc = ""] - #[doc = " Any per-function setting of shared memory bank size set via"] - #[doc = " ::cudaFuncSetSharedMemConfig will override the device wide setting set by"] - #[doc = " ::cudaDeviceSetSharedMemConfig."] - #[doc = ""] - #[doc = " Changing the shared memory bank size will not increase shared memory usage"] - #[doc = " or affect occupancy of kernels, but may have major effects on performance."] - #[doc = " Larger bank sizes will allow for greater potential bandwidth to shared memory,"] - #[doc = " but will change what kinds of accesses to shared memory will result in bank"] - #[doc = " conflicts."] - #[doc = ""] - #[doc = " This function will do nothing on devices with fixed shared memory bank size."] - #[doc = ""] - #[doc = " For templated functions, pass the function symbol as follows:"] - #[doc = " func_name"] - #[doc = ""] - #[doc = " The supported bank configurations are:"] - #[doc = " - ::cudaSharedMemBankSizeDefault: use the device's shared memory configuration"] - #[doc = " when launching this function."] - #[doc = " - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be"] - #[doc = " four bytes natively when launching this function."] - #[doc = " - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight"] - #[doc = " bytes natively when launching this function."] - #[doc = ""] - #[doc = " \\param func - Device function symbol"] - #[doc = " \\param config - Requested shared memory configuration"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_string_api_deprecation2"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceSetSharedMemConfig,"] - #[doc = " ::cudaDeviceGetSharedMemConfig,"] - #[doc = " ::cudaDeviceSetCacheConfig,"] - #[doc = " ::cudaDeviceGetCacheConfig,"] - #[doc = " ::cudaFuncSetCacheConfig,"] - #[doc = " ::cuFuncSetSharedMemConfig"] pub fn cudaFuncSetSharedMemConfig( func: *const ::libc::c_void, config: cudaSharedMemConfig, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Find out attributes for a given function"] - #[doc = ""] - #[doc = " This function obtains the attributes of a function specified via \\p func."] - #[doc = " \\p func is a device function symbol and must be declared as a"] - #[doc = " \\c __global__ function. The fetched attributes are placed in \\p attr."] - #[doc = " If the specified function does not exist, then"] - #[doc = " ::cudaErrorInvalidDeviceFunction is returned. For templated functions, pass"] - #[doc = " the function symbol as follows: func_name"] - #[doc = ""] - #[doc = " Note that some function attributes such as"] - #[doc = " \\ref ::cudaFuncAttributes::maxThreadsPerBlock \"maxThreadsPerBlock\""] - #[doc = " may vary based on the device that is currently being used."] - #[doc = ""] - #[doc = " \\param attr - Return pointer to function's attributes"] - #[doc = " \\param func - Device function symbol"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDeviceFunction"] - #[doc = " \\notefnerr"] - #[doc = " \\note_string_api_deprecation2"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\","] - #[doc = " \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, T*) \"cudaFuncGetAttributes (C++ API)\","] - #[doc = " \\ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C API)\","] - #[doc = " ::cuFuncGetAttribute"] pub fn cudaFuncGetAttributes( attr: *mut cudaFuncAttributes, func: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Set attributes for a given function"] - #[doc = ""] - #[doc = " This function sets the attributes of a function specified via \\p func."] - #[doc = " The parameter \\p func must be a pointer to a function that executes"] - #[doc = " on the device. The parameter specified by \\p func must be declared as a \\p __global__"] - #[doc = " function. The enumeration defined by \\p attr is set to the value defined by \\p value."] - #[doc = " If the specified function does not exist, then ::cudaErrorInvalidDeviceFunction is returned."] - #[doc = " If the specified attribute cannot be written, or if the value is incorrect,"] - #[doc = " then ::cudaErrorInvalidValue is returned."] - #[doc = ""] - #[doc = " Valid values for \\p attr are:"] - #[doc = " - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes"] - #[doc = " cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture."] - #[doc = " - ::cudaFuncAttributePreferredSharedMemoryCarveout - On devices where the L1 cache and shared memory use the same hardware resources,"] - #[doc = " this sets the shared memory carveout preference, in percent of the total shared memory. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor."] - #[doc = " This is only a hint, and the driver can choose a different ratio if required to execute the function."] - #[doc = ""] - #[doc = " \\param func - Function to get attributes of"] - #[doc = " \\param attr - Attribute to set"] - #[doc = " \\param value - Value to set"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C++ API)\","] - #[doc = " \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\","] - #[doc = " \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\","] pub fn cudaFuncSetAttribute( func: *const ::libc::c_void, attr: cudaFuncAttribute, @@ -10432,114 +8388,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Converts a double argument to be executed on a device"] - #[doc = ""] - #[doc = " \\param d - Double to convert"] - #[doc = ""] - #[doc = " \\deprecated This function is deprecated as of CUDA 7.5"] - #[doc = ""] - #[doc = " Converts the double value of \\p d to an internal float representation if"] - #[doc = " the device does not support double arithmetic. If the device does natively"] - #[doc = " support doubles, then this function does nothing."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\","] - #[doc = " \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\","] - #[doc = " ::cudaSetDoubleForHost"] pub fn cudaSetDoubleForDevice(d: *mut f64) -> cudaError_t; } extern "C" { - #[doc = " \\brief Converts a double argument after execution on a device"] - #[doc = ""] - #[doc = " \\deprecated This function is deprecated as of CUDA 7.5"] - #[doc = ""] - #[doc = " Converts the double value of \\p d from a potentially internal float"] - #[doc = " representation if the device does not support double arithmetic. If the"] - #[doc = " device does natively support doubles, then this function does nothing."] - #[doc = ""] - #[doc = " \\param d - Double to convert"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\","] - #[doc = " \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\","] - #[doc = " ::cudaSetDoubleForDevice"] pub fn cudaSetDoubleForHost(d: *mut f64) -> cudaError_t; } extern "C" { - #[doc = " \\brief Enqueues a host function call in a stream"] - #[doc = ""] - #[doc = " Enqueues a host function to run in a stream. The function will be called"] - #[doc = " after currently enqueued work and will block work added after it."] - #[doc = ""] - #[doc = " The host function must not make any CUDA API calls. Attempting to use a"] - #[doc = " CUDA API may result in ::cudaErrorNotPermitted, but this is not required."] - #[doc = " The host function must not perform any synchronization that may depend on"] - #[doc = " outstanding CUDA work not mandated to run earlier. Host functions without a"] - #[doc = " mandated order (such as in independent streams) execute in undefined order"] - #[doc = " and may be serialized."] - #[doc = ""] - #[doc = " For the purposes of Unified Memory, execution makes a number of guarantees:"] - #[doc = "
    "] - #[doc = "
  • The stream is considered idle for the duration of the function's"] - #[doc = " execution. Thus, for example, the function may always use memory attached"] - #[doc = " to the stream it was enqueued in.
  • "] - #[doc = "
  • The start of execution of the function has the same effect as"] - #[doc = " synchronizing an event recorded in the same stream immediately prior to"] - #[doc = " the function. It thus synchronizes streams which have been \"joined\""] - #[doc = " prior to the function.
  • "] - #[doc = "
  • Adding device work to any stream does not have the effect of making"] - #[doc = " the stream active until all preceding host functions and stream callbacks"] - #[doc = " have executed. Thus, for"] - #[doc = " example, a function might use global attached memory even if work has"] - #[doc = " been added to another stream, if the work has been ordered behind the"] - #[doc = " function call with an event.
  • "] - #[doc = "
  • Completion of the function does not cause a stream to become"] - #[doc = " active except as described above. The stream will remain idle"] - #[doc = " if no device work follows the function, and will remain idle across"] - #[doc = " consecutive host functions or stream callbacks without device work in"] - #[doc = " between. Thus, for example,"] - #[doc = " stream synchronization can be done by signaling from a host function at the"] - #[doc = " end of the stream.
  • "] - #[doc = "
"] - #[doc = ""] - #[doc = " Note that, in constrast to ::cuStreamAddCallback, the function will not be"] - #[doc = " called in the event of an error in the CUDA context."] - #[doc = ""] - #[doc = " \\param hStream - Stream to enqueue function call in"] - #[doc = " \\param fn - The function to call once preceding stream operations are complete"] - #[doc = " \\param userData - User-specified data to be passed to the function"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaStreamCreate,"] - #[doc = " ::cudaStreamQuery,"] - #[doc = " ::cudaStreamSynchronize,"] - #[doc = " ::cudaStreamWaitEvent,"] - #[doc = " ::cudaStreamDestroy,"] - #[doc = " ::cudaMallocManaged,"] - #[doc = " ::cudaStreamAttachMemAsync,"] - #[doc = " ::cudaStreamAddCallback,"] - #[doc = " ::cuLaunchHostFunc"] pub fn cudaLaunchHostFunc( stream: cudaStream_t, fn_: cudaHostFn_t, @@ -10547,33 +8401,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns occupancy for a device function"] - #[doc = ""] - #[doc = " Returns in \\p *numBlocks the maximum number of active blocks per"] - #[doc = " streaming multiprocessor for the device function."] - #[doc = ""] - #[doc = " \\param numBlocks - Returned occupancy"] - #[doc = " \\param func - Kernel function for which occupancy is calculated"] - #[doc = " \\param blockSize - Block size the kernel is intended to be launched with"] - #[doc = " \\param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorUnknown,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,"] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) \"cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)\","] - #[doc = " ::cuOccupancyMaxActiveBlocksPerMultiprocessor"] pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessor( numBlocks: *mut ::libc::c_int, func: *const ::libc::c_void, @@ -10582,31 +8409,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns dynamic shared memory available per block when launching \\p numBlocks blocks on SM."] - #[doc = ""] - #[doc = " Returns in \\p *dynamicSmemSize the maximum size of dynamic shared memory to allow \\p numBlocks blocks per SM."] - #[doc = ""] - #[doc = " \\param dynamicSmemSize - Returned maximum dynamic shared memory"] - #[doc = " \\param func - Kernel function for which occupancy is calculated"] - #[doc = " \\param numBlocks - Number of blocks to fit on SM"] - #[doc = " \\param blockSize - Size of the block"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorUnknown,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,"] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\","] - #[doc = " ::cudaOccupancyAvailableDynamicSMemPerBlock"] pub fn cudaOccupancyAvailableDynamicSMemPerBlock( dynamicSmemSize: *mut usize, func: *const ::libc::c_void, @@ -10615,47 +8417,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns occupancy for a device function with the specified flags"] - #[doc = ""] - #[doc = " Returns in \\p *numBlocks the maximum number of active blocks per"] - #[doc = " streaming multiprocessor for the device function."] - #[doc = ""] - #[doc = " The \\p flags parameter controls how special cases are handled. Valid flags include:"] - #[doc = ""] - #[doc = " - ::cudaOccupancyDefault: keeps the default behavior as"] - #[doc = " ::cudaOccupancyMaxActiveBlocksPerMultiprocessor"] - #[doc = ""] - #[doc = " - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior"] - #[doc = " on platform where global caching affects occupancy. On such platforms, if caching"] - #[doc = " is enabled, but per-block SM resource usage would result in zero occupancy, the"] - #[doc = " occupancy calculator will calculate the occupancy as if caching is disabled."] - #[doc = " Setting this flag makes the occupancy calculator to return 0 in such cases."] - #[doc = " More information can be found about this feature in the \"Unified L1/Texture Cache\""] - #[doc = " section of the Maxwell tuning guide."] - #[doc = ""] - #[doc = " \\param numBlocks - Returned occupancy"] - #[doc = " \\param func - Kernel function for which occupancy is calculated"] - #[doc = " \\param blockSize - Block size the kernel is intended to be launched with"] - #[doc = " \\param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes"] - #[doc = " \\param flags - Requested behavior for the occupancy calculator"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidDeviceFunction,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorUnknown,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor,"] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\","] - #[doc = " \\ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) \"cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)\","] - #[doc = " ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"] pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( numBlocks: *mut ::libc::c_int, func: *const ::libc::c_void, @@ -10672,106 +8433,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocate memory on the device"] - #[doc = ""] - #[doc = " Allocates \\p size bytes of linear memory on the device and returns in"] - #[doc = " \\p *devPtr a pointer to the allocated memory. The allocated memory is"] - #[doc = " suitably aligned for any kind of variable. The memory is not cleared."] - #[doc = " ::cudaMalloc() returns ::cudaErrorMemoryAllocation in case of failure."] - #[doc = ""] - #[doc = " The device version of ::cudaFree cannot be used with a \\p *devPtr"] - #[doc = " allocated using the host API, and vice versa."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to allocated device memory"] - #[doc = " \\param size - Requested allocation size in bytes"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray,"] - #[doc = " ::cudaMalloc3D, ::cudaMalloc3DArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc,"] - #[doc = " ::cuMemAlloc"] pub fn cudaMalloc(devPtr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocates page-locked memory on the host"] - #[doc = ""] - #[doc = " Allocates \\p size bytes of host memory that is page-locked and accessible"] - #[doc = " to the device. The driver tracks the virtual memory ranges allocated with"] - #[doc = " this function and automatically accelerates calls to functions such as"] - #[doc = " ::cudaMemcpy*(). Since the memory can be accessed directly by the device,"] - #[doc = " it can be read or written with much higher bandwidth than pageable memory"] - #[doc = " obtained with functions such as ::malloc(). Allocating excessive amounts of"] - #[doc = " memory with ::cudaMallocHost() may degrade system performance, since it"] - #[doc = " reduces the amount of memory available to the system for paging. As a"] - #[doc = " result, this function is best used sparingly to allocate staging areas for"] - #[doc = " data exchange between host and device."] - #[doc = ""] - #[doc = " \\param ptr - Pointer to allocated host memory"] - #[doc = " \\param size - Requested allocation size in bytes"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocArray, ::cudaMalloc3D,"] - #[doc = " ::cudaMalloc3DArray, ::cudaHostAlloc, ::cudaFree, ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t, unsigned int) \"cudaMallocHost (C++ API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc,"] - #[doc = " ::cuMemAllocHost"] pub fn cudaMallocHost(ptr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocates pitched memory on the device"] - #[doc = ""] - #[doc = " Allocates at least \\p width (in bytes) * \\p height bytes of linear memory"] - #[doc = " on the device and returns in \\p *devPtr a pointer to the allocated memory."] - #[doc = " The function may pad the allocation to ensure that corresponding pointers"] - #[doc = " in any given row will continue to meet the alignment requirements for"] - #[doc = " coalescing as the address is updated from row to row. The pitch returned in"] - #[doc = " \\p *pitch by ::cudaMallocPitch() is the width in bytes of the allocation."] - #[doc = " The intended usage of \\p pitch is as a separate parameter of the allocation,"] - #[doc = " used to compute addresses within the 2D array. Given the row and column of"] - #[doc = " an array element of type \\p T, the address is computed as:"] - #[doc = " \\code"] - #[doc = "T* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column;"] - #[doc = "\\endcode"] - #[doc = ""] - #[doc = " For allocations of 2D arrays, it is recommended that programmers consider"] - #[doc = " performing pitch allocations using ::cudaMallocPitch(). Due to pitch"] - #[doc = " alignment restrictions in the hardware, this is especially true if the"] - #[doc = " application will be performing 2D memory copies between different regions"] - #[doc = " of device memory (whether linear memory or CUDA arrays)."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to allocated pitched device memory"] - #[doc = " \\param pitch - Pitch for allocation"] - #[doc = " \\param width - Requested pitched allocation width (in bytes)"] - #[doc = " \\param height - Requested pitched allocation height"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray,"] - #[doc = " ::cudaHostAlloc,"] - #[doc = " ::cuMemAllocPitch"] pub fn cudaMallocPitch( devPtr: *mut *mut ::libc::c_void, pitch: *mut usize, @@ -10780,51 +8447,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocate an array on the device"] - #[doc = ""] - #[doc = " Allocates a CUDA array according to the ::cudaChannelFormatDesc structure"] - #[doc = " \\p desc and returns a handle to the new CUDA array in \\p *array."] - #[doc = ""] - #[doc = " The ::cudaChannelFormatDesc is defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaChannelFormatDesc {"] - #[doc = "int x, y, z, w;"] - #[doc = "enum cudaChannelFormatKind f;"] - #[doc = "};"] - #[doc = "\\endcode"] - #[doc = " where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,"] - #[doc = " ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat."] - #[doc = ""] - #[doc = " The \\p flags parameter enables different options to be specified that affect"] - #[doc = " the allocation, as follows."] - #[doc = " - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation"] - #[doc = " - ::cudaArraySurfaceLoadStore: Allocates an array that can be read from or written to using a surface reference"] - #[doc = " - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the array."] - #[doc = " - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array"] - #[doc = " can later be mapped to physical memory by calling ::cuMemMapArrayAsync. The physical backing memory must be allocated"] - #[doc = " via ::cuMemCreate."] - #[doc = ""] - #[doc = " \\p width and \\p height must meet certain size requirements. See ::cudaMalloc3DArray() for more details."] - #[doc = ""] - #[doc = " \\param array - Pointer to allocated array in device memory"] - #[doc = " \\param desc - Requested channel format"] - #[doc = " \\param width - Requested array allocation width"] - #[doc = " \\param height - Requested array allocation height"] - #[doc = " \\param flags - Requested properties of allocated array"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray,"] - #[doc = " ::cudaHostAlloc,"] - #[doc = " ::cuArrayCreate"] pub fn cudaMallocArray( array: *mut cudaArray_t, desc: *const cudaChannelFormatDesc, @@ -10834,161 +8456,18 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Frees memory on the device"] - #[doc = ""] - #[doc = " Frees the memory space pointed to by \\p devPtr, which must have been"] - #[doc = " returned by a previous call to ::cudaMalloc() or ::cudaMallocPitch()."] - #[doc = " Otherwise, or if ::cudaFree(\\p devPtr) has already been called before,"] - #[doc = " an error is returned. If \\p devPtr is 0, no operation is performed."] - #[doc = " ::cudaFree() returns ::cudaErrorValue in case of failure."] - #[doc = ""] - #[doc = " The device version of ::cudaFree cannot be used with a \\p *devPtr"] - #[doc = " allocated using the host API, and vice versa."] - #[doc = ""] - #[doc = " \\param devPtr - Device pointer to memory to free"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocArray, ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray,"] - #[doc = " ::cudaHostAlloc,"] - #[doc = " ::cuMemFree"] pub fn cudaFree(devPtr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - #[doc = " \\brief Frees page-locked memory"] - #[doc = ""] - #[doc = " Frees the memory space pointed to by \\p hostPtr, which must have been"] - #[doc = " returned by a previous call to ::cudaMallocHost() or ::cudaHostAlloc()."] - #[doc = ""] - #[doc = " \\param ptr - Pointer to memory to free"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,"] - #[doc = " ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaHostAlloc,"] - #[doc = " ::cuMemFreeHost"] pub fn cudaFreeHost(ptr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - #[doc = " \\brief Frees an array on the device"] - #[doc = ""] - #[doc = " Frees the CUDA array \\p array, which must have been returned by a"] - #[doc = " previous call to ::cudaMallocArray(). If \\p devPtr is 0,"] - #[doc = " no operation is performed."] - #[doc = ""] - #[doc = " \\param array - Pointer to array to free"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc,"] - #[doc = " ::cuArrayDestroy"] pub fn cudaFreeArray(array: cudaArray_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Frees a mipmapped array on the device"] - #[doc = ""] - #[doc = " Frees the CUDA mipmapped array \\p mipmappedArray, which must have been"] - #[doc = " returned by a previous call to ::cudaMallocMipmappedArray(). If \\p devPtr"] - #[doc = " is 0, no operation is performed."] - #[doc = ""] - #[doc = " \\param mipmappedArray - Pointer to mipmapped array to free"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc,"] - #[doc = " ::cuMipmappedArrayDestroy"] pub fn cudaFreeMipmappedArray(mipmappedArray: cudaMipmappedArray_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocates page-locked memory on the host"] - #[doc = ""] - #[doc = " Allocates \\p size bytes of host memory that is page-locked and accessible"] - #[doc = " to the device. The driver tracks the virtual memory ranges allocated with"] - #[doc = " this function and automatically accelerates calls to functions such as"] - #[doc = " ::cudaMemcpy(). Since the memory can be accessed directly by the device, it"] - #[doc = " can be read or written with much higher bandwidth than pageable memory"] - #[doc = " obtained with functions such as ::malloc(). Allocating excessive amounts of"] - #[doc = " pinned memory may degrade system performance, since it reduces the amount"] - #[doc = " of memory available to the system for paging. As a result, this function is"] - #[doc = " best used sparingly to allocate staging areas for data exchange between host"] - #[doc = " and device."] - #[doc = ""] - #[doc = " The \\p flags parameter enables different options to be specified that affect"] - #[doc = " the allocation, as follows."] - #[doc = " - ::cudaHostAllocDefault: This flag's value is defined to be 0 and causes"] - #[doc = " ::cudaHostAlloc() to emulate ::cudaMallocHost()."] - #[doc = " - ::cudaHostAllocPortable: The memory returned by this call will be"] - #[doc = " considered as pinned memory by all CUDA contexts, not just the one that"] - #[doc = " performed the allocation."] - #[doc = " - ::cudaHostAllocMapped: Maps the allocation into the CUDA address space."] - #[doc = " The device pointer to the memory may be obtained by calling"] - #[doc = " ::cudaHostGetDevicePointer()."] - #[doc = " - ::cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC)."] - #[doc = " WC memory can be transferred across the PCI Express bus more quickly on some"] - #[doc = " system configurations, but cannot be read efficiently by most CPUs. WC"] - #[doc = " memory is a good option for buffers that will be written by the CPU and read"] - #[doc = " by the device via mapped pinned memory or host->device transfers."] - #[doc = ""] - #[doc = " All of these flags are orthogonal to one another: a developer may allocate"] - #[doc = " memory that is portable, mapped and/or write-combined with no restrictions."] - #[doc = ""] - #[doc = " In order for the ::cudaHostAllocMapped flag to have any effect, the CUDA context"] - #[doc = " must support the ::cudaDeviceMapHost flag, which can be checked via"] - #[doc = " ::cudaGetDeviceFlags(). The ::cudaDeviceMapHost flag is implicitly set for"] - #[doc = " contexts created via the runtime API."] - #[doc = ""] - #[doc = " The ::cudaHostAllocMapped flag may be specified on CUDA contexts for devices"] - #[doc = " that do not support mapped pinned memory. The failure is deferred to"] - #[doc = " ::cudaHostGetDevicePointer() because the memory may be mapped into other"] - #[doc = " CUDA contexts via the ::cudaHostAllocPortable flag."] - #[doc = ""] - #[doc = " Memory allocated by this function must be freed with ::cudaFreeHost()."] - #[doc = ""] - #[doc = " \\param pHost - Device pointer to allocated memory"] - #[doc = " \\param size - Requested allocation size in bytes"] - #[doc = " \\param flags - Requested properties of allocated memory"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaSetDeviceFlags,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost,"] - #[doc = " ::cudaGetDeviceFlags,"] - #[doc = " ::cuMemHostAlloc"] pub fn cudaHostAlloc( pHost: *mut *mut ::libc::c_void, size: usize, @@ -10996,95 +8475,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Registers an existing host memory range for use by CUDA"] - #[doc = ""] - #[doc = " Page-locks the memory range specified by \\p ptr and \\p size and maps it"] - #[doc = " for the device(s) as specified by \\p flags. This memory range also is added"] - #[doc = " to the same tracking mechanism as ::cudaHostAlloc() to automatically accelerate"] - #[doc = " calls to functions such as ::cudaMemcpy(). Since the memory can be accessed"] - #[doc = " directly by the device, it can be read or written with much higher bandwidth"] - #[doc = " than pageable memory that has not been registered. Page-locking excessive"] - #[doc = " amounts of memory may degrade system performance, since it reduces the amount"] - #[doc = " of memory available to the system for paging. As a result, this function is"] - #[doc = " best used sparingly to register staging areas for data exchange between"] - #[doc = " host and device."] - #[doc = ""] - #[doc = " ::cudaHostRegister is supported only on I/O coherent devices that have a non-zero"] - #[doc = " value for the device attribute ::cudaDevAttrHostRegisterSupported."] - #[doc = ""] - #[doc = " The \\p flags parameter enables different options to be specified that"] - #[doc = " affect the allocation, as follows."] - #[doc = ""] - #[doc = " - ::cudaHostRegisterDefault: On a system with unified virtual addressing,"] - #[doc = " the memory will be both mapped and portable. On a system with no unified"] - #[doc = " virtual addressing, the memory will be neither mapped nor portable."] - #[doc = ""] - #[doc = " - ::cudaHostRegisterPortable: The memory returned by this call will be"] - #[doc = " considered as pinned memory by all CUDA contexts, not just the one that"] - #[doc = " performed the allocation."] - #[doc = ""] - #[doc = " - ::cudaHostRegisterMapped: Maps the allocation into the CUDA address"] - #[doc = " space. The device pointer to the memory may be obtained by calling"] - #[doc = " ::cudaHostGetDevicePointer()."] - #[doc = ""] - #[doc = " - ::cudaHostRegisterIoMemory: The passed memory pointer is treated as"] - #[doc = " pointing to some memory-mapped I/O space, e.g. belonging to a"] - #[doc = " third-party PCIe device, and it will marked as non cache-coherent and"] - #[doc = " contiguous."] - #[doc = ""] - #[doc = " - ::cudaHostRegisterReadOnly: The passed memory pointer is treated as"] - #[doc = " pointing to memory that is considered read-only by the device. On"] - #[doc = " platforms without ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, this"] - #[doc = " flag is required in order to register memory mapped to the CPU as"] - #[doc = " read-only. Support for the use of this flag can be queried from the device"] - #[doc = " attribute cudaDeviceAttrReadOnlyHostRegisterSupported. Using this flag with"] - #[doc = " a current context associated with a device that does not have this attribute"] - #[doc = " set will cause ::cudaHostRegister to error with cudaErrorNotSupported."] - #[doc = ""] - #[doc = " All of these flags are orthogonal to one another: a developer may page-lock"] - #[doc = " memory that is portable or mapped with no restrictions."] - #[doc = ""] - #[doc = " The CUDA context must have been created with the ::cudaMapHost flag in"] - #[doc = " order for the ::cudaHostRegisterMapped flag to have any effect."] - #[doc = ""] - #[doc = " The ::cudaHostRegisterMapped flag may be specified on CUDA contexts for"] - #[doc = " devices that do not support mapped pinned memory. The failure is deferred"] - #[doc = " to ::cudaHostGetDevicePointer() because the memory may be mapped into"] - #[doc = " other CUDA contexts via the ::cudaHostRegisterPortable flag."] - #[doc = ""] - #[doc = " For devices that have a non-zero value for the device attribute"] - #[doc = " ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory"] - #[doc = " can also be accessed from the device using the host pointer \\p ptr."] - #[doc = " The device pointer returned by ::cudaHostGetDevicePointer() may or may not"] - #[doc = " match the original host pointer \\p ptr and depends on the devices visible to the"] - #[doc = " application. If all devices visible to the application have a non-zero value for the"] - #[doc = " device attribute, the device pointer returned by ::cudaHostGetDevicePointer()"] - #[doc = " will match the original pointer \\p ptr. If any device visible to the application"] - #[doc = " has a zero value for the device attribute, the device pointer returned by"] - #[doc = " ::cudaHostGetDevicePointer() will not match the original host pointer \\p ptr,"] - #[doc = " but it will be suitable for use on all devices provided Unified Virtual Addressing"] - #[doc = " is enabled. In such systems, it is valid to access the memory using either pointer"] - #[doc = " on devices that have a non-zero value for the device attribute. Note however that"] - #[doc = " such devices should access the memory using only of the two pointers and not both."] - #[doc = ""] - #[doc = " The memory page-locked by this function must be unregistered with ::cudaHostUnregister()."] - #[doc = ""] - #[doc = " \\param ptr - Host pointer to memory to page-lock"] - #[doc = " \\param size - Size in bytes of the address range to page-lock in bytes"] - #[doc = " \\param flags - Flags for allocation request"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation,"] - #[doc = " ::cudaErrorHostMemoryAlreadyRegistered,"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaHostUnregister, ::cudaHostGetFlags, ::cudaHostGetDevicePointer,"] - #[doc = " ::cuMemHostRegister"] pub fn cudaHostRegister( ptr: *mut ::libc::c_void, size: usize, @@ -11092,69 +8482,9 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Unregisters a memory range that was registered with cudaHostRegister"] - #[doc = ""] - #[doc = " Unmaps the memory range whose base address is specified by \\p ptr, and makes"] - #[doc = " it pageable again."] - #[doc = ""] - #[doc = " The base address must be the same one specified to ::cudaHostRegister()."] - #[doc = ""] - #[doc = " \\param ptr - Host pointer to memory to unregister"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorHostMemoryNotRegistered"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaHostUnregister,"] - #[doc = " ::cuMemHostUnregister"] pub fn cudaHostUnregister(ptr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - #[doc = " \\brief Passes back device pointer of mapped host memory allocated by"] - #[doc = " cudaHostAlloc or registered by cudaHostRegister"] - #[doc = ""] - #[doc = " Passes back the device pointer corresponding to the mapped, pinned host"] - #[doc = " buffer allocated by ::cudaHostAlloc() or registered by ::cudaHostRegister()."] - #[doc = ""] - #[doc = " ::cudaHostGetDevicePointer() will fail if the ::cudaDeviceMapHost flag was"] - #[doc = " not specified before deferred context creation occurred, or if called on a"] - #[doc = " device that does not support mapped, pinned memory."] - #[doc = ""] - #[doc = " For devices that have a non-zero value for the device attribute"] - #[doc = " ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory"] - #[doc = " can also be accessed from the device using the host pointer \\p pHost."] - #[doc = " The device pointer returned by ::cudaHostGetDevicePointer() may or may not"] - #[doc = " match the original host pointer \\p pHost and depends on the devices visible to the"] - #[doc = " application. If all devices visible to the application have a non-zero value for the"] - #[doc = " device attribute, the device pointer returned by ::cudaHostGetDevicePointer()"] - #[doc = " will match the original pointer \\p pHost. If any device visible to the application"] - #[doc = " has a zero value for the device attribute, the device pointer returned by"] - #[doc = " ::cudaHostGetDevicePointer() will not match the original host pointer \\p pHost,"] - #[doc = " but it will be suitable for use on all devices provided Unified Virtual Addressing"] - #[doc = " is enabled. In such systems, it is valid to access the memory using either pointer"] - #[doc = " on devices that have a non-zero value for the device attribute. Note however that"] - #[doc = " such devices should access the memory using only of the two pointers and not both."] - #[doc = ""] - #[doc = " \\p flags provides for future releases. For now, it must be set to 0."] - #[doc = ""] - #[doc = " \\param pDevice - Returned device pointer for mapped memory"] - #[doc = " \\param pHost - Requested host pointer mapping"] - #[doc = " \\param flags - Flags for extensions (must be 0 for now)"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaSetDeviceFlags, ::cudaHostAlloc,"] - #[doc = " ::cuMemHostGetDevicePointer"] pub fn cudaHostGetDevicePointer( pDevice: *mut *mut ::libc::c_void, pHost: *mut ::libc::c_void, @@ -11162,204 +8492,13 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Passes back flags used to allocate pinned host memory allocated by"] - #[doc = " cudaHostAlloc"] - #[doc = ""] - #[doc = " ::cudaHostGetFlags() will fail if the input pointer does not"] - #[doc = " reside in an address range allocated by ::cudaHostAlloc()."] - #[doc = ""] - #[doc = " \\param pFlags - Returned flags word"] - #[doc = " \\param pHost - Host pointer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaHostAlloc,"] - #[doc = " ::cuMemHostGetFlags"] pub fn cudaHostGetFlags(pFlags: *mut ::libc::c_uint, pHost: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocates logical 1D, 2D, or 3D memory objects on the device"] - #[doc = ""] - #[doc = " Allocates at least \\p width * \\p height * \\p depth bytes of linear memory"] - #[doc = " on the device and returns a ::cudaPitchedPtr in which \\p ptr is a pointer"] - #[doc = " to the allocated memory. The function may pad the allocation to ensure"] - #[doc = " hardware alignment requirements are met. The pitch returned in the \\p pitch"] - #[doc = " field of \\p pitchedDevPtr is the width in bytes of the allocation."] - #[doc = ""] - #[doc = " The returned ::cudaPitchedPtr contains additional fields \\p xsize and"] - #[doc = " \\p ysize, the logical width and height of the allocation, which are"] - #[doc = " equivalent to the \\p width and \\p height \\p extent parameters provided by"] - #[doc = " the programmer during allocation."] - #[doc = ""] - #[doc = " For allocations of 2D and 3D objects, it is highly recommended that"] - #[doc = " programmers perform allocations using ::cudaMalloc3D() or"] - #[doc = " ::cudaMallocPitch(). Due to alignment restrictions in the hardware, this is"] - #[doc = " especially true if the application will be performing memory copies"] - #[doc = " involving 2D or 3D objects (whether linear memory or CUDA arrays)."] - #[doc = ""] - #[doc = " \\param pitchedDevPtr - Pointer to allocated pitched device memory"] - #[doc = " \\param extent - Requested allocation size (\\p width field in bytes)"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMallocPitch, ::cudaFree, ::cudaMemcpy3D, ::cudaMemset3D,"] - #[doc = " ::cudaMalloc3DArray, ::cudaMallocArray, ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc, ::make_cudaPitchedPtr, ::make_cudaExtent,"] - #[doc = " ::cuMemAllocPitch"] pub fn cudaMalloc3D(pitchedDevPtr: *mut cudaPitchedPtr, extent: cudaExtent) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocate an array on the device"] - #[doc = ""] - #[doc = " Allocates a CUDA array according to the ::cudaChannelFormatDesc structure"] - #[doc = " \\p desc and returns a handle to the new CUDA array in \\p *array."] - #[doc = ""] - #[doc = " The ::cudaChannelFormatDesc is defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaChannelFormatDesc {"] - #[doc = "int x, y, z, w;"] - #[doc = "enum cudaChannelFormatKind f;"] - #[doc = "};"] - #[doc = "\\endcode"] - #[doc = " where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,"] - #[doc = " ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat."] - #[doc = ""] - #[doc = " ::cudaMalloc3DArray() can allocate the following:"] - #[doc = ""] - #[doc = " - A 1D array is allocated if the height and depth extents are both zero."] - #[doc = " - A 2D array is allocated if only the depth extent is zero."] - #[doc = " - A 3D array is allocated if all three extents are non-zero."] - #[doc = " - A 1D layered CUDA array is allocated if only the height extent is zero and"] - #[doc = " the cudaArrayLayered flag is set. Each layer is a 1D array. The number of layers is"] - #[doc = " determined by the depth extent."] - #[doc = " - A 2D layered CUDA array is allocated if all three extents are non-zero and"] - #[doc = " the cudaArrayLayered flag is set. Each layer is a 2D array. The number of layers is"] - #[doc = " determined by the depth extent."] - #[doc = " - A cubemap CUDA array is allocated if all three extents are non-zero and the"] - #[doc = " cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six. A cubemap is"] - #[doc = " a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube."] - #[doc = " The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace."] - #[doc = " - A cubemap layered CUDA array is allocated if all three extents are non-zero, and both,"] - #[doc = " cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be"] - #[doc = " a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists"] - #[doc = " of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form"] - #[doc = " the second cubemap, and so on."] - #[doc = ""] - #[doc = ""] - #[doc = " The \\p flags parameter enables different options to be specified that affect"] - #[doc = " the allocation, as follows."] - #[doc = " - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation"] - #[doc = " - ::cudaArrayLayered: Allocates a layered CUDA array, with the depth extent indicating the number of layers"] - #[doc = " - ::cudaArrayCubemap: Allocates a cubemap CUDA array. Width must be equal to height, and depth must be six."] - #[doc = " If the cudaArrayLayered flag is also set, depth must be a multiple of six."] - #[doc = " - ::cudaArraySurfaceLoadStore: Allocates a CUDA array that could be read from or written to using a surface"] - #[doc = " reference."] - #[doc = " - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA"] - #[doc = " array. Texture gather can only be performed on 2D CUDA arrays."] - #[doc = " - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array"] - #[doc = " can later be mapped to physical memory by calling ::cuMemMapArrayAsync. This flag can only be used for"] - #[doc = " creating 2D, 3D or 2D layered sparse CUDA arrays. The physical backing memory must be allocated via ::cuMemCreate."] - #[doc = ""] - #[doc = " The width, height and depth extents must meet certain size requirements as listed in the following table."] - #[doc = " All values are specified in elements."] - #[doc = ""] - #[doc = " Note that 2D CUDA arrays have different size requirements if the ::cudaArrayTextureGather flag is set. In that"] - #[doc = " case, the valid range for (width, height, depth) is ((1,maxTexture2DGather[0]), (1,maxTexture2DGather[1]), 0)."] - #[doc = ""] - #[doc = " \\xmlonly"] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " CUDA array type"] - #[doc = " Valid extents that must always be met {(width range in elements),"] - #[doc = " (height range), (depth range)}"] - #[doc = " Valid extents with cudaArraySurfaceLoadStore set {(width range in"] - #[doc = " elements), (height range), (depth range)}"] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " 1D"] - #[doc = " { (1,maxTexture1D), 0, 0 }"] - #[doc = " { (1,maxSurface1D), 0, 0 }"] - #[doc = " "] - #[doc = " "] - #[doc = " 2D"] - #[doc = " { (1,maxTexture2D[0]), (1,maxTexture2D[1]), 0 }"] - #[doc = " { (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 }"] - #[doc = " "] - #[doc = " "] - #[doc = " 3D"] - #[doc = " { (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) }"] - #[doc = " OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]),"] - #[doc = " (1,maxTexture3DAlt[2]) }"] - #[doc = " { (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " 1D Layered"] - #[doc = " { (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) }"] - #[doc = " { (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " 2D Layered"] - #[doc = " { (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]),"] - #[doc = " (1,maxTexture2DLayered[2]) }"] - #[doc = " { (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]),"] - #[doc = " (1,maxSurface2DLayered[2]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " Cubemap"] - #[doc = " { (1,maxTextureCubemap), (1,maxTextureCubemap), 6 }"] - #[doc = " { (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 }"] - #[doc = " "] - #[doc = " "] - #[doc = " Cubemap Layered"] - #[doc = " { (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]),"] - #[doc = " (1,maxTextureCubemapLayered[1]) }"] - #[doc = " { (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]),"] - #[doc = " (1,maxSurfaceCubemapLayered[1]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = "
"] - #[doc = " \\endxmlonly"] - #[doc = ""] - #[doc = " \\param array - Pointer to allocated array in device memory"] - #[doc = " \\param desc - Requested channel format"] - #[doc = " \\param extent - Requested allocation size (\\p width field in elements)"] - #[doc = " \\param flags - Flags for extensions"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,"] - #[doc = " ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc,"] - #[doc = " ::make_cudaExtent,"] - #[doc = " ::cuArray3DCreate"] pub fn cudaMalloc3DArray( array: *mut cudaArray_t, desc: *const cudaChannelFormatDesc, @@ -11368,144 +8507,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocate a mipmapped array on the device"] - #[doc = ""] - #[doc = " Allocates a CUDA mipmapped array according to the ::cudaChannelFormatDesc structure"] - #[doc = " \\p desc and returns a handle to the new CUDA mipmapped array in \\p *mipmappedArray."] - #[doc = " \\p numLevels specifies the number of mipmap levels to be allocated. This value is"] - #[doc = " clamped to the range [1, 1 + floor(log2(max(width, height, depth)))]."] - #[doc = ""] - #[doc = " The ::cudaChannelFormatDesc is defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaChannelFormatDesc {"] - #[doc = "int x, y, z, w;"] - #[doc = "enum cudaChannelFormatKind f;"] - #[doc = "};"] - #[doc = "\\endcode"] - #[doc = " where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,"] - #[doc = " ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat."] - #[doc = ""] - #[doc = " ::cudaMallocMipmappedArray() can allocate the following:"] - #[doc = ""] - #[doc = " - A 1D mipmapped array is allocated if the height and depth extents are both zero."] - #[doc = " - A 2D mipmapped array is allocated if only the depth extent is zero."] - #[doc = " - A 3D mipmapped array is allocated if all three extents are non-zero."] - #[doc = " - A 1D layered CUDA mipmapped array is allocated if only the height extent is zero and"] - #[doc = " the cudaArrayLayered flag is set. Each layer is a 1D mipmapped array. The number of layers is"] - #[doc = " determined by the depth extent."] - #[doc = " - A 2D layered CUDA mipmapped array is allocated if all three extents are non-zero and"] - #[doc = " the cudaArrayLayered flag is set. Each layer is a 2D mipmapped array. The number of layers is"] - #[doc = " determined by the depth extent."] - #[doc = " - A cubemap CUDA mipmapped array is allocated if all three extents are non-zero and the"] - #[doc = " cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six."] - #[doc = " The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace."] - #[doc = " - A cubemap layered CUDA mipmapped array is allocated if all three extents are non-zero, and both,"] - #[doc = " cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be"] - #[doc = " a multiple of six. A cubemap layered CUDA mipmapped array is a special type of 2D layered CUDA mipmapped"] - #[doc = " array that consists of a collection of cubemap mipmapped arrays. The first six layers represent the"] - #[doc = " first cubemap mipmapped array, the next six layers form the second cubemap mipmapped array, and so on."] - #[doc = ""] - #[doc = ""] - #[doc = " The \\p flags parameter enables different options to be specified that affect"] - #[doc = " the allocation, as follows."] - #[doc = " - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default mipmapped array allocation"] - #[doc = " - ::cudaArrayLayered: Allocates a layered CUDA mipmapped array, with the depth extent indicating the number of layers"] - #[doc = " - ::cudaArrayCubemap: Allocates a cubemap CUDA mipmapped array. Width must be equal to height, and depth must be six."] - #[doc = " If the cudaArrayLayered flag is also set, depth must be a multiple of six."] - #[doc = " - ::cudaArraySurfaceLoadStore: This flag indicates that individual mipmap levels of the CUDA mipmapped array"] - #[doc = " will be read from or written to using a surface reference."] - #[doc = " - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA"] - #[doc = " array. Texture gather can only be performed on 2D CUDA mipmapped arrays, and the gather operations are"] - #[doc = " performed only on the most detailed mipmap level."] - #[doc = " - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array"] - #[doc = " can later be mapped to physical memory by calling ::cuMemMapArrayAsync. This flag can only be used for creating"] - #[doc = " 2D, 3D or 2D layered sparse CUDA mipmapped arrays. The physical backing memory must be allocated via ::cuMemCreate."] - #[doc = ""] - #[doc = " The width, height and depth extents must meet certain size requirements as listed in the following table."] - #[doc = " All values are specified in elements."] - #[doc = ""] - #[doc = " \\xmlonly"] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " CUDA array type"] - #[doc = " Valid extents that must always be met {(width range in elements),"] - #[doc = " (height range), (depth range)}"] - #[doc = " Valid extents with cudaArraySurfaceLoadStore set {(width range in"] - #[doc = " elements), (height range), (depth range)}"] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = " 1D"] - #[doc = " { (1,maxTexture1DMipmap), 0, 0 }"] - #[doc = " { (1,maxSurface1D), 0, 0 }"] - #[doc = " "] - #[doc = " "] - #[doc = " 2D"] - #[doc = " { (1,maxTexture2DMipmap[0]), (1,maxTexture2DMipmap[1]), 0 }"] - #[doc = " { (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 }"] - #[doc = " "] - #[doc = " "] - #[doc = " 3D"] - #[doc = " { (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) }"] - #[doc = " OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]),"] - #[doc = " (1,maxTexture3DAlt[2]) }"] - #[doc = " { (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " 1D Layered"] - #[doc = " { (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) }"] - #[doc = " { (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " 2D Layered"] - #[doc = " { (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]),"] - #[doc = " (1,maxTexture2DLayered[2]) }"] - #[doc = " { (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]),"] - #[doc = " (1,maxSurface2DLayered[2]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " Cubemap"] - #[doc = " { (1,maxTextureCubemap), (1,maxTextureCubemap), 6 }"] - #[doc = " { (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 }"] - #[doc = " "] - #[doc = " "] - #[doc = " Cubemap Layered"] - #[doc = " { (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]),"] - #[doc = " (1,maxTextureCubemapLayered[1]) }"] - #[doc = " { (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]),"] - #[doc = " (1,maxSurfaceCubemapLayered[1]) }"] - #[doc = " "] - #[doc = " "] - #[doc = " "] - #[doc = "
"] - #[doc = " \\endxmlonly"] - #[doc = ""] - #[doc = " \\param mipmappedArray - Pointer to allocated mipmapped array in device memory"] - #[doc = " \\param desc - Requested channel format"] - #[doc = " \\param extent - Requested allocation size (\\p width field in elements)"] - #[doc = " \\param numLevels - Number of mipmap levels to allocate"] - #[doc = " \\param flags - Flags for extensions"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,"] - #[doc = " ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc,"] - #[doc = " ::make_cudaExtent,"] - #[doc = " ::cuMipmappedArrayCreate"] pub fn cudaMallocMipmappedArray( mipmappedArray: *mut cudaMipmappedArray_t, desc: *const cudaChannelFormatDesc, @@ -11515,35 +8516,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets a mipmap level of a CUDA mipmapped array"] - #[doc = ""] - #[doc = " Returns in \\p *levelArray a CUDA array that represents a single mipmap level"] - #[doc = " of the CUDA mipmapped array \\p mipmappedArray."] - #[doc = ""] - #[doc = " If \\p level is greater than the maximum number of levels in this mipmapped array,"] - #[doc = " ::cudaErrorInvalidValue is returned."] - #[doc = ""] - #[doc = " If \\p mipmappedArray is NULL,"] - #[doc = " ::cudaErrorInvalidResourceHandle is returned."] - #[doc = ""] - #[doc = " \\param levelArray - Returned mipmap level CUDA array"] - #[doc = " \\param mipmappedArray - CUDA mipmapped array"] - #[doc = " \\param level - Mipmap level"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,"] - #[doc = " ::cudaFreeArray,"] - #[doc = " \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\","] - #[doc = " ::cudaFreeHost, ::cudaHostAlloc,"] - #[doc = " ::make_cudaExtent,"] - #[doc = " ::cuMipmappedArrayGetLevel"] pub fn cudaGetMipmappedArrayLevel( levelArray: *mut cudaArray_t, mipmappedArray: cudaMipmappedArray_const_t, @@ -11551,328 +8523,24 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between 3D objects"] - #[doc = ""] - #[doc = "\\code"] - #[doc = "struct cudaExtent {"] - #[doc = "size_t width;"] - #[doc = "size_t height;"] - #[doc = "size_t depth;"] - #[doc = "};"] - #[doc = "struct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d);"] - #[doc = ""] - #[doc = "struct cudaPos {"] - #[doc = "size_t x;"] - #[doc = "size_t y;"] - #[doc = "size_t z;"] - #[doc = "};"] - #[doc = "struct cudaPos make_cudaPos(size_t x, size_t y, size_t z);"] - #[doc = ""] - #[doc = "struct cudaMemcpy3DParms {"] - #[doc = "cudaArray_t srcArray;"] - #[doc = "struct cudaPos srcPos;"] - #[doc = "struct cudaPitchedPtr srcPtr;"] - #[doc = "cudaArray_t dstArray;"] - #[doc = "struct cudaPos dstPos;"] - #[doc = "struct cudaPitchedPtr dstPtr;"] - #[doc = "struct cudaExtent extent;"] - #[doc = "enum cudaMemcpyKind kind;"] - #[doc = "};"] - #[doc = "\\endcode"] - #[doc = ""] - #[doc = " ::cudaMemcpy3D() copies data betwen two 3D objects. The source and"] - #[doc = " destination objects may be in either host memory, device memory, or a CUDA"] - #[doc = " array. The source, destination, extent, and kind of copy performed is"] - #[doc = " specified by the ::cudaMemcpy3DParms struct which should be initialized to"] - #[doc = " zero before use:"] - #[doc = "\\code"] - #[doc = "cudaMemcpy3DParms myParms = {0};"] - #[doc = "\\endcode"] - #[doc = ""] - #[doc = " The struct passed to ::cudaMemcpy3D() must specify one of \\p srcArray or"] - #[doc = " \\p srcPtr and one of \\p dstArray or \\p dstPtr. Passing more than one"] - #[doc = " non-zero source or destination will cause ::cudaMemcpy3D() to return an"] - #[doc = " error."] - #[doc = ""] - #[doc = " The \\p srcPos and \\p dstPos fields are optional offsets into the source and"] - #[doc = " destination objects and are defined in units of each object's elements. The"] - #[doc = " element for a host or device pointer is assumed to be unsigned char."] - #[doc = ""] - #[doc = " The \\p extent field defines the dimensions of the transferred area in"] - #[doc = " elements. If a CUDA array is participating in the copy, the extent is"] - #[doc = " defined in terms of that array's elements. If no CUDA array is"] - #[doc = " participating in the copy then the extents are defined in elements of"] - #[doc = " unsigned char."] - #[doc = ""] - #[doc = " The \\p kind field defines the direction of the copy. It must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = " For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost"] - #[doc = " passed as kind and cudaArray type passed as source or destination, if the kind"] - #[doc = " implies cudaArray type to be present on the host, ::cudaMemcpy3D() will"] - #[doc = " disregard that implication and silently correct the kind based on the fact that"] - #[doc = " cudaArray type can only be present on the device."] - #[doc = ""] - #[doc = " If the source and destination are both arrays, ::cudaMemcpy3D() will return"] - #[doc = " an error if they do not have the same element size."] - #[doc = ""] - #[doc = " The source and destination object may not overlap. If overlapping source"] - #[doc = " and destination objects are specified, undefined behavior will result."] - #[doc = ""] - #[doc = " The source object must entirely contain the region defined by \\p srcPos"] - #[doc = " and \\p extent. The destination object must entirely contain the region"] - #[doc = " defined by \\p dstPos and \\p extent."] - #[doc = ""] - #[doc = " ::cudaMemcpy3D() returns an error if the pitch of \\p srcPtr or \\p dstPtr"] - #[doc = " exceeds the maximum allowed. The pitch of a ::cudaPitchedPtr allocated"] - #[doc = " with ::cudaMalloc3D() will always be valid."] - #[doc = ""] - #[doc = " \\param p - 3D memory copy parameters"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3DAsync,"] - #[doc = " ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::make_cudaExtent, ::make_cudaPos,"] - #[doc = " ::cuMemcpy3D"] pub fn cudaMemcpy3D(p: *const cudaMemcpy3DParms) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies memory between devices"] - #[doc = ""] - #[doc = " Perform a 3D memory copy according to the parameters specified in"] - #[doc = " \\p p. See the definition of the ::cudaMemcpy3DPeerParms structure"] - #[doc = " for documentation of its parameters."] - #[doc = ""] - #[doc = " Note that this function is synchronous with respect to the host only if"] - #[doc = " the source or destination of the transfer is host memory. Note also"] - #[doc = " that this copy is serialized with respect to all pending and future"] - #[doc = " asynchronous work in to the current device, the copy's source device,"] - #[doc = " and the copy's destination device (use ::cudaMemcpy3DPeerAsync to avoid"] - #[doc = " this synchronization)."] - #[doc = ""] - #[doc = " \\param p - Parameters for the memory copy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,"] - #[doc = " ::cudaMemcpy3DPeerAsync,"] - #[doc = " ::cuMemcpy3DPeer"] pub fn cudaMemcpy3DPeer(p: *const cudaMemcpy3DPeerParms) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between 3D objects"] - #[doc = ""] - #[doc = "\\code"] - #[doc = "struct cudaExtent {"] - #[doc = "size_t width;"] - #[doc = "size_t height;"] - #[doc = "size_t depth;"] - #[doc = "};"] - #[doc = "struct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d);"] - #[doc = ""] - #[doc = "struct cudaPos {"] - #[doc = "size_t x;"] - #[doc = "size_t y;"] - #[doc = "size_t z;"] - #[doc = "};"] - #[doc = "struct cudaPos make_cudaPos(size_t x, size_t y, size_t z);"] - #[doc = ""] - #[doc = "struct cudaMemcpy3DParms {"] - #[doc = "cudaArray_t srcArray;"] - #[doc = "struct cudaPos srcPos;"] - #[doc = "struct cudaPitchedPtr srcPtr;"] - #[doc = "cudaArray_t dstArray;"] - #[doc = "struct cudaPos dstPos;"] - #[doc = "struct cudaPitchedPtr dstPtr;"] - #[doc = "struct cudaExtent extent;"] - #[doc = "enum cudaMemcpyKind kind;"] - #[doc = "};"] - #[doc = "\\endcode"] - #[doc = ""] - #[doc = " ::cudaMemcpy3DAsync() copies data betwen two 3D objects. The source and"] - #[doc = " destination objects may be in either host memory, device memory, or a CUDA"] - #[doc = " array. The source, destination, extent, and kind of copy performed is"] - #[doc = " specified by the ::cudaMemcpy3DParms struct which should be initialized to"] - #[doc = " zero before use:"] - #[doc = "\\code"] - #[doc = "cudaMemcpy3DParms myParms = {0};"] - #[doc = "\\endcode"] - #[doc = ""] - #[doc = " The struct passed to ::cudaMemcpy3DAsync() must specify one of \\p srcArray"] - #[doc = " or \\p srcPtr and one of \\p dstArray or \\p dstPtr. Passing more than one"] - #[doc = " non-zero source or destination will cause ::cudaMemcpy3DAsync() to return an"] - #[doc = " error."] - #[doc = ""] - #[doc = " The \\p srcPos and \\p dstPos fields are optional offsets into the source and"] - #[doc = " destination objects and are defined in units of each object's elements. The"] - #[doc = " element for a host or device pointer is assumed to be unsigned char."] - #[doc = " For CUDA arrays, positions must be in the range [0, 2048) for any"] - #[doc = " dimension."] - #[doc = ""] - #[doc = " The \\p extent field defines the dimensions of the transferred area in"] - #[doc = " elements. If a CUDA array is participating in the copy, the extent is"] - #[doc = " defined in terms of that array's elements. If no CUDA array is"] - #[doc = " participating in the copy then the extents are defined in elements of"] - #[doc = " unsigned char."] - #[doc = ""] - #[doc = " The \\p kind field defines the direction of the copy. It must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = " For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost"] - #[doc = " passed as kind and cudaArray type passed as source or destination, if the kind"] - #[doc = " implies cudaArray type to be present on the host, ::cudaMemcpy3DAsync() will"] - #[doc = " disregard that implication and silently correct the kind based on the fact that"] - #[doc = " cudaArray type can only be present on the device."] - #[doc = ""] - #[doc = " If the source and destination are both arrays, ::cudaMemcpy3DAsync() will"] - #[doc = " return an error if they do not have the same element size."] - #[doc = ""] - #[doc = " The source and destination object may not overlap. If overlapping source"] - #[doc = " and destination objects are specified, undefined behavior will result."] - #[doc = ""] - #[doc = " The source object must lie entirely within the region defined by \\p srcPos"] - #[doc = " and \\p extent. The destination object must lie entirely within the region"] - #[doc = " defined by \\p dstPos and \\p extent."] - #[doc = ""] - #[doc = " ::cudaMemcpy3DAsync() returns an error if the pitch of \\p srcPtr or"] - #[doc = " \\p dstPtr exceeds the maximum allowed. The pitch of a"] - #[doc = " ::cudaPitchedPtr allocated with ::cudaMalloc3D() will always be valid."] - #[doc = ""] - #[doc = " ::cudaMemcpy3DAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument. If"] - #[doc = " \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream"] - #[doc = " is non-zero, the copy may overlap with operations in other streams."] - #[doc = ""] - #[doc = " The device version of this function only handles device to device copies and"] - #[doc = " cannot be given local or shared pointers."] - #[doc = ""] - #[doc = " \\param p - 3D memory copy parameters"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3D,"] - #[doc = " ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, :::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::make_cudaExtent, ::make_cudaPos,"] - #[doc = " ::cuMemcpy3DAsync"] pub fn cudaMemcpy3DAsync(p: *const cudaMemcpy3DParms, stream: cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies memory between devices asynchronously."] - #[doc = ""] - #[doc = " Perform a 3D memory copy according to the parameters specified in"] - #[doc = " \\p p. See the definition of the ::cudaMemcpy3DPeerParms structure"] - #[doc = " for documentation of its parameters."] - #[doc = ""] - #[doc = " \\param p - Parameters for the memory copy"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,"] - #[doc = " ::cudaMemcpy3DPeerAsync,"] - #[doc = " ::cuMemcpy3DPeerAsync"] pub fn cudaMemcpy3DPeerAsync( p: *const cudaMemcpy3DPeerParms, stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets free and total device memory"] - #[doc = ""] - #[doc = " Returns in \\p *free and \\p *total respectively, the free and total amount of"] - #[doc = " memory available for allocation by the device in bytes."] - #[doc = ""] - #[doc = " \\param free - Returned free memory in bytes"] - #[doc = " \\param total - Returned total memory in bytes"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorLaunchFailure"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cuMemGetInfo"] pub fn cudaMemGetInfo(free: *mut usize, total: *mut usize) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets info about the specified cudaArray"] - #[doc = ""] - #[doc = " Returns in \\p *desc, \\p *extent and \\p *flags respectively, the type, shape"] - #[doc = " and flags of \\p array."] - #[doc = ""] - #[doc = " Any of \\p *desc, \\p *extent and \\p *flags may be specified as NULL."] - #[doc = ""] - #[doc = " \\param desc - Returned array type"] - #[doc = " \\param extent - Returned array shape. 2D arrays will have depth of zero"] - #[doc = " \\param flags - Returned array flags"] - #[doc = " \\param array - The ::cudaArray to get info for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cuArrayGetDescriptor,"] - #[doc = " ::cuArray3DGetDescriptor"] pub fn cudaArrayGetInfo( desc: *mut cudaChannelFormatDesc, extent: *mut cudaExtent, @@ -11881,37 +8549,26 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets a CUDA array plane from a CUDA array"] - #[doc = ""] - #[doc = " Returns in \\p pPlaneArray a CUDA array that represents a single format plane"] - #[doc = " of the CUDA array \\p hArray."] - #[doc = ""] - #[doc = " If \\p planeIdx is greater than the maximum number of planes in this array or if the array does"] - #[doc = " not have a multi-planar format e.g: ::cudaChannelFormatKindNV12, then ::cudaErrorInvalidValue is returned."] - #[doc = ""] - #[doc = " Note that if the \\p hArray has format ::cudaChannelFormatKindNV12, then passing in 0 for \\p planeIdx returns"] - #[doc = " a CUDA array of the same size as \\p hArray but with one 8-bit channel and ::cudaChannelFormatKindUnsigned as its format kind."] - #[doc = " If 1 is passed for \\p planeIdx, then the returned CUDA array has half the height and width"] - #[doc = " of \\p hArray with two 8-bit channels and ::cudaChannelFormatKindUnsigned as its format kind."] - #[doc = ""] - #[doc = " \\param pPlaneArray - Returned CUDA array referenced by the \\p planeIdx"] - #[doc = " \\param hArray - CUDA array"] - #[doc = " \\param planeIdx - Plane index"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cuArrayGetPlane"] pub fn cudaArrayGetPlane( pPlaneArray: *mut cudaArray_t, hArray: cudaArray_t, planeIdx: ::libc::c_uint, ) -> cudaError_t; } +extern "C" { + pub fn cudaArrayGetMemoryRequirements( + memoryRequirements: *mut cudaArrayMemoryRequirements, + array: cudaArray_t, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMipmappedArrayGetMemoryRequirements( + memoryRequirements: *mut cudaArrayMemoryRequirements, + mipmap: cudaMipmappedArray_t, + device: ::libc::c_int, + ) -> cudaError_t; +} extern "C" { pub fn cudaArrayGetSparseProperties( sparseProperties: *mut cudaArraySparseProperties, @@ -11925,46 +8582,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p src to the"] - #[doc = " memory area pointed to by \\p dst, where \\p kind specifies the direction"] - #[doc = " of the copy, and must be one of ::cudaMemcpyHostToHost,"] - #[doc = " ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing. Calling"] - #[doc = " ::cudaMemcpy() with dst and src pointers that do not match the direction of"] - #[doc = " the copy results in an undefined behavior."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\note_sync"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyDtoH,"] - #[doc = " ::cuMemcpyHtoD,"] - #[doc = " ::cuMemcpyDtoD,"] - #[doc = " ::cuMemcpy"] pub fn cudaMemcpy( dst: *mut ::libc::c_void, src: *const ::libc::c_void, @@ -11973,37 +8590,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies memory between two devices"] - #[doc = ""] - #[doc = " Copies memory from one device to memory on another device. \\p dst is the"] - #[doc = " base device pointer of the destination memory and \\p dstDevice is the"] - #[doc = " destination device. \\p src is the base device pointer of the source memory"] - #[doc = " and \\p srcDevice is the source device. \\p count specifies the number of bytes"] - #[doc = " to copy."] - #[doc = ""] - #[doc = " Note that this function is asynchronous with respect to the host, but"] - #[doc = " serialized with respect all pending and future asynchronous work in to the"] - #[doc = " current device, \\p srcDevice, and \\p dstDevice (use ::cudaMemcpyPeerAsync"] - #[doc = " to avoid this synchronization)."] - #[doc = ""] - #[doc = " \\param dst - Destination device pointer"] - #[doc = " \\param dstDevice - Destination device"] - #[doc = " \\param src - Source device pointer"] - #[doc = " \\param srcDevice - Source device"] - #[doc = " \\param count - Size of memory copy in bytes"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,"] - #[doc = " ::cudaMemcpy3DPeerAsync,"] - #[doc = " ::cuMemcpyPeer"] pub fn cudaMemcpyPeer( dst: *mut ::libc::c_void, dstDevice: ::libc::c_int, @@ -12013,51 +8599,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies a matrix (\\p height rows of \\p width bytes each) from the memory"] - #[doc = " area pointed to by \\p src to the memory area pointed to by \\p dst, where"] - #[doc = " \\p kind specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing. \\p dpitch and"] - #[doc = " \\p spitch are the widths in memory in bytes of the 2D arrays pointed to by"] - #[doc = " \\p dst and \\p src, including any padding added to the end of each row. The"] - #[doc = " memory areas may not overlap. \\p width must not exceed either \\p dpitch or"] - #[doc = " \\p spitch. Calling ::cudaMemcpy2D() with \\p dst and \\p src pointers that do"] - #[doc = " not match the direction of the copy results in an undefined behavior."] - #[doc = " ::cudaMemcpy2D() returns an error if \\p dpitch or \\p spitch exceeds"] - #[doc = " the maximum allowed."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param dpitch - Pitch of destination memory"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param spitch - Pitch of source memory"] - #[doc = " \\param width - Width of matrix transfer (columns in bytes)"] - #[doc = " \\param height - Height of matrix transfer (rows)"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy2D,"] - #[doc = " ::cuMemcpy2DUnaligned"] pub fn cudaMemcpy2D( dst: *mut ::libc::c_void, dpitch: usize, @@ -12069,52 +8610,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies a matrix (\\p height rows of \\p width bytes each) from the memory"] - #[doc = " area pointed to by \\p src to the CUDA array \\p dst starting at"] - #[doc = " \\p hOffset rows and \\p wOffset bytes from the upper left corner,"] - #[doc = " where \\p kind specifies the direction of the copy, and must be one"] - #[doc = " of ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = " \\p spitch is the width in memory in bytes of the 2D array pointed to by"] - #[doc = " \\p src, including any padding added to the end of each row. \\p wOffset +"] - #[doc = " \\p width must not exceed the width of the CUDA array \\p dst. \\p width must"] - #[doc = " not exceed \\p spitch. ::cudaMemcpy2DToArray() returns an error if \\p spitch"] - #[doc = " exceeds the maximum allowed."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param wOffset - Destination starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Destination starting Y offset (rows)"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param spitch - Pitch of source memory"] - #[doc = " \\param width - Width of matrix transfer (columns in bytes)"] - #[doc = " \\param height - Height of matrix transfer (rows)"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy2D,"] - #[doc = " ::cuMemcpy2DUnaligned"] pub fn cudaMemcpy2DToArray( dst: cudaArray_t, wOffset: usize, @@ -12127,52 +8622,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA"] - #[doc = " array \\p src starting at \\p hOffset rows and \\p wOffset bytes from the"] - #[doc = " upper left corner to the memory area pointed to by \\p dst, where"] - #[doc = " \\p kind specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing. \\p dpitch is the"] - #[doc = " width in memory in bytes of the 2D array pointed to by \\p dst, including any"] - #[doc = " padding added to the end of each row. \\p wOffset + \\p width must not exceed"] - #[doc = " the width of the CUDA array \\p src. \\p width must not exceed \\p dpitch."] - #[doc = " ::cudaMemcpy2DFromArray() returns an error if \\p dpitch exceeds the maximum"] - #[doc = " allowed."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param dpitch - Pitch of destination memory"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param wOffset - Source starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Source starting Y offset (rows)"] - #[doc = " \\param width - Width of matrix transfer (columns in bytes)"] - #[doc = " \\param height - Height of matrix transfer (rows)"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy2D,"] - #[doc = " ::cuMemcpy2DUnaligned"] pub fn cudaMemcpy2DFromArray( dst: *mut ::libc::c_void, dpitch: usize, @@ -12185,49 +8634,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA"] - #[doc = " array \\p src starting at \\p hOffsetSrc rows and \\p wOffsetSrc bytes from the"] - #[doc = " upper left corner to the CUDA array \\p dst starting at \\p hOffsetDst rows"] - #[doc = " and \\p wOffsetDst bytes from the upper left corner, where \\p kind"] - #[doc = " specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = " \\p wOffsetDst + \\p width must not exceed the width of the CUDA array \\p dst."] - #[doc = " \\p wOffsetSrc + \\p width must not exceed the width of the CUDA array \\p src."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param wOffsetDst - Destination starting X offset (columns in bytes)"] - #[doc = " \\param hOffsetDst - Destination starting Y offset (rows)"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param wOffsetSrc - Source starting X offset (columns in bytes)"] - #[doc = " \\param hOffsetSrc - Source starting Y offset (rows)"] - #[doc = " \\param width - Width of matrix transfer (columns in bytes)"] - #[doc = " \\param height - Height of matrix transfer (rows)"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy2D,"] - #[doc = " ::cuMemcpy2DUnaligned"] pub fn cudaMemcpy2DArrayToArray( dst: cudaArray_t, wOffsetDst: usize, @@ -12241,45 +8647,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data to the given symbol on the device"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p src"] - #[doc = " to the memory area pointed to by \\p offset bytes from the start of symbol"] - #[doc = " \\p symbol. The memory areas may not overlap. \\p symbol is a variable that"] - #[doc = " resides in global or constant memory space. \\p kind can be either"] - #[doc = " ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault."] - #[doc = " Passing ::cudaMemcpyDefault is recommended, in which case the type of"] - #[doc = " transfer is inferred from the pointer values. However, ::cudaMemcpyDefault"] - #[doc = " is only allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " \\param symbol - Device symbol address"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param offset - Offset from start of symbol in bytes"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection,"] - #[doc = " ::cudaErrorNoKernelImageForDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_string_api_deprecation"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy,"] - #[doc = " ::cuMemcpyHtoD,"] - #[doc = " ::cuMemcpyDtoD"] pub fn cudaMemcpyToSymbol( symbol: *const ::libc::c_void, src: *const ::libc::c_void, @@ -12289,45 +8656,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data from the given symbol on the device"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p offset bytes"] - #[doc = " from the start of symbol \\p symbol to the memory area pointed to by \\p dst."] - #[doc = " The memory areas may not overlap. \\p symbol is a variable that"] - #[doc = " resides in global or constant memory space. \\p kind can be either"] - #[doc = " ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault."] - #[doc = " Passing ::cudaMemcpyDefault is recommended, in which case the type of"] - #[doc = " transfer is inferred from the pointer values. However, ::cudaMemcpyDefault"] - #[doc = " is only allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param symbol - Device symbol address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param offset - Offset from start of symbol in bytes"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection,"] - #[doc = " ::cudaErrorNoKernelImageForDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_string_api_deprecation"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy,"] - #[doc = " ::cuMemcpyDtoH,"] - #[doc = " ::cuMemcpyDtoD"] pub fn cudaMemcpyFromSymbol( dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, @@ -12337,58 +8665,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p src to the"] - #[doc = " memory area pointed to by \\p dst, where \\p kind specifies the"] - #[doc = " direction of the copy, and must be one of ::cudaMemcpyHostToHost,"] - #[doc = " ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " The memory areas may not overlap. Calling ::cudaMemcpyAsync() with \\p dst and"] - #[doc = " \\p src pointers that do not match the direction of the copy results in an"] - #[doc = " undefined behavior."] - #[doc = ""] - #[doc = " ::cudaMemcpyAsync() is asynchronous with respect to the host, so the call"] - #[doc = " may return before the copy is complete. The copy can optionally be"] - #[doc = " associated to a stream by passing a non-zero \\p stream argument. If \\p kind"] - #[doc = " is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and the \\p stream is"] - #[doc = " non-zero, the copy may overlap with operations in other streams."] - #[doc = ""] - #[doc = " The device version of this function only handles device to device copies and"] - #[doc = " cannot be given local or shared pointers."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyAsync,"] - #[doc = " ::cuMemcpyDtoHAsync,"] - #[doc = " ::cuMemcpyHtoDAsync,"] - #[doc = " ::cuMemcpyDtoDAsync"] pub fn cudaMemcpyAsync( dst: *mut ::libc::c_void, src: *const ::libc::c_void, @@ -12398,37 +8674,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies memory between two devices asynchronously."] - #[doc = ""] - #[doc = " Copies memory from one device to memory on another device. \\p dst is the"] - #[doc = " base device pointer of the destination memory and \\p dstDevice is the"] - #[doc = " destination device. \\p src is the base device pointer of the source memory"] - #[doc = " and \\p srcDevice is the source device. \\p count specifies the number of bytes"] - #[doc = " to copy."] - #[doc = ""] - #[doc = " Note that this function is asynchronous with respect to the host and all work"] - #[doc = " on other devices."] - #[doc = ""] - #[doc = " \\param dst - Destination device pointer"] - #[doc = " \\param dstDevice - Destination device"] - #[doc = " \\param src - Source device pointer"] - #[doc = " \\param srcDevice - Source device"] - #[doc = " \\param count - Size of memory copy in bytes"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,"] - #[doc = " ::cudaMemcpy3DPeerAsync,"] - #[doc = " ::cuMemcpyPeerAsync"] pub fn cudaMemcpyPeerAsync( dst: *mut ::libc::c_void, dstDevice: ::libc::c_int, @@ -12439,65 +8684,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies a matrix (\\p height rows of \\p width bytes each) from the memory"] - #[doc = " area pointed to by \\p src to the memory area pointed to by \\p dst, where"] - #[doc = " \\p kind specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = " \\p dpitch and \\p spitch are the widths in memory in bytes of the 2D arrays"] - #[doc = " pointed to by \\p dst and \\p src, including any padding added to the end of"] - #[doc = " each row. The memory areas may not overlap. \\p width must not exceed either"] - #[doc = " \\p dpitch or \\p spitch."] - #[doc = ""] - #[doc = " Calling ::cudaMemcpy2DAsync() with \\p dst and \\p src pointers that do not"] - #[doc = " match the direction of the copy results in an undefined behavior."] - #[doc = " ::cudaMemcpy2DAsync() returns an error if \\p dpitch or \\p spitch is greater"] - #[doc = " than the maximum allowed."] - #[doc = ""] - #[doc = " ::cudaMemcpy2DAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument. If"] - #[doc = " \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and"] - #[doc = " \\p stream is non-zero, the copy may overlap with operations in other"] - #[doc = " streams."] - #[doc = ""] - #[doc = " The device version of this function only handles device to device copies and"] - #[doc = " cannot be given local or shared pointers."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param dpitch - Pitch of destination memory"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param spitch - Pitch of source memory"] - #[doc = " \\param width - Width of matrix transfer (columns in bytes)"] - #[doc = " \\param height - Height of matrix transfer (rows)"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy2DAsync"] pub fn cudaMemcpy2DAsync( dst: *mut ::libc::c_void, dpitch: usize, @@ -12510,60 +8696,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies a matrix (\\p height rows of \\p width bytes each) from the memory"] - #[doc = " area pointed to by \\p src to the CUDA array \\p dst starting at \\p hOffset"] - #[doc = " rows and \\p wOffset bytes from the upper left corner, where \\p kind specifies"] - #[doc = " the direction of the copy, and must be one of ::cudaMemcpyHostToHost,"] - #[doc = " ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = " \\p spitch is the width in memory in bytes of the 2D array pointed to by"] - #[doc = " \\p src, including any padding added to the end of each row. \\p wOffset +"] - #[doc = " \\p width must not exceed the width of the CUDA array \\p dst. \\p width must"] - #[doc = " not exceed \\p spitch. ::cudaMemcpy2DToArrayAsync() returns an error if"] - #[doc = " \\p spitch exceeds the maximum allowed."] - #[doc = ""] - #[doc = " ::cudaMemcpy2DToArrayAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument. If"] - #[doc = " \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and"] - #[doc = " \\p stream is non-zero, the copy may overlap with operations in other"] - #[doc = " streams."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param wOffset - Destination starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Destination starting Y offset (rows)"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param spitch - Pitch of source memory"] - #[doc = " \\param width - Width of matrix transfer (columns in bytes)"] - #[doc = " \\param height - Height of matrix transfer (rows)"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = ""] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy2DAsync"] pub fn cudaMemcpy2DToArrayAsync( dst: cudaArray_t, wOffset: usize, @@ -12577,59 +8709,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA"] - #[doc = " array \\p src starting at \\p hOffset rows and \\p wOffset bytes from the"] - #[doc = " upper left corner to the memory area pointed to by \\p dst,"] - #[doc = " where \\p kind specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = " \\p dpitch is the width in memory in bytes of the 2D"] - #[doc = " array pointed to by \\p dst, including any padding added to the end of each"] - #[doc = " row. \\p wOffset + \\p width must not exceed the width of the CUDA array"] - #[doc = " \\p src. \\p width must not exceed \\p dpitch. ::cudaMemcpy2DFromArrayAsync()"] - #[doc = " returns an error if \\p dpitch exceeds the maximum allowed."] - #[doc = ""] - #[doc = " ::cudaMemcpy2DFromArrayAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally be"] - #[doc = " associated to a stream by passing a non-zero \\p stream argument. If \\p kind"] - #[doc = " is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream is"] - #[doc = " non-zero, the copy may overlap with operations in other streams."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param dpitch - Pitch of destination memory"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param wOffset - Source starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Source starting Y offset (rows)"] - #[doc = " \\param width - Width of matrix transfer (columns in bytes)"] - #[doc = " \\param height - Height of matrix transfer (rows)"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidPitchValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_memcpy"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = ""] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpy2DAsync"] pub fn cudaMemcpy2DFromArrayAsync( dst: *mut ::libc::c_void, dpitch: usize, @@ -12643,53 +8722,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data to the given symbol on the device"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p src"] - #[doc = " to the memory area pointed to by \\p offset bytes from the start of symbol"] - #[doc = " \\p symbol. The memory areas may not overlap. \\p symbol is a variable that"] - #[doc = " resides in global or constant memory space. \\p kind can be either"] - #[doc = " ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault."] - #[doc = " Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer"] - #[doc = " is inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " ::cudaMemcpyToSymbolAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument. If"] - #[doc = " \\p kind is ::cudaMemcpyHostToDevice and \\p stream is non-zero, the copy"] - #[doc = " may overlap with operations in other streams."] - #[doc = ""] - #[doc = " \\param symbol - Device symbol address"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param offset - Offset from start of symbol in bytes"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection,"] - #[doc = " ::cudaErrorNoKernelImageForDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_string_api_deprecation"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyAsync,"] - #[doc = " ::cuMemcpyHtoDAsync,"] - #[doc = " ::cuMemcpyDtoDAsync"] pub fn cudaMemcpyToSymbolAsync( symbol: *const ::libc::c_void, src: *const ::libc::c_void, @@ -12700,53 +8732,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data from the given symbol on the device"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p offset bytes"] - #[doc = " from the start of symbol \\p symbol to the memory area pointed to by \\p dst."] - #[doc = " The memory areas may not overlap. \\p symbol is a variable that resides in"] - #[doc = " global or constant memory space. \\p kind can be either"] - #[doc = " ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault."] - #[doc = " Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer"] - #[doc = " is inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " ::cudaMemcpyFromSymbolAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally be"] - #[doc = " associated to a stream by passing a non-zero \\p stream argument. If \\p kind"] - #[doc = " is ::cudaMemcpyDeviceToHost and \\p stream is non-zero, the copy may overlap"] - #[doc = " with operations in other streams."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param symbol - Device symbol address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param offset - Offset from start of symbol in bytes"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection,"] - #[doc = " ::cudaErrorNoKernelImageForDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_string_api_deprecation"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync,"] - #[doc = " ::cuMemcpyAsync,"] - #[doc = " ::cuMemcpyDtoHAsync,"] - #[doc = " ::cuMemcpyDtoDAsync"] pub fn cudaMemcpyFromSymbolAsync( dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, @@ -12757,30 +8742,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Initializes or sets device memory to a value"] - #[doc = ""] - #[doc = " Fills the first \\p count bytes of the memory area pointed to by \\p devPtr"] - #[doc = " with the constant byte value \\p value."] - #[doc = ""] - #[doc = " Note that this function is asynchronous with respect to the host unless"] - #[doc = " \\p devPtr refers to pinned host memory."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to device memory"] - #[doc = " \\param value - Value to set for each byte of specified memory"] - #[doc = " \\param count - Size in bytes to set"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_memset"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cuMemsetD8,"] - #[doc = " ::cuMemsetD16,"] - #[doc = " ::cuMemsetD32"] pub fn cudaMemset( devPtr: *mut ::libc::c_void, value: ::libc::c_int, @@ -12788,36 +8749,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Initializes or sets device memory to a value"] - #[doc = ""] - #[doc = " Sets to the specified value \\p value a matrix (\\p height rows of \\p width"] - #[doc = " bytes each) pointed to by \\p dstPtr. \\p pitch is the width in bytes of the"] - #[doc = " 2D array pointed to by \\p dstPtr, including any padding added to the end"] - #[doc = " of each row. This function performs fastest when the pitch is one that has"] - #[doc = " been passed back by ::cudaMallocPitch()."] - #[doc = ""] - #[doc = " Note that this function is asynchronous with respect to the host unless"] - #[doc = " \\p devPtr refers to pinned host memory."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to 2D device memory"] - #[doc = " \\param pitch - Pitch in bytes of 2D device memory(Unused if \\p height is 1)"] - #[doc = " \\param value - Value to set for each byte of specified memory"] - #[doc = " \\param width - Width of matrix set (columns in bytes)"] - #[doc = " \\param height - Height of matrix set (rows)"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_memset"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemset, ::cudaMemset3D, ::cudaMemsetAsync,"] - #[doc = " ::cudaMemset2DAsync, ::cudaMemset3DAsync,"] - #[doc = " ::cuMemsetD2D8,"] - #[doc = " ::cuMemsetD2D16,"] - #[doc = " ::cuMemsetD2D32"] pub fn cudaMemset2D( devPtr: *mut ::libc::c_void, pitch: usize, @@ -12827,48 +8758,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Initializes or sets device memory to a value"] - #[doc = ""] - #[doc = " Initializes each element of a 3D array to the specified value \\p value."] - #[doc = " The object to initialize is defined by \\p pitchedDevPtr. The \\p pitch field"] - #[doc = " of \\p pitchedDevPtr is the width in memory in bytes of the 3D array pointed"] - #[doc = " to by \\p pitchedDevPtr, including any padding added to the end of each row."] - #[doc = " The \\p xsize field specifies the logical width of each row in bytes, while"] - #[doc = " the \\p ysize field specifies the height of each 2D slice in rows."] - #[doc = " The \\p pitch field of \\p pitchedDevPtr is ignored when \\p height and \\p depth"] - #[doc = " are both equal to 1."] - #[doc = ""] - #[doc = " The extents of the initialized region are specified as a \\p width in bytes,"] - #[doc = " a \\p height in rows, and a \\p depth in slices."] - #[doc = ""] - #[doc = " Extents with \\p width greater than or equal to the \\p xsize of"] - #[doc = " \\p pitchedDevPtr may perform significantly faster than extents narrower"] - #[doc = " than the \\p xsize. Secondarily, extents with \\p height equal to the"] - #[doc = " \\p ysize of \\p pitchedDevPtr will perform faster than when the \\p height is"] - #[doc = " shorter than the \\p ysize."] - #[doc = ""] - #[doc = " This function performs fastest when the \\p pitchedDevPtr has been allocated"] - #[doc = " by ::cudaMalloc3D()."] - #[doc = ""] - #[doc = " Note that this function is asynchronous with respect to the host unless"] - #[doc = " \\p pitchedDevPtr refers to pinned host memory."] - #[doc = ""] - #[doc = " \\param pitchedDevPtr - Pointer to pitched device memory"] - #[doc = " \\param value - Value to set for each byte of specified memory"] - #[doc = " \\param extent - Size parameters for where to set device memory (\\p width field in bytes)"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_memset"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemset, ::cudaMemset2D,"] - #[doc = " ::cudaMemsetAsync, ::cudaMemset2DAsync, ::cudaMemset3DAsync,"] - #[doc = " ::cudaMalloc3D, ::make_cudaPitchedPtr,"] - #[doc = " ::make_cudaExtent"] pub fn cudaMemset3D( pitchedDevPtr: cudaPitchedPtr, value: ::libc::c_int, @@ -12876,38 +8765,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Initializes or sets device memory to a value"] - #[doc = ""] - #[doc = " Fills the first \\p count bytes of the memory area pointed to by \\p devPtr"] - #[doc = " with the constant byte value \\p value."] - #[doc = ""] - #[doc = " ::cudaMemsetAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the memset is complete. The operation can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument."] - #[doc = " If \\p stream is non-zero, the operation may overlap with operations in other streams."] - #[doc = ""] - #[doc = " The device version of this function only handles device to device copies and"] - #[doc = " cannot be given local or shared pointers."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to device memory"] - #[doc = " \\param value - Value to set for each byte of specified memory"] - #[doc = " \\param count - Size in bytes to set"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_memset"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,"] - #[doc = " ::cudaMemset2DAsync, ::cudaMemset3DAsync,"] - #[doc = " ::cuMemsetD8Async,"] - #[doc = " ::cuMemsetD16Async,"] - #[doc = " ::cuMemsetD32Async"] pub fn cudaMemsetAsync( devPtr: *mut ::libc::c_void, value: ::libc::c_int, @@ -12916,43 +8773,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Initializes or sets device memory to a value"] - #[doc = ""] - #[doc = " Sets to the specified value \\p value a matrix (\\p height rows of \\p width"] - #[doc = " bytes each) pointed to by \\p dstPtr. \\p pitch is the width in bytes of the"] - #[doc = " 2D array pointed to by \\p dstPtr, including any padding added to the end"] - #[doc = " of each row. This function performs fastest when the pitch is one that has"] - #[doc = " been passed back by ::cudaMallocPitch()."] - #[doc = ""] - #[doc = " ::cudaMemset2DAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the memset is complete. The operation can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument."] - #[doc = " If \\p stream is non-zero, the operation may overlap with operations in other streams."] - #[doc = ""] - #[doc = " The device version of this function only handles device to device copies and"] - #[doc = " cannot be given local or shared pointers."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to 2D device memory"] - #[doc = " \\param pitch - Pitch in bytes of 2D device memory(Unused if \\p height is 1)"] - #[doc = " \\param value - Value to set for each byte of specified memory"] - #[doc = " \\param width - Width of matrix set (columns in bytes)"] - #[doc = " \\param height - Height of matrix set (rows)"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_memset"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,"] - #[doc = " ::cudaMemsetAsync, ::cudaMemset3DAsync,"] - #[doc = " ::cuMemsetD2D8Async,"] - #[doc = " ::cuMemsetD2D16Async,"] - #[doc = " ::cuMemsetD2D32Async"] pub fn cudaMemset2DAsync( devPtr: *mut ::libc::c_void, pitch: usize, @@ -12963,55 +8783,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Initializes or sets device memory to a value"] - #[doc = ""] - #[doc = " Initializes each element of a 3D array to the specified value \\p value."] - #[doc = " The object to initialize is defined by \\p pitchedDevPtr. The \\p pitch field"] - #[doc = " of \\p pitchedDevPtr is the width in memory in bytes of the 3D array pointed"] - #[doc = " to by \\p pitchedDevPtr, including any padding added to the end of each row."] - #[doc = " The \\p xsize field specifies the logical width of each row in bytes, while"] - #[doc = " the \\p ysize field specifies the height of each 2D slice in rows."] - #[doc = " The \\p pitch field of \\p pitchedDevPtr is ignored when \\p height and \\p depth"] - #[doc = " are both equal to 1."] - #[doc = ""] - #[doc = " The extents of the initialized region are specified as a \\p width in bytes,"] - #[doc = " a \\p height in rows, and a \\p depth in slices."] - #[doc = ""] - #[doc = " Extents with \\p width greater than or equal to the \\p xsize of"] - #[doc = " \\p pitchedDevPtr may perform significantly faster than extents narrower"] - #[doc = " than the \\p xsize. Secondarily, extents with \\p height equal to the"] - #[doc = " \\p ysize of \\p pitchedDevPtr will perform faster than when the \\p height is"] - #[doc = " shorter than the \\p ysize."] - #[doc = ""] - #[doc = " This function performs fastest when the \\p pitchedDevPtr has been allocated"] - #[doc = " by ::cudaMalloc3D()."] - #[doc = ""] - #[doc = " ::cudaMemset3DAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the memset is complete. The operation can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument."] - #[doc = " If \\p stream is non-zero, the operation may overlap with operations in other streams."] - #[doc = ""] - #[doc = " The device version of this function only handles device to device copies and"] - #[doc = " cannot be given local or shared pointers."] - #[doc = ""] - #[doc = " \\param pitchedDevPtr - Pointer to pitched device memory"] - #[doc = " \\param value - Value to set for each byte of specified memory"] - #[doc = " \\param extent - Size parameters for where to set device memory (\\p width field in bytes)"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_memset"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,"] - #[doc = " ::cudaMemsetAsync, ::cudaMemset2DAsync,"] - #[doc = " ::cudaMalloc3D, ::make_cudaPitchedPtr,"] - #[doc = " ::make_cudaExtent"] pub fn cudaMemset3DAsync( pitchedDevPtr: cudaPitchedPtr, value: ::libc::c_int, @@ -13020,128 +8791,15 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Finds the address associated with a CUDA symbol"] - #[doc = ""] - #[doc = " Returns in \\p *devPtr the address of symbol \\p symbol on the device."] - #[doc = " \\p symbol is a variable that resides in global or constant memory space."] - #[doc = " If \\p symbol cannot be found, or if \\p symbol is not declared in the"] - #[doc = " global or constant memory space, \\p *devPtr is unchanged and the error"] - #[doc = " ::cudaErrorInvalidSymbol is returned."] - #[doc = ""] - #[doc = " \\param devPtr - Return device pointer associated with symbol"] - #[doc = " \\param symbol - Device symbol address"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorNoKernelImageForDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_string_api_deprecation"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaGetSymbolAddress(void**, const T&) \"cudaGetSymbolAddress (C++ API)\","] - #[doc = " \\ref ::cudaGetSymbolSize(size_t*, const void*) \"cudaGetSymbolSize (C API)\","] - #[doc = " ::cuModuleGetGlobal"] pub fn cudaGetSymbolAddress( devPtr: *mut *mut ::libc::c_void, symbol: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Finds the size of the object associated with a CUDA symbol"] - #[doc = ""] - #[doc = " Returns in \\p *size the size of symbol \\p symbol. \\p symbol is a variable that"] - #[doc = " resides in global or constant memory space. If \\p symbol cannot be found, or"] - #[doc = " if \\p symbol is not declared in global or constant memory space, \\p *size is"] - #[doc = " unchanged and the error ::cudaErrorInvalidSymbol is returned."] - #[doc = ""] - #[doc = " \\param size - Size of object associated with symbol"] - #[doc = " \\param symbol - Device symbol address"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidSymbol,"] - #[doc = " ::cudaErrorNoKernelImageForDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_string_api_deprecation"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaGetSymbolAddress(void**, const void*) \"cudaGetSymbolAddress (C API)\","] - #[doc = " \\ref ::cudaGetSymbolSize(size_t*, const T&) \"cudaGetSymbolSize (C++ API)\","] - #[doc = " ::cuModuleGetGlobal"] pub fn cudaGetSymbolSize(size: *mut usize, symbol: *const ::libc::c_void) -> cudaError_t; } extern "C" { - #[doc = " \\brief Prefetches memory to the specified destination device"] - #[doc = ""] - #[doc = " Prefetches memory to the specified destination device. \\p devPtr is the"] - #[doc = " base device pointer of the memory to be prefetched and \\p dstDevice is the"] - #[doc = " destination device. \\p count specifies the number of bytes to copy. \\p stream"] - #[doc = " is the stream in which the operation is enqueued. The memory range must refer"] - #[doc = " to managed memory allocated via ::cudaMallocManaged or declared via __managed__ variables."] - #[doc = ""] - #[doc = " Passing in cudaCpuDeviceId for \\p dstDevice will prefetch the data to host memory. If"] - #[doc = " \\p dstDevice is a GPU, then the device attribute ::cudaDevAttrConcurrentManagedAccess"] - #[doc = " must be non-zero. Additionally, \\p stream must be associated with a device that has a"] - #[doc = " non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess."] - #[doc = ""] - #[doc = " The start address and end address of the memory range will be rounded down and rounded up"] - #[doc = " respectively to be aligned to CPU page size before the prefetch operation is enqueued"] - #[doc = " in the stream."] - #[doc = ""] - #[doc = " If no physical memory has been allocated for this region, then this memory region"] - #[doc = " will be populated and mapped on the destination device. If there's insufficient"] - #[doc = " memory to prefetch the desired region, the Unified Memory driver may evict pages from other"] - #[doc = " ::cudaMallocManaged allocations to host memory in order to make room. Device memory"] - #[doc = " allocated using ::cudaMalloc or ::cudaMallocArray will not be evicted."] - #[doc = ""] - #[doc = " By default, any mappings to the previous location of the migrated pages are removed and"] - #[doc = " mappings for the new location are only setup on \\p dstDevice. The exact behavior however"] - #[doc = " also depends on the settings applied to this memory range via ::cudaMemAdvise as described"] - #[doc = " below:"] - #[doc = ""] - #[doc = " If ::cudaMemAdviseSetReadMostly was set on any subset of this memory range,"] - #[doc = " then that subset will create a read-only copy of the pages on \\p dstDevice."] - #[doc = ""] - #[doc = " If ::cudaMemAdviseSetPreferredLocation was called on any subset of this memory"] - #[doc = " range, then the pages will be migrated to \\p dstDevice even if \\p dstDevice is not the"] - #[doc = " preferred location of any pages in the memory range."] - #[doc = ""] - #[doc = " If ::cudaMemAdviseSetAccessedBy was called on any subset of this memory range,"] - #[doc = " then mappings to those pages from all the appropriate processors are updated to"] - #[doc = " refer to the new location if establishing such a mapping is possible. Otherwise,"] - #[doc = " those mappings are cleared."] - #[doc = ""] - #[doc = " Note that this API is not required for functionality and only serves to improve performance"] - #[doc = " by allowing the application to migrate data to a suitable location before it is accessed."] - #[doc = " Memory accesses to this range are always coherent and are allowed even when the data is"] - #[doc = " actively being migrated."] - #[doc = ""] - #[doc = " Note that this function is asynchronous with respect to the host and all work"] - #[doc = " on other devices."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to be prefetched"] - #[doc = " \\param count - Size in bytes"] - #[doc = " \\param dstDevice - Destination device to prefetch to"] - #[doc = " \\param stream - Stream to enqueue prefetch operation"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,"] - #[doc = " ::cudaMemcpy3DPeerAsync, ::cudaMemAdvise,"] - #[doc = " ::cuMemPrefetchAsync"] pub fn cudaMemPrefetchAsync( devPtr: *const ::libc::c_void, count: usize, @@ -13150,118 +8808,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Advise about the usage of a given memory range"] - #[doc = ""] - #[doc = " Advise the Unified Memory subsystem about the usage pattern for the memory range"] - #[doc = " starting at \\p devPtr with a size of \\p count bytes. The start address and end address of the memory"] - #[doc = " range will be rounded down and rounded up respectively to be aligned to CPU page size before the"] - #[doc = " advice is applied. The memory range must refer to managed memory allocated via ::cudaMallocManaged"] - #[doc = " or declared via __managed__ variables. The memory range could also refer to system-allocated pageable"] - #[doc = " memory provided it represents a valid, host-accessible region of memory and all additional constraints"] - #[doc = " imposed by \\p advice as outlined below are also satisfied. Specifying an invalid system-allocated pageable"] - #[doc = " memory range results in an error being returned."] - #[doc = ""] - #[doc = " The \\p advice parameter can take the following values:"] - #[doc = " - ::cudaMemAdviseSetReadMostly: This implies that the data is mostly going to be read"] - #[doc = " from and only occasionally written to. Any read accesses from any processor to this region will create a"] - #[doc = " read-only copy of at least the accessed pages in that processor's memory. Additionally, if ::cudaMemPrefetchAsync"] - #[doc = " is called on this region, it will create a read-only copy of the data on the destination processor."] - #[doc = " If any processor writes to this region, all copies of the corresponding page will be invalidated"] - #[doc = " except for the one where the write occurred. The \\p device argument is ignored for this advice."] - #[doc = " Note that for a page to be read-duplicated, the accessing processor must either be the CPU or a GPU"] - #[doc = " that has a non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess."] - #[doc = " Also, if a context is created on a device that does not have the device attribute"] - #[doc = " ::cudaDevAttrConcurrentManagedAccess set, then read-duplication will not occur until"] - #[doc = " all such contexts are destroyed."] - #[doc = " If the memory region refers to valid system-allocated pageable memory, then the accessing device must"] - #[doc = " have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess for a read-only"] - #[doc = " copy to be created on that device. Note however that if the accessing device also has a non-zero value for the"] - #[doc = " device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, then setting this advice"] - #[doc = " will not create a read-only copy when that device accesses this memory region."] - #[doc = ""] - #[doc = " - ::cudaMemAdviceUnsetReadMostly: Undoes the effect of ::cudaMemAdviceReadMostly and also prevents the"] - #[doc = " Unified Memory driver from attempting heuristic read-duplication on the memory range. Any read-duplicated"] - #[doc = " copies of the data will be collapsed into a single copy. The location for the collapsed"] - #[doc = " copy will be the preferred location if the page has a preferred location and one of the read-duplicated"] - #[doc = " copies was resident at that location. Otherwise, the location chosen is arbitrary."] - #[doc = ""] - #[doc = " - ::cudaMemAdviseSetPreferredLocation: This advice sets the preferred location for the"] - #[doc = " data to be the memory belonging to \\p device. Passing in cudaCpuDeviceId for \\p device sets the"] - #[doc = " preferred location as host memory. If \\p device is a GPU, then it must have a non-zero value for the"] - #[doc = " device attribute ::cudaDevAttrConcurrentManagedAccess. Setting the preferred location"] - #[doc = " does not cause data to migrate to that location immediately. Instead, it guides the migration policy"] - #[doc = " when a fault occurs on that memory region. If the data is already in its preferred location and the"] - #[doc = " faulting processor can establish a mapping without requiring the data to be migrated, then"] - #[doc = " data migration will be avoided. On the other hand, if the data is not in its preferred location"] - #[doc = " or if a direct mapping cannot be established, then it will be migrated to the processor accessing"] - #[doc = " it. It is important to note that setting the preferred location does not prevent data prefetching"] - #[doc = " done using ::cudaMemPrefetchAsync."] - #[doc = " Having a preferred location can override the page thrash detection and resolution logic in the Unified"] - #[doc = " Memory driver. Normally, if a page is detected to be constantly thrashing between for example host and device"] - #[doc = " memory, the page may eventually be pinned to host memory by the Unified Memory driver. But"] - #[doc = " if the preferred location is set as device memory, then the page will continue to thrash indefinitely."] - #[doc = " If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the"] - #[doc = " policies associated with that advice will override the policies of this advice, unless read accesses from"] - #[doc = " \\p device will not result in a read-only copy being created on that device as outlined in description for"] - #[doc = " the advice ::cudaMemAdviseSetReadMostly."] - #[doc = " If the memory region refers to valid system-allocated pageable memory, then \\p device must have a non-zero"] - #[doc = " value for the device attribute ::cudaDevAttrPageableMemoryAccess. Additionally, if \\p device has"] - #[doc = " a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,"] - #[doc = " then this call has no effect. Note however that this behavior may change in the future."] - #[doc = ""] - #[doc = " - ::cudaMemAdviseUnsetPreferredLocation: Undoes the effect of ::cudaMemAdviseSetPreferredLocation"] - #[doc = " and changes the preferred location to none."] - #[doc = ""] - #[doc = " - ::cudaMemAdviseSetAccessedBy: This advice implies that the data will be accessed by \\p device."] - #[doc = " Passing in ::cudaCpuDeviceId for \\p device will set the advice for the CPU. If \\p device is a GPU, then"] - #[doc = " the device attribute ::cudaDevAttrConcurrentManagedAccess must be non-zero."] - #[doc = " This advice does not cause data migration and has no impact on the location of the data per se. Instead,"] - #[doc = " it causes the data to always be mapped in the specified processor's page tables, as long as the"] - #[doc = " location of the data permits a mapping to be established. If the data gets migrated for any reason,"] - #[doc = " the mappings are updated accordingly."] - #[doc = " This advice is recommended in scenarios where data locality is not important, but avoiding faults is."] - #[doc = " Consider for example a system containing multiple GPUs with peer-to-peer access enabled, where the"] - #[doc = " data located on one GPU is occasionally accessed by peer GPUs. In such scenarios, migrating data"] - #[doc = " over to the other GPUs is not as important because the accesses are infrequent and the overhead of"] - #[doc = " migration may be too high. But preventing faults can still help improve performance, and so having"] - #[doc = " a mapping set up in advance is useful. Note that on CPU access of this data, the data may be migrated"] - #[doc = " to host memory because the CPU typically cannot access device memory directly. Any GPU that had the"] - #[doc = " ::cudaMemAdviceSetAccessedBy flag set for this data will now have its mapping updated to point to the"] - #[doc = " page in host memory."] - #[doc = " If ::cudaMemAdviseSetReadMostly is also set on this memory region or any subset of it, then the"] - #[doc = " policies associated with that advice will override the policies of this advice. Additionally, if the"] - #[doc = " preferred location of this memory region or any subset of it is also \\p device, then the policies"] - #[doc = " associated with ::cudaMemAdviseSetPreferredLocation will override the policies of this advice."] - #[doc = " If the memory region refers to valid system-allocated pageable memory, then \\p device must have a non-zero"] - #[doc = " value for the device attribute ::cudaDevAttrPageableMemoryAccess. Additionally, if \\p device has"] - #[doc = " a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,"] - #[doc = " then this call has no effect."] - #[doc = ""] - #[doc = " - ::cudaMemAdviseUnsetAccessedBy: Undoes the effect of ::cudaMemAdviseSetAccessedBy. Any mappings to"] - #[doc = " the data from \\p device may be removed at any time causing accesses to result in non-fatal page faults."] - #[doc = " If the memory region refers to valid system-allocated pageable memory, then \\p device must have a non-zero"] - #[doc = " value for the device attribute ::cudaDevAttrPageableMemoryAccess. Additionally, if \\p device has"] - #[doc = " a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,"] - #[doc = " then this call has no effect."] - #[doc = ""] - #[doc = " \\param devPtr - Pointer to memory to set the advice for"] - #[doc = " \\param count - Size in bytes of the memory range"] - #[doc = " \\param advice - Advice to be applied for the specified memory range"] - #[doc = " \\param device - Device to apply the advice for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,"] - #[doc = " ::cudaMemcpy3DPeerAsync, ::cudaMemPrefetchAsync,"] - #[doc = " ::cuMemAdvise"] pub fn cudaMemAdvise( devPtr: *const ::libc::c_void, count: usize, @@ -13270,61 +8816,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Query an attribute of a given memory range"] - #[doc = ""] - #[doc = " Query an attribute about the memory range starting at \\p devPtr with a size of \\p count bytes. The"] - #[doc = " memory range must refer to managed memory allocated via ::cudaMallocManaged or declared via"] - #[doc = " __managed__ variables."] - #[doc = ""] - #[doc = " The \\p attribute parameter can take the following values:"] - #[doc = " - ::cudaMemRangeAttributeReadMostly: If this attribute is specified, \\p data will be interpreted"] - #[doc = " as a 32-bit integer, and \\p dataSize must be 4. The result returned will be 1 if all pages in the given"] - #[doc = " memory range have read-duplication enabled, or 0 otherwise."] - #[doc = " - ::cudaMemRangeAttributePreferredLocation: If this attribute is specified, \\p data will be"] - #[doc = " interpreted as a 32-bit integer, and \\p dataSize must be 4. The result returned will be a GPU device"] - #[doc = " id if all pages in the memory range have that GPU as their preferred location, or it will be cudaCpuDeviceId"] - #[doc = " if all pages in the memory range have the CPU as their preferred location, or it will be cudaInvalidDeviceId"] - #[doc = " if either all the pages don't have the same preferred location or some of the pages don't have a"] - #[doc = " preferred location at all. Note that the actual location of the pages in the memory range at the time of"] - #[doc = " the query may be different from the preferred location."] - #[doc = " - ::cudaMemRangeAttributeAccessedBy: If this attribute is specified, \\p data will be interpreted"] - #[doc = " as an array of 32-bit integers, and \\p dataSize must be a non-zero multiple of 4. The result returned"] - #[doc = " will be a list of device ids that had ::cudaMemAdviceSetAccessedBy set for that entire memory range."] - #[doc = " If any device does not have that advice set for the entire memory range, that device will not be included."] - #[doc = " If \\p data is larger than the number of devices that have that advice set for that memory range,"] - #[doc = " cudaInvalidDeviceId will be returned in all the extra space provided. For ex., if \\p dataSize is 12"] - #[doc = " (i.e. \\p data has 3 elements) and only device 0 has the advice set, then the result returned will be"] - #[doc = " { 0, cudaInvalidDeviceId, cudaInvalidDeviceId }. If \\p data is smaller than the number of devices that have"] - #[doc = " that advice set, then only as many devices will be returned as can fit in the array. There is no"] - #[doc = " guarantee on which specific devices will be returned, however."] - #[doc = " - ::cudaMemRangeAttributeLastPrefetchLocation: If this attribute is specified, \\p data will be"] - #[doc = " interpreted as a 32-bit integer, and \\p dataSize must be 4. The result returned will be the last location"] - #[doc = " to which all pages in the memory range were prefetched explicitly via ::cudaMemPrefetchAsync. This will either be"] - #[doc = " a GPU id or cudaCpuDeviceId depending on whether the last location for prefetch was a GPU or the CPU"] - #[doc = " respectively. If any page in the memory range was never explicitly prefetched or if all pages were not"] - #[doc = " prefetched to the same location, cudaInvalidDeviceId will be returned. Note that this simply returns the"] - #[doc = " last location that the applicaton requested to prefetch the memory range to. It gives no indication as to"] - #[doc = " whether the prefetch operation to that location has completed or even begun."] - #[doc = ""] - #[doc = " \\param data - A pointers to a memory location where the result"] - #[doc = " of each attribute query will be written to."] - #[doc = " \\param dataSize - Array containing the size of data"] - #[doc = " \\param attribute - The attribute to query"] - #[doc = " \\param devPtr - Start of the range to query"] - #[doc = " \\param count - Size of the range to query"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemRangeGetAttributes, ::cudaMemPrefetchAsync,"] - #[doc = " ::cudaMemAdvise,"] - #[doc = " ::cuMemRangeGetAttribute"] pub fn cudaMemRangeGetAttribute( data: *mut ::libc::c_void, dataSize: usize, @@ -13334,41 +8825,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Query attributes of a given memory range."] - #[doc = ""] - #[doc = " Query attributes of the memory range starting at \\p devPtr with a size of \\p count bytes. The"] - #[doc = " memory range must refer to managed memory allocated via ::cudaMallocManaged or declared via"] - #[doc = " __managed__ variables. The \\p attributes array will be interpreted to have \\p numAttributes"] - #[doc = " entries. The \\p dataSizes array will also be interpreted to have \\p numAttributes entries."] - #[doc = " The results of the query will be stored in \\p data."] - #[doc = ""] - #[doc = " The list of supported attributes are given below. Please refer to ::cudaMemRangeGetAttribute for"] - #[doc = " attribute descriptions and restrictions."] - #[doc = ""] - #[doc = " - ::cudaMemRangeAttributeReadMostly"] - #[doc = " - ::cudaMemRangeAttributePreferredLocation"] - #[doc = " - ::cudaMemRangeAttributeAccessedBy"] - #[doc = " - ::cudaMemRangeAttributeLastPrefetchLocation"] - #[doc = ""] - #[doc = " \\param data - A two-dimensional array containing pointers to memory"] - #[doc = " locations where the result of each attribute query will be written to."] - #[doc = " \\param dataSizes - Array containing the sizes of each result"] - #[doc = " \\param attributes - An array of attributes to query"] - #[doc = " (numAttributes and the number of attributes in this array should match)"] - #[doc = " \\param numAttributes - Number of attributes to query"] - #[doc = " \\param devPtr - Start of the range to query"] - #[doc = " \\param count - Size of the range to query"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemRangeGetAttribute, ::cudaMemAdvise,"] - #[doc = " ::cudaMemPrefetchAsync,"] - #[doc = " ::cuMemRangeGetAttributes"] pub fn cudaMemRangeGetAttributes( data: *mut *mut ::libc::c_void, dataSizes: *mut usize, @@ -13379,45 +8835,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p src to the"] - #[doc = " CUDA array \\p dst starting at \\p hOffset rows and \\p wOffset bytes from"] - #[doc = " the upper left corner, where \\p kind specifies the direction"] - #[doc = " of the copy, and must be one of ::cudaMemcpyHostToHost,"] - #[doc = " ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param wOffset - Destination starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Destination starting Y offset (rows)"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyHtoA,"] - #[doc = " ::cuMemcpyDtoA"] pub fn cudaMemcpyToArray( dst: cudaArray_t, wOffset: usize, @@ -13428,44 +8845,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffset rows"] - #[doc = " and \\p wOffset bytes from the upper left corner to the memory area pointed to"] - #[doc = " by \\p dst, where \\p kind specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param wOffset - Source starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Source starting Y offset (rows)"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_sync"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyAtoH,"] - #[doc = " ::cuMemcpyAtoD"] pub fn cudaMemcpyFromArray( dst: *mut ::libc::c_void, src: cudaArray_const_t, @@ -13476,45 +8855,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffsetSrc"] - #[doc = " rows and \\p wOffsetSrc bytes from the upper left corner to the CUDA array"] - #[doc = " \\p dst starting at \\p hOffsetDst rows and \\p wOffsetDst bytes from the upper"] - #[doc = " left corner, where \\p kind specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param wOffsetDst - Destination starting X offset (columns in bytes)"] - #[doc = " \\param hOffsetDst - Destination starting Y offset (rows)"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param wOffsetSrc - Source starting X offset (columns in bytes)"] - #[doc = " \\param hOffsetSrc - Source starting Y offset (rows)"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param kind - Type of transfer"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyAtoA"] pub fn cudaMemcpyArrayToArray( dst: cudaArray_t, wOffsetDst: usize, @@ -13527,53 +8867,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the memory area pointed to by \\p src to the"] - #[doc = " CUDA array \\p dst starting at \\p hOffset rows and \\p wOffset bytes from"] - #[doc = " the upper left corner, where \\p kind specifies the"] - #[doc = " direction of the copy, and must be one of ::cudaMemcpyHostToHost,"] - #[doc = " ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " ::cudaMemcpyToArrayAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument. If \\p"] - #[doc = " kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream"] - #[doc = " is non-zero, the copy may overlap with operations in other streams."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param wOffset - Destination starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Destination starting Y offset (rows)"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyHtoAAsync,"] - #[doc = " ::cuMemcpy2DAsync"] pub fn cudaMemcpyToArrayAsync( dst: cudaArray_t, wOffset: usize, @@ -13585,52 +8878,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies data between host and device"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffset rows"] - #[doc = " and \\p wOffset bytes from the upper left corner to the memory area pointed to"] - #[doc = " by \\p dst, where \\p kind specifies the direction of the copy, and must be one of"] - #[doc = " ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,"] - #[doc = " ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing"] - #[doc = " ::cudaMemcpyDefault is recommended, in which case the type of transfer is"] - #[doc = " inferred from the pointer values. However, ::cudaMemcpyDefault is only"] - #[doc = " allowed on systems that support unified virtual addressing."] - #[doc = ""] - #[doc = " ::cudaMemcpyFromArrayAsync() is asynchronous with respect to the host, so"] - #[doc = " the call may return before the copy is complete. The copy can optionally"] - #[doc = " be associated to a stream by passing a non-zero \\p stream argument. If \\p"] - #[doc = " kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream"] - #[doc = " is non-zero, the copy may overlap with operations in other streams."] - #[doc = ""] - #[doc = " \\param dst - Destination memory address"] - #[doc = " \\param src - Source memory address"] - #[doc = " \\param wOffset - Source starting X offset (columns in bytes)"] - #[doc = " \\param hOffset - Source starting Y offset (rows)"] - #[doc = " \\param count - Size in bytes to copy"] - #[doc = " \\param kind - Type of transfer"] - #[doc = " \\param stream - Stream identifier"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidMemcpyDirection"] - #[doc = " \\notefnerr"] - #[doc = " \\note_async"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,"] - #[doc = " ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,"] - #[doc = " ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,"] - #[doc = " ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,"] - #[doc = " ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,"] - #[doc = " ::cudaMemcpy2DFromArrayAsync,"] - #[doc = " ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,"] - #[doc = " ::cuMemcpyAtoHAsync,"] - #[doc = " ::cuMemcpy2DAsync"] pub fn cudaMemcpyFromArrayAsync( dst: *mut ::libc::c_void, src: cudaArray_const_t, @@ -13642,38 +8889,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocates memory with stream ordered semantics"] - #[doc = ""] - #[doc = " Inserts an allocation operation into \\p hStream."] - #[doc = " A pointer to the allocated memory is returned immediately in *dptr."] - #[doc = " The allocation must not be accessed until the the allocation operation completes."] - #[doc = " The allocation comes from the memory pool associated with the stream's device."] - #[doc = ""] - #[doc = " \\note The default memory pool of a device contains device memory from that device."] - #[doc = " \\note Basic stream ordering allows future work submitted into the same stream to use the allocation."] - #[doc = " Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation"] - #[doc = " operation completes before work submitted in a separate stream runs."] - #[doc = " \\note During stream capture, this function results in the creation of an allocation node. In this case,"] - #[doc = " the allocation is owned by the graph instead of the memory pool. The memory pool's properties"] - #[doc = " are used to set the node's creation parameters."] - #[doc = ""] - #[doc = " \\param[out] devPtr - Returned device pointer"] - #[doc = " \\param[in] size - Number of bytes to allocate"] - #[doc = " \\param[in] hStream - The stream establishing the stream ordering contract and the memory pool to allocate from"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorOutOfMemory,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuMemAllocAsync,"] - #[doc = " \\ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) \"cudaMallocAsync (C++ API)\","] - #[doc = " ::cudaMallocFromPoolAsync, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute, ::cudaMemPoolGetAttribute"] pub fn cudaMallocAsync( devPtr: *mut *mut ::libc::c_void, size: usize, @@ -13681,89 +8896,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Frees memory with stream ordered semantics"] - #[doc = ""] - #[doc = " Inserts a free operation into \\p hStream."] - #[doc = " The allocation must not be accessed after stream execution reaches the free."] - #[doc = " After this API returns, accessing the memory from any subsequent work launched on the GPU"] - #[doc = " or querying its pointer attributes results in undefined behavior."] - #[doc = ""] - #[doc = " \\note During stream capture, this function results in the creation of a free node and"] - #[doc = " must therefore be passed the address of a graph allocation."] - #[doc = ""] - #[doc = " \\param dptr - memory to free"] - #[doc = " \\param hStream - The stream establishing the stream ordering promise"] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = " \\notefnerr"] - #[doc = " \\note_null_stream"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuMemFreeAsync, ::cudaMallocAsync"] pub fn cudaFreeAsync(devPtr: *mut ::libc::c_void, hStream: cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Tries to release memory back to the OS"] - #[doc = ""] - #[doc = " Releases memory back to the OS until the pool contains fewer than minBytesToKeep"] - #[doc = " reserved bytes, or there is no more memory that the allocator can safely release."] - #[doc = " The allocator cannot release OS allocations that back outstanding asynchronous allocations."] - #[doc = " The OS allocations may happen at different granularity from the user allocations."] - #[doc = ""] - #[doc = " \\note: Allocations that have not been freed count as outstanding."] - #[doc = " \\note: Allocations that have been asynchronously freed but whose completion has"] - #[doc = " not been observed on the host (eg. by a synchronize) can count as outstanding."] - #[doc = ""] - #[doc = " \\param[in] pool - The memory pool to trim"] - #[doc = " \\param[in] minBytesToKeep - If the pool has less than minBytesToKeep reserved,"] - #[doc = " the TrimTo operation is a no-op. Otherwise the pool will be guaranteed to have"] - #[doc = " at least minBytesToKeep bytes reserved after the operation."] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolTrimTo, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"] pub fn cudaMemPoolTrimTo(memPool: cudaMemPool_t, minBytesToKeep: usize) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets attributes of a memory pool"] - #[doc = ""] - #[doc = " Supported attributes are:"] - #[doc = " - ::cudaMemPoolAttrReleaseThreshold: (value type = cuuint64_t)"] - #[doc = " Amount of reserved memory in bytes to hold onto before trying"] - #[doc = " to release memory back to the OS. When more than the release"] - #[doc = " threshold bytes of memory are held by the memory pool, the"] - #[doc = " allocator will try to release memory back to the OS on the"] - #[doc = " next call to stream, event or context synchronize. (default 0)"] - #[doc = " - ::cudaMemPoolReuseFollowEventDependencies: (value type = int)"] - #[doc = " Allow ::cudaMallocAsync to use memory asynchronously freed"] - #[doc = " in another stream as long as a stream ordering dependency"] - #[doc = " of the allocating stream on the free action exists."] - #[doc = " Cuda events and null stream interactions can create the required"] - #[doc = " stream ordered dependencies. (default enabled)"] - #[doc = " - ::cudaMemPoolReuseAllowOpportunistic: (value type = int)"] - #[doc = " Allow reuse of already completed frees when there is no dependency"] - #[doc = " between the free and allocation. (default enabled)"] - #[doc = " - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int)"] - #[doc = " Allow ::cudaMallocAsync to insert new stream dependencies"] - #[doc = " in order to establish the stream ordering required to reuse"] - #[doc = " a piece of memory released by ::cudaFreeAsync (default enabled)."] - #[doc = ""] - #[doc = " \\param[in] pool - The memory pool to modify"] - #[doc = " \\param[in] attr - The attribute to modify"] - #[doc = " \\param[in] value - Pointer to the value to assign"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolSetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"] - #[doc = ""] pub fn cudaMemPoolSetAttribute( memPool: cudaMemPool_t, attr: cudaMemPoolAttr, @@ -13771,40 +8909,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets attributes of a memory pool"] - #[doc = ""] - #[doc = " Supported attributes are:"] - #[doc = " - ::cudaMemPoolAttrReleaseThreshold: (value type = cuuint64_t)"] - #[doc = " Amount of reserved memory in bytes to hold onto before trying"] - #[doc = " to release memory back to the OS. When more than the release"] - #[doc = " threshold bytes of memory are held by the memory pool, the"] - #[doc = " allocator will try to release memory back to the OS on the"] - #[doc = " next call to stream, event or context synchronize. (default 0)"] - #[doc = " - ::cudaMemPoolReuseFollowEventDependencies: (value type = int)"] - #[doc = " Allow ::cudaMallocAsync to use memory asynchronously freed"] - #[doc = " in another stream as long as a stream ordering dependency"] - #[doc = " of the allocating stream on the free action exists."] - #[doc = " Cuda events and null stream interactions can create the required"] - #[doc = " stream ordered dependencies. (default enabled)"] - #[doc = " - ::cudaMemPoolReuseAllowOpportunistic: (value type = int)"] - #[doc = " Allow reuse of already completed frees when there is no dependency"] - #[doc = " between the free and allocation. (default enabled)"] - #[doc = " - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int)"] - #[doc = " Allow ::cudaMallocAsync to insert new stream dependencies"] - #[doc = " in order to establish the stream ordering required to reuse"] - #[doc = " a piece of memory released by ::cudaFreeAsync (default enabled)."] - #[doc = ""] - #[doc = " \\param[in] pool - The memory pool to get attributes of"] - #[doc = " \\param[in] attr - The attribute to get"] - #[doc = " \\param[in] value - Retrieved value"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolGetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"] - #[doc = ""] pub fn cudaMemPoolGetAttribute( memPool: cudaMemPool_t, attr: cudaMemPoolAttr, @@ -13812,17 +8916,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Controls visibility of pools between devices"] - #[doc = ""] - #[doc = " \\param[in] pool - The pool being modified"] - #[doc = " \\param[in] map - Array of access descriptors. Each descriptor instructs the access to enable for a single gpu"] - #[doc = " \\param[in] count - Number of descriptors in the map array."] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolSetAccess, ::cudaMemPoolGetAccess, ::cudaMallocAsync, cudaFreeAsync"] pub fn cudaMemPoolSetAccess( memPool: cudaMemPool_t, descList: *const cudaMemAccessDesc, @@ -13830,15 +8923,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the accessibility of a pool from a device"] - #[doc = ""] - #[doc = " Returns the accessibility of the pool's memory from the specified location."] - #[doc = ""] - #[doc = " \\param[out] flags - the accessibility of the pool from the specified location"] - #[doc = " \\param[in] memPool - the pool being queried"] - #[doc = " \\param[in] location - the location accessing the pool"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolGetAccess, ::cudaMemPoolSetAccess"] pub fn cudaMemPoolGetAccess( flags: *mut cudaMemAccessFlags, memPool: cudaMemPool_t, @@ -13846,81 +8930,15 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a memory pool"] - #[doc = ""] - #[doc = " Creates a CUDA memory pool and returns the handle in \\p pool. The \\p poolProps determines"] - #[doc = " the properties of the pool such as the backing device and IPC capabilities."] - #[doc = ""] - #[doc = " By default, the pool's memory will be accessible from the device it is allocated on."] - #[doc = ""] - #[doc = " \\note Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC."] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorNotSupported"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolCreate, ::cudaDeviceSetMemPool, ::cudaMallocFromPoolAsync, ::cudaMemPoolExportToShareableHandle, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool"] - #[doc = ""] pub fn cudaMemPoolCreate( memPool: *mut cudaMemPool_t, poolProps: *const cudaMemPoolProps, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys the specified memory pool"] - #[doc = ""] - #[doc = " If any pointers obtained from this pool haven't been freed or"] - #[doc = " the pool has free operations that haven't completed"] - #[doc = " when ::cudaMemPoolDestroy is invoked, the function will return immediately and the"] - #[doc = " resources associated with the pool will be released automatically"] - #[doc = " once there are no more outstanding allocations."] - #[doc = ""] - #[doc = " Destroying the current mempool of a device sets the default mempool of"] - #[doc = " that device as the current mempool for that device."] - #[doc = ""] - #[doc = " \\note A device's default memory pool cannot be destroyed."] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = ""] - #[doc = " \\sa cuMemPoolDestroy, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"] pub fn cudaMemPoolDestroy(memPool: cudaMemPool_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Allocates memory from a specified pool with stream ordered semantics."] - #[doc = ""] - #[doc = " Inserts an allocation operation into \\p hStream."] - #[doc = " A pointer to the allocated memory is returned immediately in *dptr."] - #[doc = " The allocation must not be accessed until the the allocation operation completes."] - #[doc = " The allocation comes from the specified memory pool."] - #[doc = ""] - #[doc = " \\note"] - #[doc = " - The specified memory pool may be from a device different than that of the specified \\p hStream."] - #[doc = ""] - #[doc = " - Basic stream ordering allows future work submitted into the same stream to use the allocation."] - #[doc = " Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation"] - #[doc = " operation completes before work submitted in a separate stream runs."] - #[doc = ""] - #[doc = " \\note During stream capture, this function results in the creation of an allocation node. In this case,"] - #[doc = " the allocation is owned by the graph instead of the memory pool. The memory pool's properties"] - #[doc = " are used to set the node's creation parameters."] - #[doc = ""] - #[doc = " \\param[out] ptr - Returned device pointer"] - #[doc = " \\param[in] bytesize - Number of bytes to allocate"] - #[doc = " \\param[in] memPool - The pool to allocate from"] - #[doc = " \\param[in] stream - The stream establishing the stream ordering semantic"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorOutOfMemory"] - #[doc = ""] - #[doc = " \\sa ::cuMemAllocFromPoolAsync,"] - #[doc = " \\ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) \"cudaMallocAsync (C++ API)\","] - #[doc = " ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute"] pub fn cudaMallocFromPoolAsync( ptr: *mut *mut ::libc::c_void, size: usize, @@ -13929,27 +8947,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Exports a memory pool to the requested handle type."] - #[doc = ""] - #[doc = " Given an IPC capable mempool, create an OS handle to share the pool with another process."] - #[doc = " A recipient process can convert the shareable handle into a mempool with ::cudaMemPoolImportFromShareableHandle."] - #[doc = " Individual pointers can then be shared with the ::cudaMemPoolExportPointer and ::cudaMemPoolImportPointer APIs."] - #[doc = " The implementation of what the shareable handle is and how it can be transferred is defined by the requested"] - #[doc = " handle type."] - #[doc = ""] - #[doc = " \\note: To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than cudaMemHandleTypeNone."] - #[doc = ""] - #[doc = " \\param[out] handle_out - pointer to the location in which to store the requested handle"] - #[doc = " \\param[in] pool - pool to export"] - #[doc = " \\param[in] handleType - the type of handle to create"] - #[doc = " \\param[in] flags - must be 0"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorOutOfMemory"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer"] pub fn cudaMemPoolExportToShareableHandle( shareableHandle: *mut ::libc::c_void, memPool: cudaMemPool_t, @@ -13958,25 +8955,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief imports a memory pool from a shared handle."] - #[doc = ""] - #[doc = " Specific allocations can be imported from the imported pool with ::cudaMemPoolImportPointer."] - #[doc = ""] - #[doc = " \\note Imported memory pools do not support creating new allocations."] - #[doc = " As such imported memory pools may not be used in ::cudaDeviceSetMemPool"] - #[doc = " or ::cudaMallocFromPoolAsync calls."] - #[doc = ""] - #[doc = " \\param[out] pool_out - Returned memory pool"] - #[doc = " \\param[in] handle - OS handle of the pool to open"] - #[doc = " \\param[in] handleType - The type of handle being imported"] - #[doc = " \\param[in] flags - must be 0"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorOutOfMemory"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolImportFromShareableHandle, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer"] pub fn cudaMemPoolImportFromShareableHandle( memPool: *mut cudaMemPool_t, shareableHandle: *mut ::libc::c_void, @@ -13985,52 +8963,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Export data to share a memory pool allocation between processes."] - #[doc = ""] - #[doc = " Constructs \\p shareData_out for sharing a specific allocation from an already shared memory pool."] - #[doc = " The recipient process can import the allocation with the ::cudaMemPoolImportPointer api."] - #[doc = " The data is not a handle and may be shared through any IPC mechanism."] - #[doc = ""] - #[doc = " \\param[out] shareData_out - Returned export data"] - #[doc = " \\param[in] ptr - pointer to memory being exported"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorOutOfMemory"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolExportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolImportPointer"] pub fn cudaMemPoolExportPointer( exportData: *mut cudaMemPoolPtrExportData, ptr: *mut ::libc::c_void, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Import a memory pool allocation from another process."] - #[doc = ""] - #[doc = " Returns in \\p ptr_out a pointer to the imported memory."] - #[doc = " The imported memory must not be accessed before the allocation operation completes"] - #[doc = " in the exporting process. The imported memory must be freed from all importing processes before"] - #[doc = " being freed in the exporting process. The pointer may be freed with cudaFree"] - #[doc = " or cudaFreeAsync. If ::cudaFreeAsync is used, the free must be completed"] - #[doc = " on the importing process before the free operation on the exporting process."] - #[doc = ""] - #[doc = " \\note The ::cudaFreeAsync api may be used in the exporting process before"] - #[doc = " the ::cudaFreeAsync operation completes in its stream as long as the"] - #[doc = " ::cudaFreeAsync in the exporting process specifies a stream with"] - #[doc = " a stream dependency on the importing process's ::cudaFreeAsync."] - #[doc = ""] - #[doc = " \\param[out] ptr_out - pointer to imported memory"] - #[doc = " \\param[in] pool - pool from which to import"] - #[doc = " \\param[in] shareData - data specifying the memory to import"] - #[doc = ""] - #[doc = " \\returns"] - #[doc = " ::CUDA_SUCCESS,"] - #[doc = " ::CUDA_ERROR_INVALID_VALUE,"] - #[doc = " ::CUDA_ERROR_NOT_INITIALIZED,"] - #[doc = " ::CUDA_ERROR_OUT_OF_MEMORY"] - #[doc = ""] - #[doc = " \\sa ::cuMemPoolImportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer"] pub fn cudaMemPoolImportPointer( ptr: *mut *mut ::libc::c_void, memPool: cudaMemPool_t, @@ -14038,93 +8976,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns attributes about a specified pointer"] - #[doc = ""] - #[doc = " Returns in \\p *attributes the attributes of the pointer \\p ptr."] - #[doc = " If pointer was not allocated in, mapped by or registered with context"] - #[doc = " supporting unified addressing ::cudaErrorInvalidValue is returned."] - #[doc = ""] - #[doc = " \\note In CUDA 11.0 forward passing host pointer will return ::cudaMemoryTypeUnregistered"] - #[doc = " in ::cudaPointerAttributes::type and call will return ::cudaSuccess."] - #[doc = ""] - #[doc = " The ::cudaPointerAttributes structure is defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaPointerAttributes {"] - #[doc = "enum cudaMemoryType type;"] - #[doc = "int device;"] - #[doc = "void *devicePointer;"] - #[doc = "void *hostPointer;"] - #[doc = "}"] - #[doc = "\\endcode"] - #[doc = " In this structure, the individual fields mean"] - #[doc = ""] - #[doc = " - \\ref ::cudaPointerAttributes::type identifies type of memory. It can be"] - #[doc = " ::cudaMemoryTypeUnregistered for unregistered host memory,"] - #[doc = " ::cudaMemoryTypeHost for registered host memory, ::cudaMemoryTypeDevice for device"] - #[doc = " memory or ::cudaMemoryTypeManaged for managed memory."] - #[doc = ""] - #[doc = " - \\ref ::cudaPointerAttributes::device \"device\" is the device against which"] - #[doc = " \\p ptr was allocated. If \\p ptr has memory type ::cudaMemoryTypeDevice"] - #[doc = " then this identifies the device on which the memory referred to by \\p ptr"] - #[doc = " physically resides. If \\p ptr has memory type ::cudaMemoryTypeHost then this"] - #[doc = " identifies the device which was current when the allocation was made"] - #[doc = " (and if that device is deinitialized then this allocation will vanish"] - #[doc = " with that device's state)."] - #[doc = ""] - #[doc = " - \\ref ::cudaPointerAttributes::devicePointer \"devicePointer\" is"] - #[doc = " the device pointer alias through which the memory referred to by \\p ptr"] - #[doc = " may be accessed on the current device."] - #[doc = " If the memory referred to by \\p ptr cannot be accessed directly by the"] - #[doc = " current device then this is NULL."] - #[doc = ""] - #[doc = " - \\ref ::cudaPointerAttributes::hostPointer \"hostPointer\" is"] - #[doc = " the host pointer alias through which the memory referred to by \\p ptr"] - #[doc = " may be accessed on the host."] - #[doc = " If the memory referred to by \\p ptr cannot be accessed directly by the"] - #[doc = " host then this is NULL."] - #[doc = ""] - #[doc = " \\param attributes - Attributes for the specified pointer"] - #[doc = " \\param ptr - Pointer to get attributes for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice,"] - #[doc = " ::cudaChooseDevice,"] - #[doc = " ::cuPointerGetAttributes"] pub fn cudaPointerGetAttributes( attributes: *mut cudaPointerAttributes, ptr: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Queries if a device may directly access a peer device's memory."] - #[doc = ""] - #[doc = " Returns in \\p *canAccessPeer a value of 1 if device \\p device is capable of"] - #[doc = " directly accessing memory from \\p peerDevice and 0 otherwise. If direct"] - #[doc = " access of \\p peerDevice from \\p device is possible, then access may be"] - #[doc = " enabled by calling ::cudaDeviceEnablePeerAccess()."] - #[doc = ""] - #[doc = " \\param canAccessPeer - Returned access capability"] - #[doc = " \\param device - Device from which allocations on \\p peerDevice are to"] - #[doc = " be directly accessed."] - #[doc = " \\param peerDevice - Device on which the allocations to be directly accessed"] - #[doc = " by \\p device reside."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceEnablePeerAccess,"] - #[doc = " ::cudaDeviceDisablePeerAccess,"] - #[doc = " ::cuDeviceCanAccessPeer"] pub fn cudaDeviceCanAccessPeer( canAccessPeer: *mut ::libc::c_int, device: ::libc::c_int, @@ -14132,172 +8989,24 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Enables direct access to memory allocations on a peer device."] - #[doc = ""] - #[doc = " On success, all allocations from \\p peerDevice will immediately be accessible by"] - #[doc = " the current device. They will remain accessible until access is explicitly"] - #[doc = " disabled using ::cudaDeviceDisablePeerAccess() or either device is reset using"] - #[doc = " ::cudaDeviceReset()."] - #[doc = ""] - #[doc = " Note that access granted by this call is unidirectional and that in order to access"] - #[doc = " memory on the current device from \\p peerDevice, a separate symmetric call"] - #[doc = " to ::cudaDeviceEnablePeerAccess() is required."] - #[doc = ""] - #[doc = " Note that there are both device-wide and system-wide limitations per system"] - #[doc = " configuration, as noted in the CUDA Programming Guide under the section"] - #[doc = " \"Peer-to-Peer Memory Access\"."] - #[doc = ""] - #[doc = " Returns ::cudaErrorInvalidDevice if ::cudaDeviceCanAccessPeer() indicates"] - #[doc = " that the current device cannot directly access memory from \\p peerDevice."] - #[doc = ""] - #[doc = " Returns ::cudaErrorPeerAccessAlreadyEnabled if direct access of"] - #[doc = " \\p peerDevice from the current device has already been enabled."] - #[doc = ""] - #[doc = " Returns ::cudaErrorInvalidValue if \\p flags is not 0."] - #[doc = ""] - #[doc = " \\param peerDevice - Peer device to enable direct access to from the current device"] - #[doc = " \\param flags - Reserved for future use and must be set to 0"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidDevice,"] - #[doc = " ::cudaErrorPeerAccessAlreadyEnabled,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceCanAccessPeer,"] - #[doc = " ::cudaDeviceDisablePeerAccess,"] - #[doc = " ::cuCtxEnablePeerAccess"] pub fn cudaDeviceEnablePeerAccess( peerDevice: ::libc::c_int, flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Disables direct access to memory allocations on a peer device."] - #[doc = ""] - #[doc = " Returns ::cudaErrorPeerAccessNotEnabled if direct access to memory on"] - #[doc = " \\p peerDevice has not yet been enabled from the current device."] - #[doc = ""] - #[doc = " \\param peerDevice - Peer device to disable direct access to"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorPeerAccessNotEnabled,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa ::cudaDeviceCanAccessPeer,"] - #[doc = " ::cudaDeviceEnablePeerAccess,"] - #[doc = " ::cuCtxDisablePeerAccess"] pub fn cudaDeviceDisablePeerAccess(peerDevice: ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Unregisters a graphics resource for access by CUDA"] - #[doc = ""] - #[doc = " Unregisters the graphics resource \\p resource so it is not accessible by"] - #[doc = " CUDA unless registered again."] - #[doc = ""] - #[doc = " If \\p resource is invalid then ::cudaErrorInvalidResourceHandle is"] - #[doc = " returned."] - #[doc = ""] - #[doc = " \\param resource - Resource to unregister"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorUnknown"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphicsD3D9RegisterResource,"] - #[doc = " ::cudaGraphicsD3D10RegisterResource,"] - #[doc = " ::cudaGraphicsD3D11RegisterResource,"] - #[doc = " ::cudaGraphicsGLRegisterBuffer,"] - #[doc = " ::cudaGraphicsGLRegisterImage,"] - #[doc = " ::cuGraphicsUnregisterResource"] pub fn cudaGraphicsUnregisterResource(resource: cudaGraphicsResource_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Set usage flags for mapping a graphics resource"] - #[doc = ""] - #[doc = " Set \\p flags for mapping the graphics resource \\p resource."] - #[doc = ""] - #[doc = " Changes to \\p flags will take effect the next time \\p resource is mapped."] - #[doc = " The \\p flags argument may be any of the following:"] - #[doc = " - ::cudaGraphicsMapFlagsNone: Specifies no hints about how \\p resource will"] - #[doc = " be used. It is therefore assumed that CUDA may read from or write to \\p resource."] - #[doc = " - ::cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to \\p resource."] - #[doc = " - ::cudaGraphicsMapFlagsWriteDiscard: Specifies CUDA will not read from \\p resource and will"] - #[doc = " write over the entire contents of \\p resource, so none of the data"] - #[doc = " previously stored in \\p resource will be preserved."] - #[doc = ""] - #[doc = " If \\p resource is presently mapped for access by CUDA then ::cudaErrorUnknown is returned."] - #[doc = " If \\p flags is not one of the above values then ::cudaErrorInvalidValue is returned."] - #[doc = ""] - #[doc = " \\param resource - Registered resource to set flags for"] - #[doc = " \\param flags - Parameters for resource mapping"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorUnknown,"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphicsMapResources,"] - #[doc = " ::cuGraphicsResourceSetMapFlags"] pub fn cudaGraphicsResourceSetMapFlags( resource: cudaGraphicsResource_t, flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Map graphics resources for access by CUDA"] - #[doc = ""] - #[doc = " Maps the \\p count graphics resources in \\p resources for access by CUDA."] - #[doc = ""] - #[doc = " The resources in \\p resources may be accessed by CUDA until they"] - #[doc = " are unmapped. The graphics API from which \\p resources were registered"] - #[doc = " should not access any resources while they are mapped by CUDA. If an"] - #[doc = " application does so, the results are undefined."] - #[doc = ""] - #[doc = " This function provides the synchronization guarantee that any graphics calls"] - #[doc = " issued before ::cudaGraphicsMapResources() will complete before any subsequent CUDA"] - #[doc = " work issued in \\p stream begins."] - #[doc = ""] - #[doc = " If \\p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle"] - #[doc = " is returned. If any of \\p resources are presently mapped for access by"] - #[doc = " CUDA then ::cudaErrorUnknown is returned."] - #[doc = ""] - #[doc = " \\param count - Number of resources to map"] - #[doc = " \\param resources - Resources to map for CUDA"] - #[doc = " \\param stream - Stream for synchronization"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorUnknown"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphicsResourceGetMappedPointer,"] - #[doc = " ::cudaGraphicsSubResourceGetMappedArray,"] - #[doc = " ::cudaGraphicsUnmapResources,"] - #[doc = " ::cuGraphicsMapResources"] pub fn cudaGraphicsMapResources( count: ::libc::c_int, resources: *mut cudaGraphicsResource_t, @@ -14305,37 +9014,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Unmap graphics resources."] - #[doc = ""] - #[doc = " Unmaps the \\p count graphics resources in \\p resources."] - #[doc = ""] - #[doc = " Once unmapped, the resources in \\p resources may not be accessed by CUDA"] - #[doc = " until they are mapped again."] - #[doc = ""] - #[doc = " This function provides the synchronization guarantee that any CUDA work issued"] - #[doc = " in \\p stream before ::cudaGraphicsUnmapResources() will complete before any"] - #[doc = " subsequently issued graphics work begins."] - #[doc = ""] - #[doc = " If \\p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle"] - #[doc = " is returned. If any of \\p resources are not presently mapped for access by"] - #[doc = " CUDA then ::cudaErrorUnknown is returned."] - #[doc = ""] - #[doc = " \\param count - Number of resources to unmap"] - #[doc = " \\param resources - Resources to unmap"] - #[doc = " \\param stream - Stream for synchronization"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorUnknown"] - #[doc = " \\note_null_stream"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphicsMapResources,"] - #[doc = " ::cuGraphicsUnmapResources"] pub fn cudaGraphicsUnmapResources( count: ::libc::c_int, resources: *mut cudaGraphicsResource_t, @@ -14343,34 +9021,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get an device pointer through which to access a mapped graphics resource."] - #[doc = ""] - #[doc = " Returns in \\p *devPtr a pointer through which the mapped graphics resource"] - #[doc = " \\p resource may be accessed."] - #[doc = " Returns in \\p *size the size of the memory in bytes which may be accessed from that pointer."] - #[doc = " The value set in \\p devPtr may change every time that \\p resource is mapped."] - #[doc = ""] - #[doc = " If \\p resource is not a buffer then it cannot be accessed via a pointer and"] - #[doc = " ::cudaErrorUnknown is returned."] - #[doc = " If \\p resource is not mapped then ::cudaErrorUnknown is returned."] - #[doc = " *"] - #[doc = " \\param devPtr - Returned pointer through which \\p resource may be accessed"] - #[doc = " \\param size - Returned size of the buffer accessible starting at \\p *devPtr"] - #[doc = " \\param resource - Mapped resource to access"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorUnknown"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphicsMapResources,"] - #[doc = " ::cudaGraphicsSubResourceGetMappedArray,"] - #[doc = " ::cuGraphicsResourceGetMappedPointer"] pub fn cudaGraphicsResourceGetMappedPointer( devPtr: *mut *mut ::libc::c_void, size: *mut usize, @@ -14378,40 +9028,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get an array through which to access a subresource of a mapped graphics resource."] - #[doc = ""] - #[doc = " Returns in \\p *array an array through which the subresource of the mapped"] - #[doc = " graphics resource \\p resource which corresponds to array index \\p arrayIndex"] - #[doc = " and mipmap level \\p mipLevel may be accessed. The value set in \\p array may"] - #[doc = " change every time that \\p resource is mapped."] - #[doc = ""] - #[doc = " If \\p resource is not a texture then it cannot be accessed via an array and"] - #[doc = " ::cudaErrorUnknown is returned."] - #[doc = " If \\p arrayIndex is not a valid array index for \\p resource then"] - #[doc = " ::cudaErrorInvalidValue is returned."] - #[doc = " If \\p mipLevel is not a valid mipmap level for \\p resource then"] - #[doc = " ::cudaErrorInvalidValue is returned."] - #[doc = " If \\p resource is not mapped then ::cudaErrorUnknown is returned."] - #[doc = ""] - #[doc = " \\param array - Returned array through which a subresource of \\p resource may be accessed"] - #[doc = " \\param resource - Mapped resource to access"] - #[doc = " \\param arrayIndex - Array index for array textures or cubemap face"] - #[doc = " index as defined by ::cudaGraphicsCubeFace for"] - #[doc = " cubemap textures for the subresource to access"] - #[doc = " \\param mipLevel - Mipmap level for the subresource to access"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorUnknown"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphicsResourceGetMappedPointer,"] - #[doc = " ::cuGraphicsSubResourceGetMappedArray"] pub fn cudaGraphicsSubResourceGetMappedArray( array: *mut cudaArray_t, resource: cudaGraphicsResource_t, @@ -14420,87 +9036,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get a mipmapped array through which to access a mapped graphics resource."] - #[doc = ""] - #[doc = " Returns in \\p *mipmappedArray a mipmapped array through which the mapped"] - #[doc = " graphics resource \\p resource may be accessed. The value set in \\p mipmappedArray may"] - #[doc = " change every time that \\p resource is mapped."] - #[doc = ""] - #[doc = " If \\p resource is not a texture then it cannot be accessed via an array and"] - #[doc = " ::cudaErrorUnknown is returned."] - #[doc = " If \\p resource is not mapped then ::cudaErrorUnknown is returned."] - #[doc = ""] - #[doc = " \\param mipmappedArray - Returned mipmapped array through which \\p resource may be accessed"] - #[doc = " \\param resource - Mapped resource to access"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorUnknown"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphicsResourceGetMappedPointer,"] - #[doc = " ::cuGraphicsResourceGetMappedMipmappedArray"] pub fn cudaGraphicsResourceGetMappedMipmappedArray( mipmappedArray: *mut cudaMipmappedArray_t, resource: cudaGraphicsResource_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Binds a memory area to a texture"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Binds \\p size bytes of the memory area pointed to by \\p devPtr to the"] - #[doc = " texture reference \\p texref. \\p desc describes how the memory is interpreted"] - #[doc = " when fetching values from the texture. Any memory previously bound to"] - #[doc = " \\p texref is unbound."] - #[doc = ""] - #[doc = " Since the hardware enforces an alignment requirement on texture base"] - #[doc = " addresses,"] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) \"cudaBindTexture()\""] - #[doc = " returns in \\p *offset a byte offset that"] - #[doc = " must be applied to texture fetches in order to read from the desired memory."] - #[doc = " This offset must be divided by the texel size and passed to kernels that"] - #[doc = " read from the texture so they can be applied to the ::tex1Dfetch() function."] - #[doc = " If the device memory pointer was returned from ::cudaMalloc(), the offset is"] - #[doc = " guaranteed to be 0 and NULL may be passed as the \\p offset parameter."] - #[doc = ""] - #[doc = " The total number of elements (or texels) in the linear address range"] - #[doc = " cannot exceed ::cudaDeviceProp::maxTexture1DLinear[0]."] - #[doc = " The number of elements is computed as (\\p size / elementSize),"] - #[doc = " where elementSize is determined from \\p desc."] - #[doc = ""] - #[doc = " \\param offset - Offset in bytes"] - #[doc = " \\param texref - Texture to bind"] - #[doc = " \\param devPtr - Memory area on device"] - #[doc = " \\param desc - Channel format"] - #[doc = " \\param size - Size of the memory area pointed to by devPtr"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidTexture"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaGetChannelDesc, ::cudaGetTextureReference,"] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct texture< T, dim, readMode>&, const void*, const struct cudaChannelFormatDesc&, size_t) \"cudaBindTexture (C++ API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t, size_t, size_t) \"cudaBindTexture2D (C API)\","] - #[doc = " \\ref ::cudaBindTextureToArray(const struct textureReference*, cudaArray_const_t, const struct cudaChannelFormatDesc*) \"cudaBindTextureToArray (C API)\","] - #[doc = " \\ref ::cudaUnbindTexture(const struct textureReference*) \"cudaUnbindTexture (C API)\","] - #[doc = " \\ref ::cudaGetTextureAlignmentOffset(size_t*, const struct textureReference*) \"cudaGetTextureAlignmentOffset (C API)\","] - #[doc = " ::cuTexRefSetAddress,"] - #[doc = " ::cuTexRefSetAddressMode,"] - #[doc = " ::cuTexRefSetFormat,"] - #[doc = " ::cuTexRefSetFlags,"] - #[doc = " ::cuTexRefSetBorderColor"] pub fn cudaBindTexture( offset: *mut usize, texref: *const textureReference, @@ -14510,61 +9051,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Binds a 2D memory area to a texture"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Binds the 2D memory area pointed to by \\p devPtr to the"] - #[doc = " texture reference \\p texref. The size of the area is constrained by"] - #[doc = " \\p width in texel units, \\p height in texel units, and \\p pitch in byte"] - #[doc = " units. \\p desc describes how the memory is interpreted when fetching values"] - #[doc = " from the texture. Any memory previously bound to \\p texref is unbound."] - #[doc = ""] - #[doc = " Since the hardware enforces an alignment requirement on texture base"] - #[doc = " addresses, ::cudaBindTexture2D() returns in \\p *offset a byte offset that"] - #[doc = " must be applied to texture fetches in order to read from the desired memory."] - #[doc = " This offset must be divided by the texel size and passed to kernels that"] - #[doc = " read from the texture so they can be applied to the ::tex2D() function."] - #[doc = " If the device memory pointer was returned from ::cudaMalloc(), the offset is"] - #[doc = " guaranteed to be 0 and NULL may be passed as the \\p offset parameter."] - #[doc = ""] - #[doc = " \\p width and \\p height, which are specified in elements (or texels), cannot"] - #[doc = " exceed ::cudaDeviceProp::maxTexture2DLinear[0] and ::cudaDeviceProp::maxTexture2DLinear[1]"] - #[doc = " respectively. \\p pitch, which is specified in bytes, cannot exceed"] - #[doc = " ::cudaDeviceProp::maxTexture2DLinear[2]."] - #[doc = ""] - #[doc = " The driver returns ::cudaErrorInvalidValue if \\p pitch is not a multiple of"] - #[doc = " ::cudaDeviceProp::texturePitchAlignment."] - #[doc = ""] - #[doc = " \\param offset - Offset in bytes"] - #[doc = " \\param texref - Texture reference to bind"] - #[doc = " \\param devPtr - 2D memory area on device"] - #[doc = " \\param desc - Channel format"] - #[doc = " \\param width - Width in texel units"] - #[doc = " \\param height - Height in texel units"] - #[doc = " \\param pitch - Pitch in bytes"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidTexture"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaGetChannelDesc, ::cudaGetTextureReference,"] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) \"cudaBindTexture (C API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct texture< T, dim, readMode>&, const void*, const struct cudaChannelFormatDesc&, size_t, size_t, size_t) \"cudaBindTexture2D (C++ API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct texture&, const void*, size_t, size_t, size_t) \"cudaBindTexture2D (C++ API, inherited channel descriptor)\","] - #[doc = " \\ref ::cudaBindTextureToArray(const struct textureReference*, cudaArray_const_t, const struct cudaChannelFormatDesc*) \"cudaBindTextureToArray (C API)\","] - #[doc = " \\ref ::cudaUnbindTexture(const struct textureReference*) \"cudaBindTextureToArray (C API)\","] - #[doc = " \\ref ::cudaGetTextureAlignmentOffset(size_t*, const struct textureReference*) \"cudaGetTextureAlignmentOffset (C API)\","] - #[doc = " ::cuTexRefSetAddress2D,"] - #[doc = " ::cuTexRefSetFormat,"] - #[doc = " ::cuTexRefSetFlags,"] - #[doc = " ::cuTexRefSetAddressMode,"] - #[doc = " ::cuTexRefSetBorderColor"] pub fn cudaBindTexture2D( offset: *mut usize, texref: *const textureReference, @@ -14576,40 +9062,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Binds an array to a texture"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Binds the CUDA array \\p array to the texture reference \\p texref."] - #[doc = " \\p desc describes how the memory is interpreted when fetching values from"] - #[doc = " the texture. Any CUDA array previously bound to \\p texref is unbound."] - #[doc = ""] - #[doc = " \\param texref - Texture to bind"] - #[doc = " \\param array - Memory array on device"] - #[doc = " \\param desc - Channel format"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidTexture"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaGetChannelDesc, ::cudaGetTextureReference,"] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) \"cudaBindTexture (C API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t, size_t, size_t) \"cudaBindTexture2D (C API)\","] - #[doc = " \\ref ::cudaBindTextureToArray(const struct texture< T, dim, readMode>&, cudaArray_const_t, const struct cudaChannelFormatDesc&) \"cudaBindTextureToArray (C++ API)\","] - #[doc = " \\ref ::cudaUnbindTexture(const struct textureReference*) \"cudaUnbindTexture (C API)\","] - #[doc = " \\ref ::cudaGetTextureAlignmentOffset(size_t*, const struct textureReference*) \"cudaGetTextureAlignmentOffset (C API)\","] - #[doc = " ::cuTexRefSetArray,"] - #[doc = " ::cuTexRefSetFormat,"] - #[doc = " ::cuTexRefSetFlags,"] - #[doc = " ::cuTexRefSetAddressMode,"] - #[doc = " ::cuTexRefSetFilterMode,"] - #[doc = " ::cuTexRefSetBorderColor,"] - #[doc = " ::cuTexRefSetMaxAnisotropy"] pub fn cudaBindTextureToArray( texref: *const textureReference, array: cudaArray_const_t, @@ -14617,42 +9069,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Binds a mipmapped array to a texture"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Binds the CUDA mipmapped array \\p mipmappedArray to the texture reference \\p texref."] - #[doc = " \\p desc describes how the memory is interpreted when fetching values from"] - #[doc = " the texture. Any CUDA mipmapped array previously bound to \\p texref is unbound."] - #[doc = ""] - #[doc = " \\param texref - Texture to bind"] - #[doc = " \\param mipmappedArray - Memory mipmapped array on device"] - #[doc = " \\param desc - Channel format"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidTexture"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaGetChannelDesc, ::cudaGetTextureReference,"] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) \"cudaBindTexture (C API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t, size_t, size_t) \"cudaBindTexture2D (C API)\","] - #[doc = " \\ref ::cudaBindTextureToArray(const struct texture< T, dim, readMode>&, cudaArray_const_t, const struct cudaChannelFormatDesc&) \"cudaBindTextureToArray (C++ API)\","] - #[doc = " \\ref ::cudaUnbindTexture(const struct textureReference*) \"cudaUnbindTexture (C API)\","] - #[doc = " \\ref ::cudaGetTextureAlignmentOffset(size_t*, const struct textureReference*) \"cudaGetTextureAlignmentOffset (C API)\","] - #[doc = " ::cuTexRefSetMipmappedArray,"] - #[doc = " ::cuTexRefSetMipmapFilterMode,"] - #[doc = " ::cuTexRefSetMipmapLevelClamp,"] - #[doc = " ::cuTexRefSetMipmapLevelBias,"] - #[doc = " ::cuTexRefSetFormat,"] - #[doc = " ::cuTexRefSetFlags,"] - #[doc = " ::cuTexRefSetAddressMode,"] - #[doc = " ::cuTexRefSetBorderColor,"] - #[doc = " ::cuTexRefSetMaxAnisotropy"] pub fn cudaBindTextureToMipmappedArray( texref: *const textureReference, mipmappedArray: cudaMipmappedArray_const_t, @@ -14660,118 +9076,21 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Unbinds a texture"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Unbinds the texture bound to \\p texref. If \\p texref is not currently bound, no operation is performed."] - #[doc = ""] - #[doc = " \\param texref - Texture to unbind"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidTexture"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaGetChannelDesc, ::cudaGetTextureReference,"] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) \"cudaBindTexture (C API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t, size_t, size_t) \"cudaBindTexture2D (C API)\","] - #[doc = " \\ref ::cudaBindTextureToArray(const struct textureReference*, cudaArray_const_t, const struct cudaChannelFormatDesc*) \"cudaBindTextureToArray (C API)\","] - #[doc = " \\ref ::cudaUnbindTexture(const struct texture< T, dim, readMode>&) \"cudaUnbindTexture (C++ API)\","] - #[doc = " \\ref ::cudaGetTextureAlignmentOffset(size_t*, const struct textureReference*) \"cudaGetTextureAlignmentOffset (C API)\""] pub fn cudaUnbindTexture(texref: *const textureReference) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get the alignment offset of a texture"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Returns in \\p *offset the offset that was returned when texture reference"] - #[doc = " \\p texref was bound."] - #[doc = ""] - #[doc = " \\param offset - Offset of texture reference in bytes"] - #[doc = " \\param texref - Texture to get offset of"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidTexture,"] - #[doc = " ::cudaErrorInvalidTextureBinding"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaGetChannelDesc, ::cudaGetTextureReference,"] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) \"cudaBindTexture (C API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t, size_t, size_t) \"cudaBindTexture2D (C API)\","] - #[doc = " \\ref ::cudaBindTextureToArray(const struct textureReference*, cudaArray_const_t, const struct cudaChannelFormatDesc*) \"cudaBindTextureToArray (C API)\","] - #[doc = " \\ref ::cudaUnbindTexture(const struct textureReference*) \"cudaUnbindTexture (C API)\","] - #[doc = " \\ref ::cudaGetTextureAlignmentOffset(size_t*, const struct texture< T, dim, readMode>&) \"cudaGetTextureAlignmentOffset (C++ API)\""] pub fn cudaGetTextureAlignmentOffset( offset: *mut usize, texref: *const textureReference, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get the texture reference associated with a symbol"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Returns in \\p *texref the structure associated to the texture reference"] - #[doc = " defined by symbol \\p symbol."] - #[doc = ""] - #[doc = " \\param texref - Texture reference associated with symbol"] - #[doc = " \\param symbol - Texture to get reference for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidTexture"] - #[doc = " \\notefnerr"] - #[doc = " \\note_string_api_deprecation_50"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaGetChannelDesc,"] - #[doc = " \\ref ::cudaGetTextureAlignmentOffset(size_t*, const struct textureReference*) \"cudaGetTextureAlignmentOffset (C API)\","] - #[doc = " \\ref ::cudaBindTexture(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t) \"cudaBindTexture (C API)\","] - #[doc = " \\ref ::cudaBindTexture2D(size_t*, const struct textureReference*, const void*, const struct cudaChannelFormatDesc*, size_t, size_t, size_t) \"cudaBindTexture2D (C API)\","] - #[doc = " \\ref ::cudaBindTextureToArray(const struct textureReference*, cudaArray_const_t, const struct cudaChannelFormatDesc*) \"cudaBindTextureToArray (C API)\","] - #[doc = " \\ref ::cudaUnbindTexture(const struct textureReference*) \"cudaUnbindTexture (C API)\","] - #[doc = " ::cuModuleGetTexRef"] pub fn cudaGetTextureReference( texref: *mut *const textureReference, symbol: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Binds an array to a surface"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Binds the CUDA array \\p array to the surface reference \\p surfref."] - #[doc = " \\p desc describes how the memory is interpreted when fetching values from"] - #[doc = " the surface. Any CUDA array previously bound to \\p surfref is unbound."] - #[doc = ""] - #[doc = " \\param surfref - Surface to bind"] - #[doc = " \\param array - Memory array on device"] - #[doc = " \\param desc - Channel format"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidSurface"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaBindSurfaceToArray(const struct surface< T, dim>&, cudaArray_const_t, const struct cudaChannelFormatDesc&) \"cudaBindSurfaceToArray (C++ API)\","] - #[doc = " \\ref ::cudaBindSurfaceToArray(const struct surface< T, dim>&, cudaArray_const_t) \"cudaBindSurfaceToArray (C++ API, inherited channel descriptor)\","] - #[doc = " ::cudaGetSurfaceReference,"] - #[doc = " ::cuSurfRefSetArray"] pub fn cudaBindSurfaceToArray( surfref: *const surfaceReference, array: cudaArray_const_t, @@ -14779,81 +9098,18 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get the surface reference associated with a symbol"] - #[doc = ""] - #[doc = " \\deprecated"] - #[doc = ""] - #[doc = " Returns in \\p *surfref the structure associated to the surface reference"] - #[doc = " defined by symbol \\p symbol."] - #[doc = ""] - #[doc = " \\param surfref - Surface reference associated with symbol"] - #[doc = " \\param symbol - Surface to get reference for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidSurface"] - #[doc = " \\notefnerr"] - #[doc = " \\note_string_api_deprecation_50"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " \\ref ::cudaBindSurfaceToArray(const struct surfaceReference*, cudaArray_const_t, const struct cudaChannelFormatDesc*) \"cudaBindSurfaceToArray (C API)\","] - #[doc = " ::cuModuleGetSurfRef"] pub fn cudaGetSurfaceReference( surfref: *mut *const surfaceReference, symbol: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get the channel descriptor of an array"] - #[doc = ""] - #[doc = " Returns in \\p *desc the channel descriptor of the CUDA array \\p array."] - #[doc = ""] - #[doc = " \\param desc - Channel format"] - #[doc = " \\param array - Memory array on device"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\","] - #[doc = " ::cudaCreateTextureObject, ::cudaCreateSurfaceObject"] pub fn cudaGetChannelDesc( desc: *mut cudaChannelFormatDesc, array: cudaArray_const_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a channel descriptor using the specified format"] - #[doc = ""] - #[doc = " Returns a channel descriptor with format \\p f and number of bits of each"] - #[doc = " component \\p x, \\p y, \\p z, and \\p w. The ::cudaChannelFormatDesc is"] - #[doc = " defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaChannelFormatDesc {"] - #[doc = "int x, y, z, w;"] - #[doc = "enum cudaChannelFormatKind f;"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,"] - #[doc = " ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat."] - #[doc = ""] - #[doc = " \\param x - X component"] - #[doc = " \\param y - Y component"] - #[doc = " \\param z - Z component"] - #[doc = " \\param w - W component"] - #[doc = " \\param f - Channel format"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " Channel descriptor with format \\p f"] - #[doc = ""] - #[doc = " \\sa \\ref ::cudaCreateChannelDesc(void) \"cudaCreateChannelDesc (C++ API)\","] - #[doc = " ::cudaGetChannelDesc, ::cudaCreateTextureObject, ::cudaCreateSurfaceObject"] pub fn cudaCreateChannelDesc( x: ::libc::c_int, y: ::libc::c_int, @@ -14863,219 +9119,6 @@ extern "C" { ) -> cudaChannelFormatDesc; } extern "C" { - #[doc = " \\brief Creates a texture object"] - #[doc = ""] - #[doc = " Creates a texture object and returns it in \\p pTexObject. \\p pResDesc describes"] - #[doc = " the data to texture from. \\p pTexDesc describes how the data should be sampled."] - #[doc = " \\p pResViewDesc is an optional argument that specifies an alternate format for"] - #[doc = " the data described by \\p pResDesc, and also describes the subresource region"] - #[doc = " to restrict access to when texturing. \\p pResViewDesc can only be specified if"] - #[doc = " the type of resource is a CUDA array or a CUDA mipmapped array."] - #[doc = ""] - #[doc = " Texture objects are only supported on devices of compute capability 3.0 or higher."] - #[doc = " Additionally, a texture object is an opaque value, and, as such, should only be"] - #[doc = " accessed through CUDA API calls."] - #[doc = ""] - #[doc = " The ::cudaResourceDesc structure is defined as:"] - #[doc = " \\code"] - #[doc = "struct cudaResourceDesc {"] - #[doc = "enum cudaResourceType resType;"] - #[doc = ""] - #[doc = "union {"] - #[doc = "struct {"] - #[doc = "cudaArray_t array;"] - #[doc = "} array;"] - #[doc = "struct {"] - #[doc = "cudaMipmappedArray_t mipmap;"] - #[doc = "} mipmap;"] - #[doc = "struct {"] - #[doc = "void *devPtr;"] - #[doc = "struct cudaChannelFormatDesc desc;"] - #[doc = "size_t sizeInBytes;"] - #[doc = "} linear;"] - #[doc = "struct {"] - #[doc = "void *devPtr;"] - #[doc = "struct cudaChannelFormatDesc desc;"] - #[doc = "size_t width;"] - #[doc = "size_t height;"] - #[doc = "size_t pitchInBytes;"] - #[doc = "} pitch2D;"] - #[doc = "} res;"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = " where:"] - #[doc = " - ::cudaResourceDesc::resType specifies the type of resource to texture from."] - #[doc = " CUresourceType is defined as:"] - #[doc = " \\code"] - #[doc = "enum cudaResourceType {"] - #[doc = "cudaResourceTypeArray = 0x00,"] - #[doc = "cudaResourceTypeMipmappedArray = 0x01,"] - #[doc = "cudaResourceTypeLinear = 0x02,"] - #[doc = "cudaResourceTypePitch2D = 0x03"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " \\par"] - #[doc = " If ::cudaResourceDesc::resType is set to ::cudaResourceTypeArray, ::cudaResourceDesc::res::array::array"] - #[doc = " must be set to a valid CUDA array handle."] - #[doc = ""] - #[doc = " \\par"] - #[doc = " If ::cudaResourceDesc::resType is set to ::cudaResourceTypeMipmappedArray, ::cudaResourceDesc::res::mipmap::mipmap"] - #[doc = " must be set to a valid CUDA mipmapped array handle and ::cudaTextureDesc::normalizedCoords must be set to true."] - #[doc = ""] - #[doc = " \\par"] - #[doc = " If ::cudaResourceDesc::resType is set to ::cudaResourceTypeLinear, ::cudaResourceDesc::res::linear::devPtr"] - #[doc = " must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment."] - #[doc = " ::cudaResourceDesc::res::linear::desc describes the format and the number of components per array element. ::cudaResourceDesc::res::linear::sizeInBytes"] - #[doc = " specifies the size of the array in bytes. The total number of elements in the linear address range cannot exceed"] - #[doc = " ::cudaDeviceProp::maxTexture1DLinear. The number of elements is computed as (sizeInBytes / sizeof(desc))."] - #[doc = ""] - #[doc = " \\par"] - #[doc = " If ::cudaResourceDesc::resType is set to ::cudaResourceTypePitch2D, ::cudaResourceDesc::res::pitch2D::devPtr"] - #[doc = " must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment."] - #[doc = " ::cudaResourceDesc::res::pitch2D::desc describes the format and the number of components per array element. ::cudaResourceDesc::res::pitch2D::width"] - #[doc = " and ::cudaResourceDesc::res::pitch2D::height specify the width and height of the array in elements, and cannot exceed"] - #[doc = " ::cudaDeviceProp::maxTexture2DLinear[0] and ::cudaDeviceProp::maxTexture2DLinear[1] respectively."] - #[doc = " ::cudaResourceDesc::res::pitch2D::pitchInBytes specifies the pitch between two rows in bytes and has to be aligned to"] - #[doc = " ::cudaDeviceProp::texturePitchAlignment. Pitch cannot exceed ::cudaDeviceProp::maxTexture2DLinear[2]."] - #[doc = ""] - #[doc = ""] - #[doc = " The ::cudaTextureDesc struct is defined as"] - #[doc = " \\code"] - #[doc = "struct cudaTextureDesc {"] - #[doc = "enum cudaTextureAddressMode addressMode[3];"] - #[doc = "enum cudaTextureFilterMode filterMode;"] - #[doc = "enum cudaTextureReadMode readMode;"] - #[doc = "int sRGB;"] - #[doc = "float borderColor[4];"] - #[doc = "int normalizedCoords;"] - #[doc = "unsigned int maxAnisotropy;"] - #[doc = "enum cudaTextureFilterMode mipmapFilterMode;"] - #[doc = "float mipmapLevelBias;"] - #[doc = "float minMipmapLevelClamp;"] - #[doc = "float maxMipmapLevelClamp;"] - #[doc = "int disableTrilinearOptimization;"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = " where"] - #[doc = " - ::cudaTextureDesc::addressMode specifies the addressing mode for each dimension of the texture data. ::cudaTextureAddressMode is defined as:"] - #[doc = " \\code"] - #[doc = "enum cudaTextureAddressMode {"] - #[doc = "cudaAddressModeWrap = 0,"] - #[doc = "cudaAddressModeClamp = 1,"] - #[doc = "cudaAddressModeMirror = 2,"] - #[doc = "cudaAddressModeBorder = 3"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = " This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear. Also, if ::cudaTextureDesc::normalizedCoords"] - #[doc = " is set to zero, ::cudaAddressModeWrap and ::cudaAddressModeMirror won't be supported and will be switched to ::cudaAddressModeClamp."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::filterMode specifies the filtering mode to be used when fetching from the texture. ::cudaTextureFilterMode is defined as:"] - #[doc = " \\code"] - #[doc = "enum cudaTextureFilterMode {"] - #[doc = "cudaFilterModePoint = 0,"] - #[doc = "cudaFilterModeLinear = 1"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = " This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::readMode specifies whether integer data should be converted to floating point or not. ::cudaTextureReadMode is defined as:"] - #[doc = " \\code"] - #[doc = "enum cudaTextureReadMode {"] - #[doc = "cudaReadModeElementType = 0,"] - #[doc = "cudaReadModeNormalizedFloat = 1"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = " Note that this applies only to 8-bit and 16-bit integer formats. 32-bit integer format would not be promoted, regardless of"] - #[doc = " whether or not this ::cudaTextureDesc::readMode is set ::cudaReadModeNormalizedFloat is specified."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::sRGB specifies whether sRGB to linear conversion should be performed during texture fetch."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::borderColor specifies the float values of color. where:"] - #[doc = " ::cudaTextureDesc::borderColor[0] contains value of 'R',"] - #[doc = " ::cudaTextureDesc::borderColor[1] contains value of 'G',"] - #[doc = " ::cudaTextureDesc::borderColor[2] contains value of 'B',"] - #[doc = " ::cudaTextureDesc::borderColor[3] contains value of 'A'"] - #[doc = " Note that application using integer border color values will need to these values to float."] - #[doc = " The values are set only when the addressing mode specified by ::cudaTextureDesc::addressMode is cudaAddressModeBorder."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::normalizedCoords specifies whether the texture coordinates will be normalized or not."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::maxAnisotropy specifies the maximum anistropy ratio to be used when doing anisotropic filtering. This value will be"] - #[doc = " clamped to the range [1,16]."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::mipmapFilterMode specifies the filter mode when the calculated mipmap level lies between two defined mipmap levels."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::mipmapLevelBias specifies the offset to be applied to the calculated mipmap level."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::minMipmapLevelClamp specifies the lower end of the mipmap level range to clamp access to."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::maxMipmapLevelClamp specifies the upper end of the mipmap level range to clamp access to."] - #[doc = ""] - #[doc = " - ::cudaTextureDesc::disableTrilinearOptimization specifies whether the trilinear filtering optimizations will be disabled."] - #[doc = ""] - #[doc = ""] - #[doc = " The ::cudaResourceViewDesc struct is defined as"] - #[doc = " \\code"] - #[doc = "struct cudaResourceViewDesc {"] - #[doc = "enum cudaResourceViewFormat format;"] - #[doc = "size_t width;"] - #[doc = "size_t height;"] - #[doc = "size_t depth;"] - #[doc = "unsigned int firstMipmapLevel;"] - #[doc = "unsigned int lastMipmapLevel;"] - #[doc = "unsigned int firstLayer;"] - #[doc = "unsigned int lastLayer;"] - #[doc = "};"] - #[doc = " \\endcode"] - #[doc = " where:"] - #[doc = " - ::cudaResourceViewDesc::format specifies how the data contained in the CUDA array or CUDA mipmapped array should"] - #[doc = " be interpreted. Note that this can incur a change in size of the texture data. If the resource view format is a block"] - #[doc = " compressed format, then the underlying CUDA array or CUDA mipmapped array has to have a 32-bit unsigned integer format"] - #[doc = " with 2 or 4 channels, depending on the block compressed format. For ex., BC1 and BC4 require the underlying CUDA array to have"] - #[doc = " a 32-bit unsigned int with 2 channels. The other BC formats require the underlying resource to have the same 32-bit unsigned int"] - #[doc = " format but with 4 channels."] - #[doc = ""] - #[doc = " - ::cudaResourceViewDesc::width specifies the new width of the texture data. If the resource view format is a block"] - #[doc = " compressed format, this value has to be 4 times the original width of the resource. For non block compressed formats,"] - #[doc = " this value has to be equal to that of the original resource."] - #[doc = ""] - #[doc = " - ::cudaResourceViewDesc::height specifies the new height of the texture data. If the resource view format is a block"] - #[doc = " compressed format, this value has to be 4 times the original height of the resource. For non block compressed formats,"] - #[doc = " this value has to be equal to that of the original resource."] - #[doc = ""] - #[doc = " - ::cudaResourceViewDesc::depth specifies the new depth of the texture data. This value has to be equal to that of the"] - #[doc = " original resource."] - #[doc = ""] - #[doc = " - ::cudaResourceViewDesc::firstMipmapLevel specifies the most detailed mipmap level. This will be the new mipmap level zero."] - #[doc = " For non-mipmapped resources, this value has to be zero.::cudaTextureDesc::minMipmapLevelClamp and ::cudaTextureDesc::maxMipmapLevelClamp"] - #[doc = " will be relative to this value. For ex., if the firstMipmapLevel is set to 2, and a minMipmapLevelClamp of 1.2 is specified,"] - #[doc = " then the actual minimum mipmap level clamp will be 3.2."] - #[doc = ""] - #[doc = " - ::cudaResourceViewDesc::lastMipmapLevel specifies the least detailed mipmap level. For non-mipmapped resources, this value"] - #[doc = " has to be zero."] - #[doc = ""] - #[doc = " - ::cudaResourceViewDesc::firstLayer specifies the first layer index for layered textures. This will be the new layer zero."] - #[doc = " For non-layered resources, this value has to be zero."] - #[doc = ""] - #[doc = " - ::cudaResourceViewDesc::lastLayer specifies the last layer index for layered textures. For non-layered resources,"] - #[doc = " this value has to be zero."] - #[doc = ""] - #[doc = ""] - #[doc = " \\param pTexObject - Texture object to create"] - #[doc = " \\param pResDesc - Resource descriptor"] - #[doc = " \\param pTexDesc - Texture descriptor"] - #[doc = " \\param pResViewDesc - Resource view descriptor"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDestroyTextureObject,"] - #[doc = " ::cuTexObjectCreate"] pub fn cudaCreateTextureObject( pTexObject: *mut cudaTextureObject_t, pResDesc: *const cudaResourceDesc, @@ -15084,337 +9127,51 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys a texture object"] - #[doc = ""] - #[doc = " Destroys the texture object specified by \\p texObject."] - #[doc = ""] - #[doc = " \\param texObject - Texture object to destroy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaCreateTextureObject,"] - #[doc = " ::cuTexObjectDestroy"] pub fn cudaDestroyTextureObject(texObject: cudaTextureObject_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a texture object's resource descriptor"] - #[doc = ""] - #[doc = " Returns the resource descriptor for the texture object specified by \\p texObject."] - #[doc = ""] - #[doc = " \\param pResDesc - Resource descriptor"] - #[doc = " \\param texObject - Texture object"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaCreateTextureObject,"] - #[doc = " ::cuTexObjectGetResourceDesc"] pub fn cudaGetTextureObjectResourceDesc( pResDesc: *mut cudaResourceDesc, texObject: cudaTextureObject_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a texture object's texture descriptor"] - #[doc = ""] - #[doc = " Returns the texture descriptor for the texture object specified by \\p texObject."] - #[doc = ""] - #[doc = " \\param pTexDesc - Texture descriptor"] - #[doc = " \\param texObject - Texture object"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaCreateTextureObject,"] - #[doc = " ::cuTexObjectGetTextureDesc"] pub fn cudaGetTextureObjectTextureDesc( pTexDesc: *mut cudaTextureDesc, texObject: cudaTextureObject_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a texture object's resource view descriptor"] - #[doc = ""] - #[doc = " Returns the resource view descriptor for the texture object specified by \\p texObject."] - #[doc = " If no resource view was specified, ::cudaErrorInvalidValue is returned."] - #[doc = ""] - #[doc = " \\param pResViewDesc - Resource view descriptor"] - #[doc = " \\param texObject - Texture object"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaCreateTextureObject,"] - #[doc = " ::cuTexObjectGetResourceViewDesc"] pub fn cudaGetTextureObjectResourceViewDesc( pResViewDesc: *mut cudaResourceViewDesc, texObject: cudaTextureObject_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a surface object"] - #[doc = ""] - #[doc = " Creates a surface object and returns it in \\p pSurfObject. \\p pResDesc describes"] - #[doc = " the data to perform surface load/stores on. ::cudaResourceDesc::resType must be"] - #[doc = " ::cudaResourceTypeArray and ::cudaResourceDesc::res::array::array"] - #[doc = " must be set to a valid CUDA array handle."] - #[doc = ""] - #[doc = " Surface objects are only supported on devices of compute capability 3.0 or higher."] - #[doc = " Additionally, a surface object is an opaque value, and, as such, should only be"] - #[doc = " accessed through CUDA API calls."] - #[doc = ""] - #[doc = " \\param pSurfObject - Surface object to create"] - #[doc = " \\param pResDesc - Resource descriptor"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidChannelDescriptor,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDestroySurfaceObject,"] - #[doc = " ::cuSurfObjectCreate"] pub fn cudaCreateSurfaceObject( pSurfObject: *mut cudaSurfaceObject_t, pResDesc: *const cudaResourceDesc, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys a surface object"] - #[doc = ""] - #[doc = " Destroys the surface object specified by \\p surfObject."] - #[doc = ""] - #[doc = " \\param surfObject - Surface object to destroy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaCreateSurfaceObject,"] - #[doc = " ::cuSurfObjectDestroy"] pub fn cudaDestroySurfaceObject(surfObject: cudaSurfaceObject_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a surface object's resource descriptor"] - #[doc = " Returns the resource descriptor for the surface object specified by \\p surfObject."] - #[doc = ""] - #[doc = " \\param pResDesc - Resource descriptor"] - #[doc = " \\param surfObject - Surface object"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaCreateSurfaceObject,"] - #[doc = " ::cuSurfObjectGetResourceDesc"] pub fn cudaGetSurfaceObjectResourceDesc( pResDesc: *mut cudaResourceDesc, surfObject: cudaSurfaceObject_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the latest version of CUDA supported by the driver"] - #[doc = ""] - #[doc = " Returns in \\p *driverVersion the latest version of CUDA supported by"] - #[doc = " the driver. The version is returned as (1000 × major + 10 × minor)."] - #[doc = " For example, CUDA 9.2 would be represented by 9020. If no driver is installed,"] - #[doc = " then 0 is returned as the driver version."] - #[doc = ""] - #[doc = " This function automatically returns ::cudaErrorInvalidValue"] - #[doc = " if \\p driverVersion is NULL."] - #[doc = ""] - #[doc = " \\param driverVersion - Returns the CUDA driver version."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaRuntimeGetVersion,"] - #[doc = " ::cuDriverGetVersion"] pub fn cudaDriverGetVersion(driverVersion: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the CUDA Runtime version"] - #[doc = ""] - #[doc = " Returns in \\p *runtimeVersion the version number of the current CUDA"] - #[doc = " Runtime instance. The version is returned as"] - #[doc = " (1000 × major + 10 × minor). For example,"] - #[doc = " CUDA 9.2 would be represented by 9020."] - #[doc = ""] - #[doc = " This function automatically returns ::cudaErrorInvalidValue if"] - #[doc = " the \\p runtimeVersion argument is NULL."] - #[doc = ""] - #[doc = " \\param runtimeVersion - Returns the CUDA Runtime version."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaDriverGetVersion,"] - #[doc = " ::cuDriverGetVersion"] pub fn cudaRuntimeGetVersion(runtimeVersion: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a graph"] - #[doc = ""] - #[doc = " Creates an empty graph, which is returned via \\p pGraph."] - #[doc = ""] - #[doc = " \\param pGraph - Returns newly created graph"] - #[doc = " \\param flags - Graph creation flags, must be 0"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphAddEmptyNode,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphAddMemsetNode,"] - #[doc = " ::cudaGraphInstantiate,"] - #[doc = " ::cudaGraphDestroy,"] - #[doc = " ::cudaGraphGetNodes,"] - #[doc = " ::cudaGraphGetRootNodes,"] - #[doc = " ::cudaGraphGetEdges,"] - #[doc = " ::cudaGraphClone"] pub fn cudaGraphCreate(pGraph: *mut cudaGraph_t, flags: ::libc::c_uint) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a kernel execution node and adds it to a graph"] - #[doc = ""] - #[doc = " Creates a new kernel execution node and adds it to \\p graph with \\p numDependencies"] - #[doc = " dependencies specified via \\p pDependencies and arguments specified in \\p pNodeParams."] - #[doc = " It is possible for \\p numDependencies to be 0, in which case the node will be placed"] - #[doc = " at the root of the graph. \\p pDependencies may not have any duplicate entries."] - #[doc = " A handle to the new node will be returned in \\p pGraphNode."] - #[doc = ""] - #[doc = " The cudaKernelNodeParams structure is defined as:"] - #[doc = ""] - #[doc = " \\code"] - #[doc = " struct cudaKernelNodeParams"] - #[doc = " {"] - #[doc = " void* func;"] - #[doc = " dim3 gridDim;"] - #[doc = " dim3 blockDim;"] - #[doc = " unsigned int sharedMemBytes;"] - #[doc = " void **kernelParams;"] - #[doc = " void **extra;"] - #[doc = " };"] - #[doc = " \\endcode"] - #[doc = ""] - #[doc = " When the graph is launched, the node will invoke kernel \\p func on a (\\p gridDim.x x"] - #[doc = " \\p gridDim.y x \\p gridDim.z) grid of blocks. Each block contains"] - #[doc = " (\\p blockDim.x x \\p blockDim.y x \\p blockDim.z) threads."] - #[doc = ""] - #[doc = " \\p sharedMem sets the amount of dynamic shared memory that will be"] - #[doc = " available to each thread block."] - #[doc = ""] - #[doc = " Kernel parameters to \\p func can be specified in one of two ways:"] - #[doc = ""] - #[doc = " 1) Kernel parameters can be specified via \\p kernelParams. If the kernel has N"] - #[doc = " parameters, then \\p kernelParams needs to be an array of N pointers. Each pointer,"] - #[doc = " from \\p kernelParams[0] to \\p kernelParams[N-1], points to the region of memory from which the actual"] - #[doc = " parameter will be copied. The number of kernel parameters and their offsets and sizes do not need"] - #[doc = " to be specified as that information is retrieved directly from the kernel's image."] - #[doc = ""] - #[doc = " 2) Kernel parameters can also be packaged by the application into a single buffer that is passed in"] - #[doc = " via \\p extra. This places the burden on the application of knowing each kernel"] - #[doc = " parameter's size and alignment/padding within the buffer. The \\p extra parameter exists"] - #[doc = " to allow this function to take additional less commonly used arguments. \\p extra specifies"] - #[doc = " a list of names of extra settings and their corresponding values. Each extra setting name is"] - #[doc = " immediately followed by the corresponding value. The list must be terminated with either NULL or"] - #[doc = " CU_LAUNCH_PARAM_END."] - #[doc = ""] - #[doc = " - ::CU_LAUNCH_PARAM_END, which indicates the end of the \\p extra"] - #[doc = " array;"] - #[doc = " - ::CU_LAUNCH_PARAM_BUFFER_POINTER, which specifies that the next"] - #[doc = " value in \\p extra will be a pointer to a buffer"] - #[doc = " containing all the kernel parameters for launching kernel"] - #[doc = " \\p func;"] - #[doc = " - ::CU_LAUNCH_PARAM_BUFFER_SIZE, which specifies that the next"] - #[doc = " value in \\p extra will be a pointer to a size_t"] - #[doc = " containing the size of the buffer specified with"] - #[doc = " ::CU_LAUNCH_PARAM_BUFFER_POINTER;"] - #[doc = ""] - #[doc = " The error ::cudaErrorInvalidValue will be returned if kernel parameters are specified with both"] - #[doc = " \\p kernelParams and \\p extra (i.e. both \\p kernelParams and"] - #[doc = " \\p extra are non-NULL)."] - #[doc = ""] - #[doc = " The \\p kernelParams or \\p extra array, as well as the argument values it points to,"] - #[doc = " are copied during this call."] - #[doc = ""] - #[doc = " \\note Kernels launched using graphs must not use texture and surface references. Reading or"] - #[doc = " writing through any texture or surface reference is undefined behavior."] - #[doc = " This restriction does not apply to texture and surface objects."] - #[doc = ""] - #[doc = " \\param pGraphNode - Returns newly created node"] - #[doc = " \\param graph - Graph to which to add the node"] - #[doc = " \\param pDependencies - Dependencies of the node"] - #[doc = " \\param numDependencies - Number of dependencies"] - #[doc = " \\param pNodeParams - Parameters for the GPU execution node"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDeviceFunction"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaLaunchKernel,"] - #[doc = " ::cudaGraphKernelNodeGetParams,"] - #[doc = " ::cudaGraphKernelNodeSetParams,"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphDestroyNode,"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphAddEmptyNode,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphAddMemsetNode"] pub fn cudaGraphAddKernelNode( pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, @@ -15424,107 +9181,24 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a kernel node's parameters"] - #[doc = ""] - #[doc = " Returns the parameters of kernel node \\p node in \\p pNodeParams."] - #[doc = " The \\p kernelParams or \\p extra array returned in \\p pNodeParams,"] - #[doc = " as well as the argument values it points to, are owned by the node."] - #[doc = " This memory remains valid until the node is destroyed or its"] - #[doc = " parameters are modified, and should not be modified"] - #[doc = " directly. Use ::cudaGraphKernelNodeSetParams to update the"] - #[doc = " parameters of this node."] - #[doc = ""] - #[doc = " The params will contain either \\p kernelParams or \\p extra,"] - #[doc = " according to which of these was most recently set on the node."] - #[doc = ""] - #[doc = " \\param node - Node to get the parameters for"] - #[doc = " \\param pNodeParams - Pointer to return the parameters"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDeviceFunction"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaLaunchKernel,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphKernelNodeSetParams"] pub fn cudaGraphKernelNodeGetParams( node: cudaGraphNode_t, pNodeParams: *mut cudaKernelNodeParams, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets a kernel node's parameters"] - #[doc = ""] - #[doc = " Sets the parameters of kernel node \\p node to \\p pNodeParams."] - #[doc = ""] - #[doc = " \\param node - Node to set the parameters for"] - #[doc = " \\param pNodeParams - Parameters to copy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaLaunchKernel,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphKernelNodeGetParams"] pub fn cudaGraphKernelNodeSetParams( node: cudaGraphNode_t, pNodeParams: *const cudaKernelNodeParams, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Copies attributes from source node to destination node."] - #[doc = ""] - #[doc = " Copies attributes from source node \\p src to destination node \\p dst."] - #[doc = " Both node must have the same context."] - #[doc = ""] - #[doc = " \\param[out] dst Destination node"] - #[doc = " \\param[in] src Source node"] - #[doc = " For list of attributes see ::cudaKernelNodeAttrID"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidContext"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaAccessPolicyWindow"] pub fn cudaGraphKernelNodeCopyAttributes( hSrc: cudaGraphNode_t, hDst: cudaGraphNode_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Queries node attribute."] - #[doc = ""] - #[doc = " Queries attribute \\p attr from node \\p hNode and stores it in corresponding"] - #[doc = " member of \\p value_out."] - #[doc = ""] - #[doc = " \\param[in] hNode"] - #[doc = " \\param[in] attr"] - #[doc = " \\param[out] value_out"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaAccessPolicyWindow"] pub fn cudaGraphKernelNodeGetAttribute( hNode: cudaGraphNode_t, attr: cudaKernelNodeAttrID, @@ -15532,23 +9206,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets node attribute."] - #[doc = ""] - #[doc = " Sets attribute \\p attr on node \\p hNode from corresponding attribute of"] - #[doc = " \\p value."] - #[doc = ""] - #[doc = " \\param[out] hNode"] - #[doc = " \\param[in] attr"] - #[doc = " \\param[out] value"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidResourceHandle"] - #[doc = " \\notefnerr"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaAccessPolicyWindow"] pub fn cudaGraphKernelNodeSetAttribute( hNode: cudaGraphNode_t, attr: cudaKernelNodeAttrID, @@ -15556,49 +9213,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a memcpy node and adds it to a graph"] - #[doc = ""] - #[doc = " Creates a new memcpy node and adds it to \\p graph with \\p numDependencies"] - #[doc = " dependencies specified via \\p pDependencies."] - #[doc = " It is possible for \\p numDependencies to be 0, in which case the node will be placed"] - #[doc = " at the root of the graph. \\p pDependencies may not have any duplicate entries."] - #[doc = " A handle to the new node will be returned in \\p pGraphNode."] - #[doc = ""] - #[doc = " When the graph is launched, the node will perform the memcpy described by \\p pCopyParams."] - #[doc = " See ::cudaMemcpy3D() for a description of the structure and its restrictions."] - #[doc = ""] - #[doc = " Memcpy nodes have some additional restrictions with regards to managed memory, if the"] - #[doc = " system contains at least one device which has a zero value for the device attribute"] - #[doc = " ::cudaDevAttrConcurrentManagedAccess."] - #[doc = ""] - #[doc = " \\param pGraphNode - Returns newly created node"] - #[doc = " \\param graph - Graph to which to add the node"] - #[doc = " \\param pDependencies - Dependencies of the node"] - #[doc = " \\param numDependencies - Number of dependencies"] - #[doc = " \\param pCopyParams - Parameters for the memory copy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMemcpy3D,"] - #[doc = " ::cudaGraphAddMemcpyNodeToSymbol,"] - #[doc = " ::cudaGraphAddMemcpyNodeFromSymbol,"] - #[doc = " ::cudaGraphAddMemcpyNode1D,"] - #[doc = " ::cudaGraphMemcpyNodeGetParams,"] - #[doc = " ::cudaGraphMemcpyNodeSetParams,"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphDestroyNode,"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphAddEmptyNode,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphAddMemsetNode"] pub fn cudaGraphAddMemcpyNode( pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, @@ -15646,53 +9260,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a memcpy node's parameters"] - #[doc = ""] - #[doc = " Returns the parameters of memcpy node \\p node in \\p pNodeParams."] - #[doc = ""] - #[doc = " \\param node - Node to get the parameters for"] - #[doc = " \\param pNodeParams - Pointer to return the parameters"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMemcpy3D,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphMemcpyNodeSetParams"] pub fn cudaGraphMemcpyNodeGetParams( node: cudaGraphNode_t, pNodeParams: *mut cudaMemcpy3DParms, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets a memcpy node's parameters"] - #[doc = ""] - #[doc = " Sets the parameters of memcpy node \\p node to \\p pNodeParams."] - #[doc = ""] - #[doc = " \\param node - Node to set the parameters for"] - #[doc = " \\param pNodeParams - Parameters to copy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMemcpy3D,"] - #[doc = " ::cudaGraphMemcpyNodeSetParamsToSymbol,"] - #[doc = " ::cudaGraphMemcpyNodeSetParamsFromSymbol,"] - #[doc = " ::cudaGraphMemcpyNodeSetParams1D,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphMemcpyNodeGetParams"] pub fn cudaGraphMemcpyNodeSetParams( node: cudaGraphNode_t, pNodeParams: *const cudaMemcpy3DParms, @@ -15728,43 +9301,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a memset node and adds it to a graph"] - #[doc = ""] - #[doc = " Creates a new memset node and adds it to \\p graph with \\p numDependencies"] - #[doc = " dependencies specified via \\p pDependencies."] - #[doc = " It is possible for \\p numDependencies to be 0, in which case the node will be placed"] - #[doc = " at the root of the graph. \\p pDependencies may not have any duplicate entries."] - #[doc = " A handle to the new node will be returned in \\p pGraphNode."] - #[doc = ""] - #[doc = " The element size must be 1, 2, or 4 bytes."] - #[doc = " When the graph is launched, the node will perform the memset described by \\p pMemsetParams."] - #[doc = ""] - #[doc = " \\param pGraphNode - Returns newly created node"] - #[doc = " \\param graph - Graph to which to add the node"] - #[doc = " \\param pDependencies - Dependencies of the node"] - #[doc = " \\param numDependencies - Number of dependencies"] - #[doc = " \\param pMemsetParams - Parameters for the memory set"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorInvalidDevice"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMemset2D,"] - #[doc = " ::cudaGraphMemsetNodeGetParams,"] - #[doc = " ::cudaGraphMemsetNodeSetParams,"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphDestroyNode,"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphAddEmptyNode,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphAddMemcpyNode"] pub fn cudaGraphAddMemsetNode( pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, @@ -15774,93 +9310,18 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a memset node's parameters"] - #[doc = ""] - #[doc = " Returns the parameters of memset node \\p node in \\p pNodeParams."] - #[doc = ""] - #[doc = " \\param node - Node to get the parameters for"] - #[doc = " \\param pNodeParams - Pointer to return the parameters"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMemset2D,"] - #[doc = " ::cudaGraphAddMemsetNode,"] - #[doc = " ::cudaGraphMemsetNodeSetParams"] pub fn cudaGraphMemsetNodeGetParams( node: cudaGraphNode_t, pNodeParams: *mut cudaMemsetParams, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets a memset node's parameters"] - #[doc = ""] - #[doc = " Sets the parameters of memset node \\p node to \\p pNodeParams."] - #[doc = ""] - #[doc = " \\param node - Node to set the parameters for"] - #[doc = " \\param pNodeParams - Parameters to copy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaMemset2D,"] - #[doc = " ::cudaGraphAddMemsetNode,"] - #[doc = " ::cudaGraphMemsetNodeGetParams"] pub fn cudaGraphMemsetNodeSetParams( node: cudaGraphNode_t, pNodeParams: *const cudaMemsetParams, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a host execution node and adds it to a graph"] - #[doc = ""] - #[doc = " Creates a new CPU execution node and adds it to \\p graph with \\p numDependencies"] - #[doc = " dependencies specified via \\p pDependencies and arguments specified in \\p pNodeParams."] - #[doc = " It is possible for \\p numDependencies to be 0, in which case the node will be placed"] - #[doc = " at the root of the graph. \\p pDependencies may not have any duplicate entries."] - #[doc = " A handle to the new node will be returned in \\p pGraphNode."] - #[doc = ""] - #[doc = " When the graph is launched, the node will invoke the specified CPU function."] - #[doc = " Host nodes are not supported under MPS with pre-Volta GPUs."] - #[doc = ""] - #[doc = " \\param pGraphNode - Returns newly created node"] - #[doc = " \\param graph - Graph to which to add the node"] - #[doc = " \\param pDependencies - Dependencies of the node"] - #[doc = " \\param numDependencies - Number of dependencies"] - #[doc = " \\param pNodeParams - Parameters for the host node"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaLaunchHostFunc,"] - #[doc = " ::cudaGraphHostNodeGetParams,"] - #[doc = " ::cudaGraphHostNodeSetParams,"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphDestroyNode,"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphAddEmptyNode,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphAddMemsetNode"] pub fn cudaGraphAddHostNode( pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, @@ -15870,92 +9331,18 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a host node's parameters"] - #[doc = ""] - #[doc = " Returns the parameters of host node \\p node in \\p pNodeParams."] - #[doc = ""] - #[doc = " \\param node - Node to get the parameters for"] - #[doc = " \\param pNodeParams - Pointer to return the parameters"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaLaunchHostFunc,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphHostNodeSetParams"] pub fn cudaGraphHostNodeGetParams( node: cudaGraphNode_t, pNodeParams: *mut cudaHostNodeParams, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets a host node's parameters"] - #[doc = ""] - #[doc = " Sets the parameters of host node \\p node to \\p nodeParams."] - #[doc = ""] - #[doc = " \\param node - Node to set the parameters for"] - #[doc = " \\param pNodeParams - Parameters to copy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaLaunchHostFunc,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphHostNodeGetParams"] pub fn cudaGraphHostNodeSetParams( node: cudaGraphNode_t, pNodeParams: *const cudaHostNodeParams, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates a child graph node and adds it to a graph"] - #[doc = ""] - #[doc = " Creates a new node which executes an embedded graph, and adds it to \\p graph with"] - #[doc = " \\p numDependencies dependencies specified via \\p pDependencies."] - #[doc = " It is possible for \\p numDependencies to be 0, in which case the node will be placed"] - #[doc = " at the root of the graph. \\p pDependencies may not have any duplicate entries."] - #[doc = " A handle to the new node will be returned in \\p pGraphNode."] - #[doc = ""] - #[doc = " If \\p hGraph contains allocation or free nodes, this call will return an error."] - #[doc = ""] - #[doc = " The node executes an embedded child graph. The child graph is cloned in this call."] - #[doc = ""] - #[doc = " \\param pGraphNode - Returns newly created node"] - #[doc = " \\param graph - Graph to which to add the node"] - #[doc = " \\param pDependencies - Dependencies of the node"] - #[doc = " \\param numDependencies - Number of dependencies"] - #[doc = " \\param childGraph - The graph to clone into this node"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphChildGraphNodeGetGraph,"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphDestroyNode,"] - #[doc = " ::cudaGraphAddEmptyNode,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphAddMemsetNode,"] - #[doc = " ::cudaGraphClone"] pub fn cudaGraphAddChildGraphNode( pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, @@ -15965,68 +9352,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Gets a handle to the embedded graph of a child graph node"] - #[doc = ""] - #[doc = " Gets a handle to the embedded graph in a child graph node. This call"] - #[doc = " does not clone the graph. Changes to the graph will be reflected in"] - #[doc = " the node, and the node retains ownership of the graph."] - #[doc = ""] - #[doc = " Allocation and free nodes cannot be added to the returned graph."] - #[doc = " Attempting to do so will return an error."] - #[doc = ""] - #[doc = " \\param node - Node to get the embedded graph for"] - #[doc = " \\param pGraph - Location to store a handle to the graph"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphNodeFindInClone"] pub fn cudaGraphChildGraphNodeGetGraph( node: cudaGraphNode_t, pGraph: *mut cudaGraph_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates an empty node and adds it to a graph"] - #[doc = ""] - #[doc = " Creates a new node which performs no operation, and adds it to \\p graph with"] - #[doc = " \\p numDependencies dependencies specified via \\p pDependencies."] - #[doc = " It is possible for \\p numDependencies to be 0, in which case the node will be placed"] - #[doc = " at the root of the graph. \\p pDependencies may not have any duplicate entries."] - #[doc = " A handle to the new node will be returned in \\p pGraphNode."] - #[doc = ""] - #[doc = " An empty node performs no operation during execution, but can be used for"] - #[doc = " transitive ordering. For example, a phased execution graph with 2 groups of n"] - #[doc = " nodes with a barrier between them can be represented using an empty node and"] - #[doc = " 2*n dependency edges, rather than no empty node and n^2 dependency edges."] - #[doc = ""] - #[doc = " \\param pGraphNode - Returns newly created node"] - #[doc = " \\param graph - Graph to which to add the node"] - #[doc = " \\param pDependencies - Dependencies of the node"] - #[doc = " \\param numDependencies - Number of dependencies"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphDestroyNode,"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphAddMemsetNode"] pub fn cudaGraphAddEmptyNode( pGraphNode: *mut cudaGraphNode_t, graph: cudaGraph_t, @@ -16164,57 +9495,10 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Clones a graph"] - #[doc = ""] - #[doc = " This function creates a copy of \\p originalGraph and returns it in \\p pGraphClone."] - #[doc = " All parameters are copied into the cloned graph. The original graph may be modified"] - #[doc = " after this call without affecting the clone."] - #[doc = ""] - #[doc = " Child graph nodes in the original graph are recursively copied into the clone."] - #[doc = ""] - #[doc = " \\param pGraphClone - Returns newly created cloned graph"] - #[doc = " \\param originalGraph - Graph to clone"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorMemoryAllocation"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphNodeFindInClone"] pub fn cudaGraphClone(pGraphClone: *mut cudaGraph_t, originalGraph: cudaGraph_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Finds a cloned version of a node"] - #[doc = ""] - #[doc = " This function returns the node in \\p clonedGraph corresponding to \\p originalNode"] - #[doc = " in the original graph."] - #[doc = ""] - #[doc = " \\p clonedGraph must have been cloned from \\p originalGraph via ::cudaGraphClone."] - #[doc = " \\p originalNode must have been in \\p originalGraph at the time of the call to"] - #[doc = " ::cudaGraphClone, and the corresponding cloned node in \\p clonedGraph must not have"] - #[doc = " been removed. The cloned node is then returned via \\p pClonedNode."] - #[doc = ""] - #[doc = " \\param pNode - Returns handle to the cloned node"] - #[doc = " \\param originalNode - Handle to the original node"] - #[doc = " \\param clonedGraph - Cloned graph to query"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphClone"] pub fn cudaGraphNodeFindInClone( pNode: *mut cudaGraphNode_t, originalNode: cudaGraphNode_t, @@ -16222,66 +9506,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a node's type"] - #[doc = ""] - #[doc = " Returns the node type of \\p node in \\p pType."] - #[doc = ""] - #[doc = " \\param node - Node to query"] - #[doc = " \\param pType - Pointer to return the node type"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphGetNodes,"] - #[doc = " ::cudaGraphGetRootNodes,"] - #[doc = " ::cudaGraphChildGraphNodeGetGraph,"] - #[doc = " ::cudaGraphKernelNodeGetParams,"] - #[doc = " ::cudaGraphKernelNodeSetParams,"] - #[doc = " ::cudaGraphHostNodeGetParams,"] - #[doc = " ::cudaGraphHostNodeSetParams,"] - #[doc = " ::cudaGraphMemcpyNodeGetParams,"] - #[doc = " ::cudaGraphMemcpyNodeSetParams,"] - #[doc = " ::cudaGraphMemsetNodeGetParams,"] - #[doc = " ::cudaGraphMemsetNodeSetParams"] pub fn cudaGraphNodeGetType( node: cudaGraphNode_t, pType: *mut cudaGraphNodeType, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a graph's nodes"] - #[doc = ""] - #[doc = " Returns a list of \\p graph's nodes. \\p nodes may be NULL, in which case this"] - #[doc = " function will return the number of nodes in \\p numNodes. Otherwise,"] - #[doc = " \\p numNodes entries will be filled in. If \\p numNodes is higher than the actual"] - #[doc = " number of nodes, the remaining entries in \\p nodes will be set to NULL, and the"] - #[doc = " number of nodes actually obtained will be returned in \\p numNodes."] - #[doc = ""] - #[doc = " \\param graph - Graph to query"] - #[doc = " \\param nodes - Pointer to return the nodes"] - #[doc = " \\param numNodes - See description"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphGetRootNodes,"] - #[doc = " ::cudaGraphGetEdges,"] - #[doc = " ::cudaGraphNodeGetType,"] - #[doc = " ::cudaGraphNodeGetDependencies,"] - #[doc = " ::cudaGraphNodeGetDependentNodes"] pub fn cudaGraphGetNodes( graph: cudaGraph_t, nodes: *mut cudaGraphNode_t, @@ -16289,33 +9519,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a graph's root nodes"] - #[doc = ""] - #[doc = " Returns a list of \\p graph's root nodes. \\p pRootNodes may be NULL, in which case this"] - #[doc = " function will return the number of root nodes in \\p pNumRootNodes. Otherwise,"] - #[doc = " \\p pNumRootNodes entries will be filled in. If \\p pNumRootNodes is higher than the actual"] - #[doc = " number of root nodes, the remaining entries in \\p pRootNodes will be set to NULL, and the"] - #[doc = " number of nodes actually obtained will be returned in \\p pNumRootNodes."] - #[doc = ""] - #[doc = " \\param graph - Graph to query"] - #[doc = " \\param pRootNodes - Pointer to return the root nodes"] - #[doc = " \\param pNumRootNodes - See description"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphGetNodes,"] - #[doc = " ::cudaGraphGetEdges,"] - #[doc = " ::cudaGraphNodeGetType,"] - #[doc = " ::cudaGraphNodeGetDependencies,"] - #[doc = " ::cudaGraphNodeGetDependentNodes"] pub fn cudaGraphGetRootNodes( graph: cudaGraph_t, pRootNodes: *mut cudaGraphNode_t, @@ -16323,36 +9526,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a graph's dependency edges"] - #[doc = ""] - #[doc = " Returns a list of \\p graph's dependency edges. Edges are returned via corresponding"] - #[doc = " indices in \\p from and \\p to; that is, the node in \\p to[i] has a dependency on the"] - #[doc = " node in \\p from[i]. \\p from and \\p to may both be NULL, in which"] - #[doc = " case this function only returns the number of edges in \\p numEdges. Otherwise,"] - #[doc = " \\p numEdges entries will be filled in. If \\p numEdges is higher than the actual"] - #[doc = " number of edges, the remaining entries in \\p from and \\p to will be set to NULL, and"] - #[doc = " the number of edges actually returned will be written to \\p numEdges."] - #[doc = ""] - #[doc = " \\param graph - Graph to get the edges from"] - #[doc = " \\param from - Location to return edge endpoints"] - #[doc = " \\param to - Location to return edge endpoints"] - #[doc = " \\param numEdges - See description"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphGetNodes,"] - #[doc = " ::cudaGraphGetRootNodes,"] - #[doc = " ::cudaGraphAddDependencies,"] - #[doc = " ::cudaGraphRemoveDependencies,"] - #[doc = " ::cudaGraphNodeGetDependencies,"] - #[doc = " ::cudaGraphNodeGetDependentNodes"] pub fn cudaGraphGetEdges( graph: cudaGraph_t, from: *mut cudaGraphNode_t, @@ -16361,33 +9534,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a node's dependencies"] - #[doc = ""] - #[doc = " Returns a list of \\p node's dependencies. \\p pDependencies may be NULL, in which case this"] - #[doc = " function will return the number of dependencies in \\p pNumDependencies. Otherwise,"] - #[doc = " \\p pNumDependencies entries will be filled in. If \\p pNumDependencies is higher than the actual"] - #[doc = " number of dependencies, the remaining entries in \\p pDependencies will be set to NULL, and the"] - #[doc = " number of nodes actually obtained will be returned in \\p pNumDependencies."] - #[doc = ""] - #[doc = " \\param node - Node to query"] - #[doc = " \\param pDependencies - Pointer to return the dependencies"] - #[doc = " \\param pNumDependencies - See description"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphNodeGetDependentNodes,"] - #[doc = " ::cudaGraphGetNodes,"] - #[doc = " ::cudaGraphGetRootNodes,"] - #[doc = " ::cudaGraphGetEdges,"] - #[doc = " ::cudaGraphAddDependencies,"] - #[doc = " ::cudaGraphRemoveDependencies"] pub fn cudaGraphNodeGetDependencies( node: cudaGraphNode_t, pDependencies: *mut cudaGraphNode_t, @@ -16395,34 +9541,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns a node's dependent nodes"] - #[doc = ""] - #[doc = " Returns a list of \\p node's dependent nodes. \\p pDependentNodes may be NULL, in which"] - #[doc = " case this function will return the number of dependent nodes in \\p pNumDependentNodes."] - #[doc = " Otherwise, \\p pNumDependentNodes entries will be filled in. If \\p pNumDependentNodes is"] - #[doc = " higher than the actual number of dependent nodes, the remaining entries in"] - #[doc = " \\p pDependentNodes will be set to NULL, and the number of nodes actually obtained will"] - #[doc = " be returned in \\p pNumDependentNodes."] - #[doc = ""] - #[doc = " \\param node - Node to query"] - #[doc = " \\param pDependentNodes - Pointer to return the dependent nodes"] - #[doc = " \\param pNumDependentNodes - See description"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphNodeGetDependencies,"] - #[doc = " ::cudaGraphGetNodes,"] - #[doc = " ::cudaGraphGetRootNodes,"] - #[doc = " ::cudaGraphGetEdges,"] - #[doc = " ::cudaGraphAddDependencies,"] - #[doc = " ::cudaGraphRemoveDependencies"] pub fn cudaGraphNodeGetDependentNodes( node: cudaGraphNode_t, pDependentNodes: *mut cudaGraphNode_t, @@ -16430,33 +9548,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Adds dependency edges to a graph."] - #[doc = ""] - #[doc = " The number of dependencies to be added is defined by \\p numDependencies"] - #[doc = " Elements in \\p pFrom and \\p pTo at corresponding indices define a dependency."] - #[doc = " Each node in \\p pFrom and \\p pTo must belong to \\p graph."] - #[doc = ""] - #[doc = " If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored."] - #[doc = " Specifying an existing dependency will return an error."] - #[doc = ""] - #[doc = " \\param graph - Graph to which dependencies are added"] - #[doc = " \\param from - Array of nodes that provide the dependencies"] - #[doc = " \\param to - Array of dependent nodes"] - #[doc = " \\param numDependencies - Number of dependencies to be added"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphRemoveDependencies,"] - #[doc = " ::cudaGraphGetEdges,"] - #[doc = " ::cudaGraphNodeGetDependencies,"] - #[doc = " ::cudaGraphNodeGetDependentNodes"] pub fn cudaGraphAddDependencies( graph: cudaGraph_t, from: *const cudaGraphNode_t, @@ -16465,33 +9556,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Removes dependency edges from a graph."] - #[doc = ""] - #[doc = " The number of \\p pDependencies to be removed is defined by \\p numDependencies."] - #[doc = " Elements in \\p pFrom and \\p pTo at corresponding indices define a dependency."] - #[doc = " Each node in \\p pFrom and \\p pTo must belong to \\p graph."] - #[doc = ""] - #[doc = " If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored."] - #[doc = " Specifying a non-existing dependency will return an error."] - #[doc = ""] - #[doc = " \\param graph - Graph from which to remove dependencies"] - #[doc = " \\param from - Array of nodes that provide the dependencies"] - #[doc = " \\param to - Array of dependent nodes"] - #[doc = " \\param numDependencies - Number of dependencies to be removed"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddDependencies,"] - #[doc = " ::cudaGraphGetEdges,"] - #[doc = " ::cudaGraphNodeGetDependencies,"] - #[doc = " ::cudaGraphNodeGetDependentNodes"] pub fn cudaGraphRemoveDependencies( graph: cudaGraph_t, from: *const cudaGraphNode_t, @@ -16500,69 +9564,9 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Remove a node from the graph"] - #[doc = ""] - #[doc = " Removes \\p node from its graph. This operation also severs any dependencies of other nodes"] - #[doc = " on \\p node and vice versa."] - #[doc = ""] - #[doc = " Dependencies cannot be removed from graphs which contain allocation or free nodes."] - #[doc = " Any attempt to do so will return an error."] - #[doc = ""] - #[doc = " \\param node - Node to remove"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddChildGraphNode,"] - #[doc = " ::cudaGraphAddEmptyNode,"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphAddMemsetNode"] pub fn cudaGraphDestroyNode(node: cudaGraphNode_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Creates an executable graph from a graph"] - #[doc = ""] - #[doc = " Instantiates \\p graph as an executable graph. The graph is validated for any"] - #[doc = " structural constraints or intra-node constraints which were not previously"] - #[doc = " validated. If instantiation is successful, a handle to the instantiated graph"] - #[doc = " is returned in \\p pGraphExec."] - #[doc = ""] - #[doc = " If there are any errors, diagnostic information may be returned in \\p pErrorNode and"] - #[doc = " \\p pLogBuffer. This is the primary way to inspect instantiation errors. The output"] - #[doc = " will be null terminated unless the diagnostics overflow"] - #[doc = " the buffer. In this case, they will be truncated, and the last byte can be"] - #[doc = " inspected to determine if truncation occurred."] - #[doc = ""] - #[doc = " \\param pGraphExec - Returns instantiated graph"] - #[doc = " \\param graph - Graph to instantiate"] - #[doc = " \\param pErrorNode - In case of an instantiation error, this may be modified to"] - #[doc = " indicate a node contributing to the error"] - #[doc = " \\param pLogBuffer - A character buffer to store diagnostic messages"] - #[doc = " \\param bufferSize - Size of the log buffer in bytes"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphInstantiateWithFlags,"] - #[doc = " ::cudaGraphCreate,"] - #[doc = " ::cudaGraphUpload,"] - #[doc = " ::cudaGraphLaunch,"] - #[doc = " ::cudaGraphExecDestroy"] pub fn cudaGraphInstantiate( pGraphExec: *mut cudaGraphExec_t, graph: cudaGraph_t, @@ -16579,45 +9583,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the parameters for a kernel node in the given graphExec"] - #[doc = ""] - #[doc = " Sets the parameters of a kernel node in an executable graph \\p hGraphExec."] - #[doc = " The node is identified by the corresponding node \\p node in the"] - #[doc = " non-executable graph, from which the executable graph was instantiated."] - #[doc = ""] - #[doc = " \\p node must not have been removed from the original graph. The \\p func field"] - #[doc = " of \\p nodeParams cannot be modified and must match the original value."] - #[doc = " All other values can be modified."] - #[doc = ""] - #[doc = " The modifications only affect future launches of \\p hGraphExec. Already"] - #[doc = " enqueued or running launches of \\p hGraphExec are not affected by this call."] - #[doc = " \\p node is also not modified by this call."] - #[doc = ""] - #[doc = " \\param hGraphExec - The executable graph in which to set the specified node"] - #[doc = " \\param node - kernel node from the graph from which graphExec was instantiated"] - #[doc = " \\param pNodeParams - Updated Parameters to set"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddKernelNode,"] - #[doc = " ::cudaGraphKernelNodeSetParams,"] - #[doc = " ::cudaGraphExecMemcpyNodeSetParams,"] - #[doc = " ::cudaGraphExecMemsetNodeSetParams,"] - #[doc = " ::cudaGraphExecHostNodeSetParams,"] - #[doc = " ::cudaGraphExecChildGraphNodeSetParams,"] - #[doc = " ::cudaGraphExecEventRecordNodeSetEvent,"] - #[doc = " ::cudaGraphExecEventWaitNodeSetEvent,"] - #[doc = " ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,"] - #[doc = " ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,"] - #[doc = " ::cudaGraphExecUpdate,"] - #[doc = " ::cudaGraphInstantiate"] pub fn cudaGraphExecKernelNodeSetParams( hGraphExec: cudaGraphExec_t, node: cudaGraphNode_t, @@ -16625,52 +9590,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the parameters for a memcpy node in the given graphExec."] - #[doc = ""] - #[doc = " Updates the work represented by \\p node in \\p hGraphExec as though \\p node had"] - #[doc = " contained \\p pNodeParams at instantiation. \\p node must remain in the graph which was"] - #[doc = " used to instantiate \\p hGraphExec. Changed edges to and from \\p node are ignored."] - #[doc = ""] - #[doc = " The source and destination memory in \\p pNodeParams must be allocated from the same"] - #[doc = " contexts as the original source and destination memory. Both the instantiation-time"] - #[doc = " memory operands and the memory operands in \\p pNodeParams must be 1-dimensional."] - #[doc = " Zero-length operations are not supported."] - #[doc = ""] - #[doc = " The modifications only affect future launches of \\p hGraphExec. Already enqueued"] - #[doc = " or running launches of \\p hGraphExec are not affected by this call. \\p node is also"] - #[doc = " not modified by this call."] - #[doc = ""] - #[doc = " Returns ::cudaErrorInvalidValue if the memory operands' mappings changed or"] - #[doc = " either the original or new memory operands are multidimensional."] - #[doc = ""] - #[doc = " \\param hGraphExec - The executable graph in which to set the specified node"] - #[doc = " \\param node - Memcpy node from the graph which was used to instantiate graphExec"] - #[doc = " \\param pNodeParams - Updated Parameters to set"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddMemcpyNode,"] - #[doc = " ::cudaGraphMemcpyNodeSetParams,"] - #[doc = " ::cudaGraphExecMemcpyNodeSetParamsToSymbol,"] - #[doc = " ::cudaGraphExecMemcpyNodeSetParamsFromSymbol,"] - #[doc = " ::cudaGraphExecMemcpyNodeSetParams1D,"] - #[doc = " ::cudaGraphExecKernelNodeSetParams,"] - #[doc = " ::cudaGraphExecMemsetNodeSetParams,"] - #[doc = " ::cudaGraphExecHostNodeSetParams,"] - #[doc = " ::cudaGraphExecChildGraphNodeSetParams,"] - #[doc = " ::cudaGraphExecEventRecordNodeSetEvent,"] - #[doc = " ::cudaGraphExecEventWaitNodeSetEvent,"] - #[doc = " ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,"] - #[doc = " ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,"] - #[doc = " ::cudaGraphExecUpdate,"] - #[doc = " ::cudaGraphInstantiate"] pub fn cudaGraphExecMemcpyNodeSetParams( hGraphExec: cudaGraphExec_t, node: cudaGraphNode_t, @@ -16710,49 +9629,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the parameters for a memset node in the given graphExec."] - #[doc = ""] - #[doc = " Updates the work represented by \\p node in \\p hGraphExec as though \\p node had"] - #[doc = " contained \\p pNodeParams at instantiation. \\p node must remain in the graph which was"] - #[doc = " used to instantiate \\p hGraphExec. Changed edges to and from \\p node are ignored."] - #[doc = ""] - #[doc = " The destination memory in \\p pNodeParams must be allocated from the same"] - #[doc = " context as the original destination memory. Both the instantiation-time"] - #[doc = " memory operand and the memory operand in \\p pNodeParams must be 1-dimensional."] - #[doc = " Zero-length operations are not supported."] - #[doc = ""] - #[doc = " The modifications only affect future launches of \\p hGraphExec. Already enqueued"] - #[doc = " or running launches of \\p hGraphExec are not affected by this call. \\p node is also"] - #[doc = " not modified by this call."] - #[doc = ""] - #[doc = " Returns cudaErrorInvalidValue if the memory operand's mappings changed or"] - #[doc = " either the original or new memory operand are multidimensional."] - #[doc = ""] - #[doc = " \\param hGraphExec - The executable graph in which to set the specified node"] - #[doc = " \\param node - Memset node from the graph which was used to instantiate graphExec"] - #[doc = " \\param pNodeParams - Updated Parameters to set"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddMemsetNode,"] - #[doc = " ::cudaGraphMemsetNodeSetParams,"] - #[doc = " ::cudaGraphExecKernelNodeSetParams,"] - #[doc = " ::cudaGraphExecMemcpyNodeSetParams,"] - #[doc = " ::cudaGraphExecHostNodeSetParams,"] - #[doc = " ::cudaGraphExecChildGraphNodeSetParams,"] - #[doc = " ::cudaGraphExecEventRecordNodeSetEvent,"] - #[doc = " ::cudaGraphExecEventWaitNodeSetEvent,"] - #[doc = " ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,"] - #[doc = " ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,"] - #[doc = " ::cudaGraphExecUpdate,"] - #[doc = " ::cudaGraphInstantiate"] pub fn cudaGraphExecMemsetNodeSetParams( hGraphExec: cudaGraphExec_t, node: cudaGraphNode_t, @@ -16760,41 +9636,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Sets the parameters for a host node in the given graphExec."] - #[doc = ""] - #[doc = " Updates the work represented by \\p node in \\p hGraphExec as though \\p node had"] - #[doc = " contained \\p pNodeParams at instantiation. \\p node must remain in the graph which was"] - #[doc = " used to instantiate \\p hGraphExec. Changed edges to and from \\p node are ignored."] - #[doc = ""] - #[doc = " The modifications only affect future launches of \\p hGraphExec. Already enqueued"] - #[doc = " or running launches of \\p hGraphExec are not affected by this call. \\p node is also"] - #[doc = " not modified by this call."] - #[doc = ""] - #[doc = " \\param hGraphExec - The executable graph in which to set the specified node"] - #[doc = " \\param node - Host node from the graph which was used to instantiate graphExec"] - #[doc = " \\param pNodeParams - Updated Parameters to set"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphAddHostNode,"] - #[doc = " ::cudaGraphHostNodeSetParams,"] - #[doc = " ::cudaGraphExecKernelNodeSetParams,"] - #[doc = " ::cudaGraphExecMemcpyNodeSetParams,"] - #[doc = " ::cudaGraphExecMemsetNodeSetParams,"] - #[doc = " ::cudaGraphExecChildGraphNodeSetParams,"] - #[doc = " ::cudaGraphExecEventRecordNodeSetEvent,"] - #[doc = " ::cudaGraphExecEventWaitNodeSetEvent,"] - #[doc = " ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,"] - #[doc = " ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,"] - #[doc = " ::cudaGraphExecUpdate,"] - #[doc = " ::cudaGraphInstantiate"] pub fn cudaGraphExecHostNodeSetParams( hGraphExec: cudaGraphExec_t, node: cudaGraphNode_t, @@ -16837,76 +9678,20 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Check whether an executable graph can be updated with a graph and perform the update if possible"] - #[doc = ""] - #[doc = " Updates the node parameters in the instantiated graph specified by \\p hGraphExec with the"] - #[doc = " node parameters in a topologically identical graph specified by \\p hGraph."] - #[doc = ""] - #[doc = " Limitations:"] - #[doc = ""] - #[doc = " - Kernel nodes:"] - #[doc = " - The owning context of the function cannot change."] - #[doc = " - A node whose function originally did not use CUDA dynamic parallelism cannot be updated"] - #[doc = " to a function which uses CDP"] - #[doc = " - Memset and memcpy nodes:"] - #[doc = " - The CUDA device(s) to which the operand(s) was allocated/mapped cannot change."] - #[doc = " - The source/destination memory must be allocated from the same contexts as the original"] - #[doc = " source/destination memory."] - #[doc = " - Only 1D memsets can be changed."] - #[doc = " - Additional memcpy node restrictions:"] - #[doc = " - Changing either the source or destination memory type(i.e. CU_MEMORYTYPE_DEVICE,"] - #[doc = " CU_MEMORYTYPE_ARRAY, etc.) is not supported."] - #[doc = ""] - #[doc = " Note: The API may add further restrictions in future releases. The return code should always be checked."] - #[doc = ""] - #[doc = " cudaGraphExecUpdate sets \\p updateResult_out to cudaGraphExecUpdateErrorTopologyChanged under"] - #[doc = " the following conditions:"] - #[doc = ""] - #[doc = " - The count of nodes directly in \\p hGraphExec and \\p hGraph differ, in which case \\p hErrorNode_out"] - #[doc = " is NULL."] - #[doc = " - A node is deleted in \\p hGraph but not not its pair from \\p hGraphExec, in which case \\p hErrorNode_out"] - #[doc = " is NULL."] - #[doc = " - A node is deleted in \\p hGraphExec but not its pair from \\p hGraph, in which case \\p hErrorNode_out is"] - #[doc = " the pairless node from \\p hGraph."] - #[doc = " - The dependent nodes of a pair differ, in which case \\p hErrorNode_out is the node from \\p hGraph."] - #[doc = ""] - #[doc = " cudaGraphExecUpdate sets \\p updateResult_out to:"] - #[doc = " - cudaGraphExecUpdateError if passed an invalid value."] - #[doc = " - cudaGraphExecUpdateErrorTopologyChanged if the graph topology changed"] - #[doc = " - cudaGraphExecUpdateErrorNodeTypeChanged if the type of a node changed, in which case"] - #[doc = " \\p hErrorNode_out is set to the node from \\p hGraph."] - #[doc = " - cudaGraphExecUpdateErrorFunctionChanged if the function of a kernel node changed (CUDA driver < 11.2)"] - #[doc = " - cudaGraphExecUpdateErrorUnsupportedFunctionChange if the func field of a kernel changed in an"] - #[doc = " unsupported way(see note above), in which case \\p hErrorNode_out is set to the node from \\p hGraph"] - #[doc = " - cudaGraphExecUpdateErrorParametersChanged if any parameters to a node changed in a way"] - #[doc = " that is not supported, in which case \\p hErrorNode_out is set to the node from \\p hGraph"] - #[doc = " - cudaGraphExecUpdateErrorNotSupported if something about a node is unsupported, like"] - #[doc = " the node's type or configuration, in which case \\p hErrorNode_out is set to the node from \\p hGraph"] - #[doc = ""] - #[doc = " If \\p updateResult_out isn't set in one of the situations described above, the update check passes"] - #[doc = " and cudaGraphExecUpdate updates \\p hGraphExec to match the contents of \\p hGraph. If an error happens"] - #[doc = " during the update, \\p updateResult_out will be set to cudaGraphExecUpdateError; otherwise,"] - #[doc = " \\p updateResult_out is set to cudaGraphExecUpdateSuccess."] - #[doc = ""] - #[doc = " cudaGraphExecUpdate returns cudaSuccess when the updated was performed successfully. It returns"] - #[doc = " cudaErrorGraphExecUpdateFailure if the graph update was not performed because it included"] - #[doc = " changes which violated constraints specific to instantiated graph update."] - #[doc = ""] - #[doc = " \\param hGraphExec The instantiated graph to be updated"] - #[doc = " \\param hGraph The graph containing the updated parameters"] - #[doc = " \\param hErrorNode_out The node which caused the permissibility check to forbid the update, if any"] - #[doc = " \\param updateResult_out Whether the graph update was permitted. If was forbidden, the reason why"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorGraphExecUpdateFailure,"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphInstantiate,"] + pub fn cudaGraphNodeSetEnabled( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + isEnabled: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeGetEnabled( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + isEnabled: *mut ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { pub fn cudaGraphExecUpdate( hGraphExec: cudaGraphExec_t, hGraph: cudaGraph_t, @@ -16918,92 +9703,15 @@ extern "C" { pub fn cudaGraphUpload(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Launches an executable graph in a stream"] - #[doc = ""] - #[doc = " Executes \\p graphExec in \\p stream. Only one instance of \\p graphExec may be executing"] - #[doc = " at a time. Each launch is ordered behind both any previous work in \\p stream"] - #[doc = " and any previous launches of \\p graphExec. To execute a graph concurrently, it must be"] - #[doc = " instantiated multiple times into multiple executable graphs."] - #[doc = ""] - #[doc = " If any allocations created by \\p graphExec remain unfreed (from a previous launch) and"] - #[doc = " \\p graphExec was not instantiated with ::cudaGraphInstantiateFlagAutoFreeOnLaunch,"] - #[doc = " the launch will fail with ::cudaErrorInvalidValue."] - #[doc = ""] - #[doc = " \\param graphExec - Executable graph to launch"] - #[doc = " \\param stream - Stream in which to launch the graph"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphInstantiate,"] - #[doc = " ::cudaGraphUpload,"] - #[doc = " ::cudaGraphExecDestroy"] pub fn cudaGraphLaunch(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys an executable graph"] - #[doc = ""] - #[doc = " Destroys the executable graph specified by \\p graphExec."] - #[doc = ""] - #[doc = " \\param graphExec - Executable graph to destroy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphInstantiate,"] - #[doc = " ::cudaGraphUpload,"] - #[doc = " ::cudaGraphLaunch"] pub fn cudaGraphExecDestroy(graphExec: cudaGraphExec_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Destroys a graph"] - #[doc = ""] - #[doc = " Destroys the graph specified by \\p graph, as well as all of its nodes."] - #[doc = ""] - #[doc = " \\param graph - Graph to destroy"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = " \\note_graph_thread_safety"] - #[doc = " \\notefnerr"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = " \\note_destroy_ub"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaGraphCreate"] pub fn cudaGraphDestroy(graph: cudaGraph_t) -> cudaError_t; } extern "C" { - #[doc = " \\brief Write a DOT file describing graph structure"] - #[doc = ""] - #[doc = " Using the provided \\p graph, write to \\p path a DOT formatted description of the graph."] - #[doc = " By default this includes the graph topology, node types, node id, kernel names and memcpy direction."] - #[doc = " \\p flags can be specified to write more detailed information about each node type such as"] - #[doc = " parameter values, kernel attributes, node and function handles."] - #[doc = ""] - #[doc = " \\param graph - The graph to create a DOT file from"] - #[doc = " \\param path - The path to write the DOT file to"] - #[doc = " \\param flags - Flags from cudaGraphDebugDotFlags for specifying which additional node information to write"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorOperatingSystem"] pub fn cudaGraphDebugDotPrint( graph: cudaGraph_t, path: *const ::libc::c_char, @@ -17011,38 +9719,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Create a user object"] - #[doc = ""] - #[doc = " Create a user object with the specified destructor callback and initial reference count. The"] - #[doc = " initial references are owned by the caller."] - #[doc = ""] - #[doc = " Destructor callbacks cannot make CUDA API calls and should avoid blocking behavior, as they"] - #[doc = " are executed by a shared internal thread. Another thread may be signaled to perform such"] - #[doc = " actions, if it does not block forward progress of tasks scheduled through CUDA."] - #[doc = ""] - #[doc = " See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects."] - #[doc = ""] - #[doc = " \\param object_out - Location to return the user object handle"] - #[doc = " \\param ptr - The pointer to pass to the destroy function"] - #[doc = " \\param destroy - Callback to free the user object when it is no longer in use"] - #[doc = " \\param initialRefcount - The initial refcount to create the object with, typically 1. The"] - #[doc = " initial references are owned by the calling thread."] - #[doc = " \\param flags - Currently it is required to pass ::cudaUserObjectNoDestructorSync,"] - #[doc = " which is the only defined flag. This indicates that the destroy"] - #[doc = " callback cannot be waited on by any CUDA API. Users requiring"] - #[doc = " synchronization of the callback should signal its completion"] - #[doc = " manually."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaUserObjectRetain,"] - #[doc = " ::cudaUserObjectRelease,"] - #[doc = " ::cudaGraphRetainUserObject,"] - #[doc = " ::cudaGraphReleaseUserObject,"] - #[doc = " ::cudaGraphCreate"] pub fn cudaUserObjectCreate( object_out: *mut cudaUserObject_t, ptr: *mut ::libc::c_void, @@ -17052,80 +9728,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Retain a reference to a user object"] - #[doc = ""] - #[doc = " Retains new references to a user object. The new references are owned by the caller."] - #[doc = ""] - #[doc = " See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects."] - #[doc = ""] - #[doc = " \\param object - The object to retain"] - #[doc = " \\param count - The number of references to retain, typically 1. Must be nonzero"] - #[doc = " and not larger than INT_MAX."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaUserObjectCreate,"] - #[doc = " ::cudaUserObjectRelease,"] - #[doc = " ::cudaGraphRetainUserObject,"] - #[doc = " ::cudaGraphReleaseUserObject,"] - #[doc = " ::cudaGraphCreate"] pub fn cudaUserObjectRetain(object: cudaUserObject_t, count: ::libc::c_uint) -> cudaError_t; } extern "C" { - #[doc = " \\brief Release a reference to a user object"] - #[doc = ""] - #[doc = " Releases user object references owned by the caller. The object's destructor is invoked if"] - #[doc = " the reference count reaches zero."] - #[doc = ""] - #[doc = " It is undefined behavior to release references not owned by the caller, or to use a user"] - #[doc = " object handle after all references are released."] - #[doc = ""] - #[doc = " See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects."] - #[doc = ""] - #[doc = " \\param object - The object to release"] - #[doc = " \\param count - The number of references to release, typically 1. Must be nonzero"] - #[doc = " and not larger than INT_MAX."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaUserObjectCreate,"] - #[doc = " ::cudaUserObjectRetain,"] - #[doc = " ::cudaGraphRetainUserObject,"] - #[doc = " ::cudaGraphReleaseUserObject,"] - #[doc = " ::cudaGraphCreate"] pub fn cudaUserObjectRelease(object: cudaUserObject_t, count: ::libc::c_uint) -> cudaError_t; } extern "C" { - #[doc = " \\brief Retain a reference to a user object from a graph"] - #[doc = ""] - #[doc = " Creates or moves user object references that will be owned by a CUDA graph."] - #[doc = ""] - #[doc = " See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects."] - #[doc = ""] - #[doc = " \\param graph - The graph to associate the reference with"] - #[doc = " \\param object - The user object to retain a reference for"] - #[doc = " \\param count - The number of references to add to the graph, typically 1. Must be"] - #[doc = " nonzero and not larger than INT_MAX."] - #[doc = " \\param flags - The optional flag ::cudaGraphUserObjectMove transfers references"] - #[doc = " from the calling thread, rather than create new references. Pass 0"] - #[doc = " to create new references."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaUserObjectCreate"] - #[doc = " ::cudaUserObjectRetain,"] - #[doc = " ::cudaUserObjectRelease,"] - #[doc = " ::cudaGraphReleaseUserObject,"] - #[doc = " ::cudaGraphCreate"] pub fn cudaGraphRetainUserObject( graph: cudaGraph_t, object: cudaUserObject_t, @@ -17134,27 +9742,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Release a user object reference from a graph"] - #[doc = ""] - #[doc = " Releases user object references owned by a graph."] - #[doc = ""] - #[doc = " See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects."] - #[doc = ""] - #[doc = " \\param graph - The graph that will release the reference"] - #[doc = " \\param object - The user object to release a reference for"] - #[doc = " \\param count - The number of references to release, typically 1. Must be nonzero"] - #[doc = " and not larger than INT_MAX."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cudaUserObjectCreate"] - #[doc = " ::cudaUserObjectRetain,"] - #[doc = " ::cudaUserObjectRelease,"] - #[doc = " ::cudaGraphRetainUserObject,"] - #[doc = " ::cudaGraphCreate"] pub fn cudaGraphReleaseUserObject( graph: cudaGraph_t, object: cudaUserObject_t, @@ -17162,54 +9749,6 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Returns the requested driver API function pointer"] - #[doc = ""] - #[doc = " Returns in \\p **funcPtr the address of the CUDA driver function for the requested flags."] - #[doc = ""] - #[doc = " For a requested driver symbol, if the CUDA version in which the driver symbol was"] - #[doc = " introduced is less than or equal to the CUDA runtime version, the API will return"] - #[doc = " the function pointer to the corresponding versioned driver function."] - #[doc = ""] - #[doc = " The pointer returned by the API should be cast to a function pointer matching the"] - #[doc = " requested driver function's definition in the API header file. The function pointer"] - #[doc = " typedef can be picked up from the corresponding typedefs header file. For example,"] - #[doc = " cudaTypedefs.h consists of function pointer typedefs for driver APIs defined in cuda.h."] - #[doc = ""] - #[doc = " The API will return ::cudaErrorSymbolNotFound if the requested driver function is not"] - #[doc = " supported on the platform, no ABI compatible driver function exists for the CUDA runtime"] - #[doc = " version or if the driver symbol is invalid."] - #[doc = ""] - #[doc = " The requested flags can be:"] - #[doc = " - ::cudaEnableDefault: This is the default mode. This is equivalent to"] - #[doc = " ::cudaEnablePerThreadDefaultStream if the code is compiled with"] - #[doc = " --default-stream per-thread compilation flag or the macro CUDA_API_PER_THREAD_DEFAULT_STREAM"] - #[doc = " is defined; ::cudaEnableLegacyStream otherwise."] - #[doc = " - ::cudaEnableLegacyStream: This will enable the search for all driver symbols"] - #[doc = " that match the requested driver symbol name except the corresponding per-thread versions."] - #[doc = " - ::cudaEnablePerThreadDefaultStream: This will enable the search for all"] - #[doc = " driver symbols that match the requested driver symbol name including the per-thread"] - #[doc = " versions. If a per-thread version is not found, the API will return the legacy version"] - #[doc = " of the driver function."] - #[doc = ""] - #[doc = " \\param symbol - The base name of the driver API function to look for. As an example,"] - #[doc = " for the driver API ::cuMemAlloc_v2, \\p symbol would be cuMemAlloc."] - #[doc = " Note that the API will use the CUDA runtime version to return the"] - #[doc = " address to the most recent ABI compatible driver symbol, ::cuMemAlloc"] - #[doc = " or ::cuMemAlloc_v2."] - #[doc = " \\param funcPtr - Location to return the function pointer to the requested driver function"] - #[doc = " \\param flags - Flags to specify search options."] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess,"] - #[doc = " ::cudaErrorInvalidValue,"] - #[doc = " ::cudaErrorNotSupported,"] - #[doc = " ::cudaErrorSymbolNotFound"] - #[doc = " \\note_version_mixing"] - #[doc = " \\note_init_rt"] - #[doc = " \\note_callback"] - #[doc = ""] - #[doc = " \\sa"] - #[doc = " ::cuGetProcAddress"] pub fn cudaGetDriverEntryPoint( symbol: *const ::libc::c_char, funcPtr: *mut *mut ::libc::c_void, @@ -17217,23 +9756,12 @@ extern "C" { ) -> cudaError_t; } extern "C" { - #[doc = " \\cond impl_private"] pub fn cudaGetExportTable( ppExportTable: *mut *const ::libc::c_void, pExportTableId: *const cudaUUID_t, ) -> cudaError_t; } extern "C" { - #[doc = " \\brief Get pointer to device entry function that matches entry function \\p symbolPtr"] - #[doc = ""] - #[doc = " Returns in \\p functionPtr the device entry function corresponding to the symbol \\p symbolPtr."] - #[doc = ""] - #[doc = " \\param functionPtr - Returns the device entry function"] - #[doc = " \\param symbolPtr - Pointer to device entry function to search for"] - #[doc = ""] - #[doc = " \\return"] - #[doc = " ::cudaSuccess"] - #[doc = ""] pub fn cudaGetFuncBySymbol( functionPtr: *mut cudaFunction_t, symbolPtr: *const ::libc::c_void, @@ -17389,6 +9917,7 @@ pub enum cudnnDataType_t { CUDNN_DATA_INT8x32 = 8, CUDNN_DATA_BFLOAT16 = 9, CUDNN_DATA_INT64 = 10, + CUDNN_DATA_BOOLEAN = 11, } #[repr(u32)] #[non_exhaustive] @@ -17508,7 +10037,6 @@ pub enum cudnnFoldingDirection_t { CUDNN_TRANSFORM_UNFOLD = 1, } extern "C" { - #[doc = " Create a destination descriptor for cudnnTransformTensor"] pub fn cudnnInitTransformDest( transformDesc: cudnnTensorTransformDescriptor_t, srcDesc: cudnnTensorDescriptor_t, @@ -17517,13 +10045,11 @@ extern "C" { ) -> cudnnStatus_t; } extern "C" { - #[doc = " Create an empty tensor transform descriptor"] pub fn cudnnCreateTensorTransformDescriptor( transformDesc: *mut cudnnTensorTransformDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - #[doc = " Initialize a previously created tensor transform descriptor."] pub fn cudnnSetTensorTransformDescriptor( transformDesc: cudnnTensorTransformDescriptor_t, nbDims: u32, @@ -17535,8 +10061,6 @@ extern "C" { ) -> cudnnStatus_t; } extern "C" { - #[doc = " Retrieves the values stored in a previously initialized tensor transform"] - #[doc = " descriptor."] pub fn cudnnGetTensorTransformDescriptor( transformDesc: cudnnTensorTransformDescriptor_t, nbDimsRequested: u32, @@ -17548,7 +10072,6 @@ extern "C" { ) -> cudnnStatus_t; } extern "C" { - #[doc = " Destroys a previously created tensor transform descriptor."] pub fn cudnnDestroyTensorTransformDescriptor( transformDesc: cudnnTensorTransformDescriptor_t, ) -> cudnnStatus_t; @@ -18371,71 +10894,96 @@ fn bindgen_test_layout_cudnnAlgorithmUnionStruct_Algorithm() { stringify!(cudnnAlgorithmUnionStruct_Algorithm) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).convFwdAlgo as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(convFwdAlgo) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).convBwdFilterAlgo - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(convBwdFilterAlgo) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).convBwdDataAlgo - as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(convBwdDataAlgo) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).RNNAlgo as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(RNNAlgo) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).CTCLossAlgo as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(CTCLossAlgo) - ) - ); + fn test_field_convFwdAlgo() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).convFwdAlgo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnAlgorithmUnionStruct_Algorithm), + "::", + stringify!(convFwdAlgo) + ) + ); + } + test_field_convFwdAlgo(); + fn test_field_convBwdFilterAlgo() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).convBwdFilterAlgo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnAlgorithmUnionStruct_Algorithm), + "::", + stringify!(convBwdFilterAlgo) + ) + ); + } + test_field_convBwdFilterAlgo(); + fn test_field_convBwdDataAlgo() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).convBwdDataAlgo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnAlgorithmUnionStruct_Algorithm), + "::", + stringify!(convBwdDataAlgo) + ) + ); + } + test_field_convBwdDataAlgo(); + fn test_field_RNNAlgo() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RNNAlgo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnAlgorithmUnionStruct_Algorithm), + "::", + stringify!(RNNAlgo) + ) + ); + } + test_field_RNNAlgo(); + fn test_field_CTCLossAlgo() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CTCLossAlgo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnAlgorithmUnionStruct_Algorithm), + "::", + stringify!(CTCLossAlgo) + ) + ); + } + test_field_CTCLossAlgo(); } #[test] fn bindgen_test_layout_cudnnAlgorithmUnionStruct() { @@ -18449,16 +10997,23 @@ fn bindgen_test_layout_cudnnAlgorithmUnionStruct() { 4usize, concat!("Alignment of ", stringify!(cudnnAlgorithmUnionStruct)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).algo as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct), - "::", - stringify!(algo) - ) - ); + fn test_field_algo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnAlgorithmUnionStruct), + "::", + stringify!(algo) + ) + ); + } + test_field_algo(); } pub type cudnnAlgorithm_t = cudnnAlgorithmUnionStruct; extern "C" { @@ -18576,116 +11131,193 @@ fn bindgen_test_layout_cudnnDebugStruct() { 8usize, concat!("Alignment of ", stringify!(cudnnDebugStruct)) ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cudnn_version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(cudnn_version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cudnnStatus as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(cudnnStatus) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time_sec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(time_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time_usec as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(time_usec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).time_delta as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(time_delta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).handle as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(handle) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stream as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pid as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(pid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cudaDeviceId as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(cudaDeviceId) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reserved as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(reserved) - ) - ); + fn test_field_cudnn_version() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cudnn_version) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(cudnn_version) + ) + ); + } + test_field_cudnn_version(); + fn test_field_cudnnStatus() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cudnnStatus) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(cudnnStatus) + ) + ); + } + test_field_cudnnStatus(); + fn test_field_time_sec() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).time_sec) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(time_sec) + ) + ); + } + test_field_time_sec(); + fn test_field_time_usec() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).time_usec) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(time_usec) + ) + ); + } + test_field_time_usec(); + fn test_field_time_delta() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).time_delta) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(time_delta) + ) + ); + } + test_field_time_delta(); + fn test_field_handle() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(handle) + ) + ); + } + test_field_handle(); + fn test_field_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(stream) + ) + ); + } + test_field_stream(); + fn test_field_pid() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(pid) + ) + ); + } + test_field_pid(); + fn test_field_tid() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).tid) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(tid) + ) + ); + } + test_field_tid(); + fn test_field_cudaDeviceId() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cudaDeviceId) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(cudaDeviceId) + ) + ); + } + test_field_cudaDeviceId(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } pub type cudnnDebug_t = cudnnDebugStruct; pub type cudnnCallback_t = ::std::option::Option< @@ -20298,95 +12930,125 @@ fn bindgen_test_layout_cudnnConvolutionFwdAlgoPerfStruct() { stringify!(cudnnConvolutionFwdAlgoPerfStruct) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).algo as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(algo) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).status as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).time as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).memory as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(memory) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).determinism as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(determinism) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mathType as *const _ - as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(mathType) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(reserved) - ) - ); + fn test_field_algo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(algo) + ) + ); + } + test_field_algo(); + fn test_field_status() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(status) + ) + ); + } + test_field_status(); + fn test_field_time() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(time) + ) + ); + } + test_field_time(); + fn test_field_memory() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(memory) + ) + ); + } + test_field_memory(); + fn test_field_determinism() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(determinism) + ) + ); + } + test_field_determinism(); + fn test_field_mathType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(mathType) + ) + ); + } + test_field_mathType(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } pub type cudnnConvolutionFwdAlgoPerf_t = cudnnConvolutionFwdAlgoPerfStruct; extern "C" { @@ -20652,97 +13314,132 @@ fn bindgen_test_layout_cudnnConvolutionBwdDataAlgoPerfStruct() { stringify!(cudnnConvolutionBwdDataAlgoPerfStruct) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).algo as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(algo) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).status as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).time as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).memory as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(memory) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).determinism - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(determinism) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mathType as *const _ - as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(mathType) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(reserved) - ) - ); + fn test_field_algo() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(algo) + ) + ); + } + test_field_algo(); + fn test_field_status() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(status) + ) + ); + } + test_field_status(); + fn test_field_time() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(time) + ) + ); + } + test_field_time(); + fn test_field_memory() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(memory) + ) + ); + } + test_field_memory(); + fn test_field_determinism() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(determinism) + ) + ); + } + test_field_determinism(); + fn test_field_mathType() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(mathType) + ) + ); + } + test_field_mathType(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } pub type cudnnConvolutionBwdDataAlgoPerf_t = cudnnConvolutionBwdDataAlgoPerfStruct; extern "C" { @@ -20985,97 +13682,132 @@ fn bindgen_test_layout_cudnnConvolutionBwdFilterAlgoPerfStruct() { stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct) ) ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).algo as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(algo) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).status as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(status) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).time as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).memory as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(memory) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).determinism - as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(determinism) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).mathType as *const _ - as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(mathType) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).reserved as *const _ - as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(reserved) - ) - ); + fn test_field_algo() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(algo) + ) + ); + } + test_field_algo(); + fn test_field_status() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(status) + ) + ); + } + test_field_status(); + fn test_field_time() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(time) + ) + ); + } + test_field_time(); + fn test_field_memory() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(memory) + ) + ); + } + test_field_memory(); + fn test_field_determinism() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(determinism) + ) + ); + } + test_field_determinism(); + fn test_field_mathType() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize + }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(mathType) + ) + ); + } + test_field_mathType(); + fn test_field_reserved() { + assert_eq!( + unsafe { + let uninit = + ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(reserved) + ) + ); + } + test_field_reserved(); } pub type cudnnConvolutionBwdFilterAlgoPerf_t = cudnnConvolutionBwdFilterAlgoPerfStruct; extern "C" { @@ -21248,10 +13980,25 @@ pub type cudnnBackendDescriptor_t = *mut ::libc::c_void; #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudnnPointwiseMode_t { CUDNN_POINTWISE_ADD = 0, - CUDNN_POINTWISE_MUL = 1, - CUDNN_POINTWISE_MIN = 2, + CUDNN_POINTWISE_ADD_SQUARE = 5, + CUDNN_POINTWISE_DIV = 6, CUDNN_POINTWISE_MAX = 3, + CUDNN_POINTWISE_MIN = 2, + CUDNN_POINTWISE_MOD = 7, + CUDNN_POINTWISE_MUL = 1, + CUDNN_POINTWISE_POW = 8, + CUDNN_POINTWISE_SUB = 9, + CUDNN_POINTWISE_ABS = 10, + CUDNN_POINTWISE_CEIL = 11, + CUDNN_POINTWISE_COS = 12, + CUDNN_POINTWISE_EXP = 13, + CUDNN_POINTWISE_FLOOR = 14, + CUDNN_POINTWISE_LOG = 15, + CUDNN_POINTWISE_NEG = 16, + CUDNN_POINTWISE_RSQRT = 17, + CUDNN_POINTWISE_SIN = 18, CUDNN_POINTWISE_SQRT = 4, + CUDNN_POINTWISE_TAN = 19, CUDNN_POINTWISE_RELU_FWD = 100, CUDNN_POINTWISE_TANH_FWD = 101, CUDNN_POINTWISE_SIGMOID_FWD = 102, @@ -21266,6 +14013,24 @@ pub enum cudnnPointwiseMode_t { CUDNN_POINTWISE_GELU_BWD = 204, CUDNN_POINTWISE_SOFTPLUS_BWD = 205, CUDNN_POINTWISE_SWISH_BWD = 206, + CUDNN_POINTWISE_CMP_EQ = 300, + CUDNN_POINTWISE_CMP_NEQ = 301, + CUDNN_POINTWISE_CMP_GT = 302, + CUDNN_POINTWISE_CMP_GE = 303, + CUDNN_POINTWISE_CMP_LT = 304, + CUDNN_POINTWISE_CMP_LE = 305, + CUDNN_POINTWISE_LOGICAL_AND = 400, + CUDNN_POINTWISE_LOGICAL_OR = 401, + CUDNN_POINTWISE_LOGICAL_NOT = 402, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnResampleMode_t { + CUDNN_RESAMPLE_NEAREST = 0, + CUDNN_RESAMPLE_BILINEAR = 1, + CUDNN_RESAMPLE_AVGPOOL = 2, + CUDNN_RESAMPLE_MAXPOOL = 3, } #[repr(u32)] #[non_exhaustive] @@ -21343,6 +14108,7 @@ pub enum cudnnBackendAttributeName_t { CUDNN_ATTR_OPERATION_POINTWISE_ALPHA2 = 755, CUDNN_ATTR_OPERATION_POINTWISE_DXDESC = 756, CUDNN_ATTR_OPERATION_POINTWISE_DYDESC = 757, + CUDNN_ATTR_OPERATION_POINTWISE_TDESC = 758, CUDNN_ATTR_OPERATION_GENSTATS_MODE = 770, CUDNN_ATTR_OPERATION_GENSTATS_MATH_PREC = 771, CUDNN_ATTR_OPERATION_GENSTATS_XDESC = 772, @@ -21377,6 +14143,7 @@ pub enum cudnnBackendAttributeName_t { CUDNN_ATTR_TENSOR_UNIQUE_ID = 906, CUDNN_ATTR_TENSOR_IS_VIRTUAL = 907, CUDNN_ATTR_TENSOR_IS_BY_VALUE = 908, + CUDNN_ATTR_TENSOR_REORDERING_MODE = 909, CUDNN_ATTR_VARIANT_PACK_UNIQUE_IDS = 1000, CUDNN_ATTR_VARIANT_PACK_DATA_POINTERS = 1001, CUDNN_ATTR_VARIANT_PACK_INTERMEDIATES = 1002, @@ -21415,6 +14182,27 @@ pub enum cudnnBackendAttributeName_t { CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC = 1628, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC = 1629, CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS = 1630, + CUDNN_ATTR_RESAMPLE_MODE = 1700, + CUDNN_ATTR_RESAMPLE_COMP_TYPE = 1701, + CUDNN_ATTR_RESAMPLE_SPATIAL_DIMS = 1702, + CUDNN_ATTR_RESAMPLE_POST_PADDINGS = 1703, + CUDNN_ATTR_RESAMPLE_PRE_PADDINGS = 1704, + CUDNN_ATTR_RESAMPLE_STRIDES = 1705, + CUDNN_ATTR_RESAMPLE_WINDOW_DIMS = 1706, + CUDNN_ATTR_RESAMPLE_NAN_PROPAGATION = 1707, + CUDNN_ATTR_RESAMPLE_PADDING_MODE = 1708, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_XDESC = 1710, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_YDESC = 1711, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_IDXDESC = 1712, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_ALPHA = 1713, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_BETA = 1714, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_DESC = 1716, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DXDESC = 1720, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DYDESC = 1721, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_IDXDESC = 1722, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_ALPHA = 1723, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_BETA = 1724, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DESC = 1725, } #[repr(u32)] #[non_exhaustive] @@ -21440,6 +14228,10 @@ pub enum cudnnBackendAttributeType_t { CUDNN_TYPE_BN_FINALIZE_STATS_MODE = 17, CUDNN_TYPE_REDUCTION_OPERATOR_TYPE = 18, CUDNN_TYPE_BEHAVIOR_NOTE = 19, + CUDNN_TYPE_TENSOR_REORDERING_MODE = 20, + CUDNN_TYPE_RESAMPLE_MODE = 21, + CUDNN_TYPE_PADDING_MODE = 22, + CUDNN_TYPE_INT32 = 23, } #[repr(u32)] #[non_exhaustive] @@ -21469,6 +14261,9 @@ pub enum cudnnBackendDescriptorType_t { CUDNN_BACKEND_REDUCTION_DESCRIPTOR = 21, CUDNN_BACKEND_OPERATION_REDUCTION_DESCRIPTOR = 22, CUDNN_BACKEND_OPERATION_BN_BWD_WEIGHTS_DESCRIPTOR = 23, + CUDNN_BACKEND_RESAMPLE_DESCRIPTOR = 24, + CUDNN_BACKEND_OPERATION_RESAMPLE_FWD_DESCRIPTOR = 25, + CUDNN_BACKEND_OPERATION_RESAMPLE_BWD_DESCRIPTOR = 26, } #[repr(u32)] #[non_exhaustive] @@ -21480,14 +14275,19 @@ pub enum cudnnBackendNumericalNote_t { CUDNN_NUMERICAL_NOTE_FFT = 3, CUDNN_NUMERICAL_NOTE_NONDETERMINISTIC = 4, CUDNN_NUMERICAL_NOTE_WINOGRAD = 5, - CUDNN_NUMERICAL_NOTE_TYPE_COUNT = 6, + CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_4x4 = 6, + CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_6x6 = 7, + CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_13x13 = 8, + CUDNN_NUMERICAL_NOTE_TYPE_COUNT = 9, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudnnBackendBehaviorNote_t { CUDNN_BEHAVIOR_NOTE_RUNTIME_COMPILATION = 0, - CUDNN_BEHAVIOR_NOTE_TYPE_COUNT = 1, + CUDNN_BEHAVIOR_NOTE_REQUIRES_FILTER_INT8x32_REORDER = 1, + CUDNN_BEHAVIOR_NOTE_REQUIRES_BIAS_INT8x32_REORDER = 2, + CUDNN_BEHAVIOR_NOTE_TYPE_COUNT = 3, } #[repr(u32)] #[non_exhaustive] @@ -21536,7 +14336,24 @@ pub enum cudnnBackendLayoutType_t { pub enum cudnnBackendHeurMode_t { CUDNN_HEUR_MODE_INSTANT = 0, CUDNN_HEUR_MODE_B = 1, - CUDNN_HEUR_MODES_COUNT = 2, + CUDNN_HEUR_MODE_FALLBACK = 2, + CUDNN_HEUR_MODE_A = 3, + CUDNN_HEUR_MODES_COUNT = 4, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendTensorReordering_t { + CUDNN_TENSOR_REORDERING_NONE = 0, + CUDNN_TENSOR_REORDERING_INT8x32 = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnPaddingMode_t { + CUDNN_ZERO_PAD = 0, + CUDNN_NEG_INF_PAD = 1, + CUDNN_EDGE_VAL_PAD = 2, } extern "C" { pub fn cudnnBackendCreateDescriptor( diff --git a/rcudnn/cudnn/src/api/rnn.rs b/rcudnn/cudnn/src/api/rnn.rs index 2fcbeb27a..e42502c89 100644 --- a/rcudnn/cudnn/src/api/rnn.rs +++ b/rcudnn/cudnn/src/api/rnn.rs @@ -166,7 +166,7 @@ impl API { ) -> Result<::libc::size_t, Error> { let mut size: ::libc::size_t = 0; let size_ptr: *mut ::libc::size_t = &mut size; - match cudnnGetRNNParamsSize(handle, rnn_desc,x_desc, size_ptr, data_type) { + match cudnnGetRNNParamsSize(handle, rnn_desc, x_desc, size_ptr, data_type) { cudnnStatus_t::CUDNN_STATUS_SUCCESS => Ok(size), cudnnStatus_t::CUDNN_STATUS_BAD_PARAM => Err(Error::BadParam("One of the following; rnnDesc is invalid, x_desc is invalid, x_desc isn't fully packed, dataType & tensor Description type don't match")), cudnnStatus_t::CUDNN_STATUS_NOT_SUPPORTED => Err(Error::NotSupported("The data type used in `rnn_desc` is not supported for RNN.")), diff --git a/remote-test/README.md b/remote-test/README.md index 99ec096df..d385f3373 100644 --- a/remote-test/README.md +++ b/remote-test/README.md @@ -22,13 +22,27 @@ For those enabled, please use from a `juice` git checkout in this sub directory: ```sh fly -t spearow login -n juice-crashtesters --concourse-url https://ci.spearow.io # make sure you are logged in -fly -t spearow execute -c ./test.yml --input juice=. --inputs-from crashtest/test-juice ``` +To re-use existing `juice` artifacts refernce the inputs based on a pipeline: + +``` +fly -t spearow execute --tag vendor:nvidia -c ./test.yml --inputs-from pipeline/task +``` + +or just provide something that fills the `test.yaml` input requirement `juice`: + +``` +fly -t spearow execute --tag vendor:nvidia -c ./test.yml --input juice=some/path/to/sth +``` + +or even both. + + For this to work please keep a few things in mind: * be logged in under the right team -* upload is capped at 100MB, so get rid of the `target` directories (i.e. with `rm -r $(fd -t d -I -H '^target$')` ) +* upload is capped at 100MB, so get rid of the `target` directories (i.e. with `rm -r $(fd -t d -I -H '^target$')` ), the target caches that already * experimental! unavailability might occur frequently * do not create artifacts diff --git a/remote-test/test.yml b/remote-test/test.yml index 9dbec2c67..4b8598028 100644 --- a/remote-test/test.yml +++ b/remote-test/test.yml @@ -1,10 +1,12 @@ platform: linux -# image_resource: -# type: registry-image -# source: -# repository: quay.io/spearow/machine-learning-container-fedora-cuda +image_resource: + type: registry-image + source: + repository: quay.io/spearow/machine-learning-container-fedora-cuda # tag: latest +# repository: docker.io/nvidia/cuda +# tag: 11.7.1-devel-centos7 inputs: - name: juice