MCPcopy Create free account
hub / github.com/Rust-GPU/rust-cuda / descriptor_round_trip

Function descriptor_round_trip

crates/cust/src/memory/array.rs:915–925  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

913
914 #[test]
915 fn descriptor_round_trip() {
916 let _context = crate::quick_init().unwrap();
917
918 let obj = ArrayObject::new([1, 2, 3], ArrayFormat::F64, 2).unwrap();
919
920 let descriptor = obj.descriptor().unwrap();
921 assert_eq!([1, 2, 3], descriptor.dims());
922 assert_eq!(ArrayFormat::F64, descriptor.format());
923 assert_eq!(2, descriptor.num_channels());
924 assert_eq!(ArrayObjectFlags::default(), descriptor.flags());
925 }
926
927 #[test]
928 fn allow_1d_arrays() {

Callers

nothing calls this directly

Calls 3

quick_initFunction · 0.85
newFunction · 0.85
descriptorMethod · 0.45

Tested by

no test coverage detected