`cuda-sys` was split into several crates with the release of version 0.3.
For RustaCUDA, the `cuda-driver-sys` crate is used, which contains all
the functionality that is currently needed.
Without this fix the command `cargo clippy --all -- -D warnings` from
the CI will fail because the lint `clippy::missing-safety-doc` search
for "# Safety" and not "# Safety:".
Even "# Examples" and "# Errors" have seen the ":" removed.
It tries to allocate 3/4 of the device memory as a unified buffer, but there's no guarantee that there's that much page-locked CPU memory to match, so that doesn't really work.
`DeviceBuffer`, `LockedBuffer`, and `UnifiedBuffer` allocate several times
more memory than requested. This occurs because the respective `*_malloc()`
wrappers already account for the scaling from "count of T" to bytes. Thus,
count is multiplied with `size_of::<T>()` twice.
This fix simply removes the superfluous multiplication.
* test
* test2
* cleaning up .unwraps()
* cleaning up spacing
* removed more unwraps
* removed all?? the unwraps
* removed all?? the unwraps
* All unwrap() calls removed.
* Refactor device.rs into smaller files
* test
cleaning up .unwraps()
cleaning up spacing
removed more unwraps
removed all?? the unwraps
removed all?? the unwraps
branch cleanup
* Removed .unwrap() calls from src/device.rs
* Removed .unwarp() calls from src/function.rs
* Removed unwrap() calls from src/module.rs
* Removed unwrap() calls from module.rs & stream.rs
* Removed unwrap() calls from #[test]s in module.rs
* Removed unwrap() calls from #[test]s in both function.rs & device.rs
* Removed all .unwrap() calls from examples in src/...
* rustfmt cleanups
* Removed duplicate crate imports, more Rustfmt adjusments
* Cleaning up Formatting
- Move array types to array module under memory
- Remove builder and unnecessary getter/setter routines from flags type
- Make dbg mode ArrayObject::from_descriptor checking more robust
- Fix names of some device attributes
- New named constructors for ArrayObject
- Documentation and tests for all routines
The primary new type is ArrayObject, which represents a generic array
with up to 3-dimensions.
An ArrayObject has a set of dimensions, an ArrayFormat, a number of
channels (1, 2, or 4), and a set of ArrayObjectFlags
Adds tests that assert correct ArrayObject values are accepted and that
bad ones are rejected with a panic.