Skip to content

Commit

Permalink
Merge pull request #46 from eisterman/fix_ci
Browse files Browse the repository at this point in the history
Fix the Continuous Integration
  • Loading branch information
bheisler authored Jan 4, 2020
2 parents 4672e0d + 89eb908 commit de0d955
Show file tree
Hide file tree
Showing 16 changed files with 138 additions and 138 deletions.
3 changes: 0 additions & 3 deletions rustacuda_core/src/memory/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ use core::num::*;
///
/// #[derive(Clone, DeviceCopy)]
/// struct MyStruct(u64);
///
/// # fn main() {}
/// ```
///
/// This is safe because the `DeviceCopy` derive macro will check that all fields of the struct,
Expand All @@ -33,7 +31,6 @@ use core::num::*;
/// # extern crate rustacuda;
/// #[derive(Clone, DeviceCopy)]
/// struct MyStruct(Vec<u64>);
/// # fn main() {}
/// ```
///
/// You can also implement `DeviceCopy` unsafely:
Expand Down
20 changes: 10 additions & 10 deletions rustacuda_core/src/memory/pointer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ unsafe impl<T> DeviceCopy for DevicePointer<T> {}
impl<T> DevicePointer<T> {
/// Returns a null device pointer.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -40,7 +40,7 @@ impl<T> DevicePointer<T> {
/// The given pointer must have been allocated with [`cuda_malloc`](fn.cuda_malloc.html) or
/// be null.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -58,7 +58,7 @@ impl<T> DevicePointer<T> {
/// Returns the contained pointer as a raw pointer. The returned pointer is not valid on the CPU
/// and must not be dereferenced.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -76,7 +76,7 @@ impl<T> DevicePointer<T> {
/// Returns the contained pointer as a mutable raw pointer. The returned pointer is not valid on the CPU
/// and must not be dereferenced.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -92,7 +92,7 @@ impl<T> DevicePointer<T> {
}

/// Returns true if the pointer is null.
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand Down Expand Up @@ -353,7 +353,7 @@ unsafe impl<T: DeviceCopy> DeviceCopy for UnifiedPointer<T> {}
impl<T: DeviceCopy> UnifiedPointer<T> {
/// Returns a null unified pointer.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -373,7 +373,7 @@ impl<T: DeviceCopy> UnifiedPointer<T> {
/// The given pointer must have been allocated with
/// [`cuda_malloc_unified`](fn.cuda_malloc_unified.html) or be null.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -390,7 +390,7 @@ impl<T: DeviceCopy> UnifiedPointer<T> {

/// Returns the contained pointer as a raw pointer.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -407,7 +407,7 @@ impl<T: DeviceCopy> UnifiedPointer<T> {

/// Returns the contained pointer as a mutable raw pointer.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand All @@ -425,7 +425,7 @@ impl<T: DeviceCopy> UnifiedPointer<T> {

/// Returns true if the pointer is null.
///
/// # Examples:
/// # Examples
///
/// ```
/// # let _context = rustacuda::quick_init().unwrap();
Expand Down
38 changes: 19 additions & 19 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
//! functions. The programmer must ensure that no other OS threads are using the `Context` when it
//! is dropped.
//!
//! # Examples:
//! # Examples
//!
//! For most commmon uses (one device, one OS thread) it should suffice to create a single context:
//!
Expand Down Expand Up @@ -242,7 +242,7 @@ pub struct Context {
impl Context {
/// Create a CUDA context for the given device.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -276,7 +276,7 @@ impl Context {
///
/// This is not necessarily the latest version supported by the driver.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -306,7 +306,7 @@ impl Context {
/// This is useful for sharing a single context between threads (though see the module-level
/// documentation for safety details!).
///
/// # Example:
/// # Example
////* */
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -330,7 +330,7 @@ impl Context {
/// Destroying a context can return errors from previous asynchronous work. This function
/// destroys the given context and returns the error and the un-destroyed context on failure.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -414,7 +414,7 @@ impl UnownedContext {
///
/// This is not necessarily the latest version supported by the driver.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -449,7 +449,7 @@ impl ContextStack {
/// Pop the current context off the stack and return the handle. That context may then be made
/// current again (perhaps on a different CPU thread) by calling [push](#method.push).
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -475,7 +475,7 @@ impl ContextStack {

/// Push the given context to the top of the stack
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -522,7 +522,7 @@ impl CurrentContext {
/// where the size of the L1 cache and shared memory are fixed, this will always return
/// `CacheConfig::PreferNone`.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -548,7 +548,7 @@ impl CurrentContext {

/// Return the device ID for the current context.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -573,7 +573,7 @@ impl CurrentContext {

/// Return the context flags for the current context.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -598,7 +598,7 @@ impl CurrentContext {

/// Return resource limits for the current context.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -623,7 +623,7 @@ impl CurrentContext {

/// Return resource limits for the current context.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -655,7 +655,7 @@ impl CurrentContext {
/// automatically clamped to within the valid range. If the device does not support stream
/// priorities, the returned range will contain zeroes.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -695,7 +695,7 @@ impl CurrentContext {
/// This setting does nothing on devices where the size of the L1 cache and shared memory are
/// fixed.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -739,7 +739,7 @@ impl CurrentContext {
/// * `MaxL2FetchGranularity`: Controls the L2 fetch granularity. This is purely a performance
/// hint and it can be ignored or clamped depending on the platform.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -766,7 +766,7 @@ impl CurrentContext {
/// On devices with configurable shared memory banks, this function will set the context's
/// shared memory bank size which is used for subsequent kernel launches.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand All @@ -787,7 +787,7 @@ impl CurrentContext {

/// Returns a non-owning handle to the current context.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down Expand Up @@ -816,7 +816,7 @@ impl CurrentContext {
/// If there is a context set for this thread, this replaces the top context on the stack with
/// the given context.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::device::Device;
Expand Down
10 changes: 0 additions & 10 deletions src/derive_compile_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
//!
//! #[derive(Clone, DeviceCopy)]
//! struct ShouldFailTuple(Vec<u64>);
//!
//! fn main() {}
//! ```
//!
//! ```compile_fail
Expand All @@ -19,8 +17,6 @@
//!
//! #[derive(Clone, DeviceCopy)]
//! struct ShouldFailStruct{v: Vec<u64>}
//!
//! fn main() {}
//! ```
//!
//! ```compile_fail
Expand All @@ -33,8 +29,6 @@
//! Unit,
//! Tuple(Vec<u64>),
//! }
//!
//! fn main() {}
//! ```
//!
//! ```compile_fail
Expand All @@ -47,8 +41,6 @@
//! Unit,
//! Struct{v: Vec<u64>},
//! }
//!
//! fn main() {}
//! ```
//!
//! ```compile_fail
Expand All @@ -61,6 +53,4 @@
//! u: *const u64,
//! o: *const i64,
//! }
//!
//! fn main() {}
//! ```
12 changes: 6 additions & 6 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl Device {
/// Returns the number of devices with compute-capability 2.0 or greater which are available
/// for execution.
///
/// # Example:
/// # Example
/// ```
/// # use rustacuda::*;
/// # use std::error::Error;
Expand All @@ -231,7 +231,7 @@ impl Device {
///
/// Ordinal must be in the range `0..num_devices()`. If not, an error will be returned.
///
/// # Example:
/// # Example
/// ```
/// # use rustacuda::*;
/// # use std::error::Error;
Expand All @@ -253,7 +253,7 @@ impl Device {

/// Return an iterator over all CUDA devices.
///
/// # Example:
/// # Example
/// ```
/// # use rustacuda::*;
/// # use std::error::Error;
Expand All @@ -275,7 +275,7 @@ impl Device {

/// Returns the total amount of memory available on the device in bytes.
///
/// # Example:
/// # Example
/// ```
/// # use rustacuda::*;
/// # use std::error::Error;
Expand All @@ -297,7 +297,7 @@ impl Device {

/// Returns the name of this device.
///
/// # Example:
/// # Example
/// ```
/// # use rustacuda::*;
/// # use std::error::Error;
Expand Down Expand Up @@ -330,7 +330,7 @@ impl Device {

/// Returns information about this device.
///
/// # Example:
/// # Example
/// ```
/// # use rustacuda::*;
/// # use std::error::Error;
Expand Down
4 changes: 2 additions & 2 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct Event(CUevent);
impl Event {
/// Create a new event with the specified flags.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::quick_init;
Expand Down Expand Up @@ -295,7 +295,7 @@ impl Event {
/// This function destroys the given event and returns the error and the
/// un-destroyed event on failure.
///
/// # Example:
/// # Example
///
/// ```
/// # use rustacuda::*;
Expand Down
Loading

0 comments on commit de0d955

Please sign in to comment.