Skip to content

Commit

Permalink
Disable the "nightly" faster memory allocation on Windows (it hangs)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris00 committed Dec 22, 2024
1 parent d969828 commit 97c9baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vector/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl<T: NVectorOps> Ops for T {
/// Creates a new N_Vector of the same type as an existing vector
/// `nv` and sets the ops field. It does not copy the vector, but
/// rather allocates storage for the new vector.
#[cfg(feature = "nightly")]
#[cfg(all(feature = "nightly", not(windows)))]
unsafe extern "C" fn nvclone_rust<T: NVectorOps>(
nw: N_Vector
) -> N_Vector {
Expand All @@ -249,7 +249,7 @@ impl<T: NVectorOps> Ops for T {
Box::into_raw(Box::new_in(v, std::alloc::System))
}

#[cfg(not(feature = "nightly"))]
#[cfg(any(not(feature = "nightly"), windows))]
unsafe extern "C" fn nvclone_rust<T: NVectorOps>(
nw: N_Vector
) -> N_Vector {
Expand Down

0 comments on commit 97c9baa

Please sign in to comment.