Remove CUDA support relying on abandoned toolchain
This commit is contained in:
parent
a60870daf6
commit
7866bcee5c
19
.github/workflows/nalgebra-ci-build.yml
vendored
19
.github/workflows/nalgebra-ci-build.yml
vendored
@ -49,8 +49,6 @@ jobs:
|
||||
build-nalgebra-all-features:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Needed because the --all-features build which enables cuda support.
|
||||
- uses: Jimver/cuda-toolkit@v0.2.8
|
||||
- uses: actions/checkout@v2
|
||||
- run: cargo build --all-features;
|
||||
- run: cargo build -p nalgebra-glm --all-features;
|
||||
@ -120,23 +118,6 @@ jobs:
|
||||
run: xargo build --verbose --no-default-features -p nalgebra-glm --target=x86_64-unknown-linux-gnu;
|
||||
- name: build thumbv7em-none-eabihf nalgebra-glm
|
||||
run: xargo build --verbose --no-default-features -p nalgebra-glm --target=thumbv7em-none-eabihf;
|
||||
build-cuda:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: Jimver/cuda-toolkit@v0.2.8
|
||||
with:
|
||||
cuda: '11.5.0'
|
||||
- name: Install nightly-2021-12-04
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly-2021-12-04
|
||||
override: true
|
||||
- uses: actions/checkout@v2
|
||||
- run: rustup target add nvptx64-nvidia-cuda
|
||||
- run: cargo build --no-default-features --features cuda
|
||||
- run: cargo build --no-default-features --features cuda --target=nvptx64-nvidia-cuda
|
||||
env:
|
||||
CUDA_ARCH: "350"
|
||||
docs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -4,6 +4,12 @@ documented here.
|
||||
|
||||
This project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Removed
|
||||
- The `cuda` feature has been removed, as the toolchain it depends on
|
||||
is long abandoned.
|
||||
|
||||
## [0.32.3] (09 July 2023)
|
||||
|
||||
### Modified
|
||||
|
@ -32,7 +32,6 @@ compare = [ "matrixcompare-core" ]
|
||||
libm = [ "simba/libm" ]
|
||||
libm-force = [ "simba/libm_force" ]
|
||||
macros = [ "nalgebra-macros" ]
|
||||
cuda = [ "cust_core", "simba/cuda" ]
|
||||
|
||||
|
||||
# Conversion
|
||||
@ -104,7 +103,6 @@ glam021 = { package = "glam", version = "0.21", optional = true }
|
||||
glam022 = { package = "glam", version = "0.22", optional = true }
|
||||
glam023 = { package = "glam", version = "0.23", optional = true }
|
||||
glam024 = { package = "glam", version = "0.24", optional = true }
|
||||
cust_core = { version = "0.1", optional = true }
|
||||
rayon = { version = "1.6", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
|
@ -21,7 +21,6 @@ default = [ "std" ]
|
||||
std = [ "nalgebra/std", "simba/std" ]
|
||||
arbitrary = [ "nalgebra/arbitrary" ]
|
||||
serde-serialize = [ "nalgebra/serde-serialize-no-std" ]
|
||||
cuda = [ "nalgebra/cuda" ]
|
||||
|
||||
# Conversion
|
||||
convert-mint = [ "nalgebra/mint" ]
|
||||
|
@ -42,7 +42,6 @@ use std::mem;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub struct ArrayStorage<T, const R: usize, const C: usize>(pub [[T; R]; C]);
|
||||
|
||||
impl<T, const R: usize, const C: usize> ArrayStorage<T, R, C> {
|
||||
|
@ -23,7 +23,6 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
feature = "rkyv-serialize",
|
||||
archive_attr(derive(bytecheck::CheckBytes))
|
||||
)]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub struct Dyn(pub usize);
|
||||
|
||||
#[deprecated(note = "use Dyn instead.")]
|
||||
@ -220,7 +219,6 @@ dim_ops!(
|
||||
archive(as = "Self")
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub struct Const<const R: usize>;
|
||||
|
||||
/// Trait implemented exclusively by type-level integers.
|
||||
|
@ -171,7 +171,6 @@ pub type MatrixCross<T, R1, C1, R2, C2> =
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub struct Matrix<T, R, C, S> {
|
||||
/// The data storage that contains all the matrix components. Disappointed?
|
||||
///
|
||||
|
@ -35,7 +35,6 @@ use rkyv::bytecheck;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
// #[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub struct Unit<T> {
|
||||
pub(crate) value: T,
|
||||
}
|
||||
@ -72,16 +71,6 @@ impl<'de, T: Deserialize<'de>> Deserialize<'de> for Unit<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "cuda")]
|
||||
unsafe impl<T: cust_core::DeviceCopy, R, C, S> cust_core::DeviceCopy for Unit<Matrix<T, R, C, S>>
|
||||
where
|
||||
T: Scalar,
|
||||
R: Dim,
|
||||
C: Dim,
|
||||
S: RawStorage<T, R, C> + Copy,
|
||||
{
|
||||
}
|
||||
|
||||
impl<T, R, C, S> PartialEq for Unit<Matrix<T, R, C, S>>
|
||||
where
|
||||
T: Scalar + PartialEq,
|
||||
|
@ -55,7 +55,6 @@ use simba::scalar::{ClosedNeg, RealField};
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub struct DualQuaternion<T> {
|
||||
/// The real component of the quaternion
|
||||
pub real: Quaternion<T>,
|
||||
|
@ -54,7 +54,6 @@ use rkyv::bytecheck;
|
||||
///
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
#[cfg_attr(feature = "serde-serialize-no-std", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(
|
||||
feature = "serde-serialize-no-std",
|
||||
|
@ -34,7 +34,6 @@ use rkyv::bytecheck;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Orthographic3<T> {
|
||||
matrix: Matrix4<T>,
|
||||
|
@ -35,7 +35,6 @@ use rkyv::bytecheck;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Perspective3<T> {
|
||||
matrix: Matrix4<T>,
|
||||
|
@ -86,14 +86,6 @@ where
|
||||
{
|
||||
}
|
||||
|
||||
#[cfg(feature = "cuda")]
|
||||
unsafe impl<T: Scalar + cust_core::DeviceCopy, D: DimName> cust_core::DeviceCopy for OPoint<T, D>
|
||||
where
|
||||
DefaultAllocator: Allocator<T, D>,
|
||||
OVector<T, D>: cust_core::DeviceCopy,
|
||||
{
|
||||
}
|
||||
|
||||
#[cfg(feature = "bytemuck")]
|
||||
unsafe impl<T: Scalar, D: DimName> bytemuck::Zeroable for OPoint<T, D>
|
||||
where
|
||||
|
@ -202,29 +202,11 @@ impl<T: Scalar> Point1<T> {
|
||||
/// assert_eq!(p.x, 1.0);
|
||||
/// ```
|
||||
#[inline]
|
||||
#[cfg(not(feature = "cuda"))]
|
||||
pub const fn new(x: T) -> Self {
|
||||
Point {
|
||||
coords: Vector1::new(x),
|
||||
}
|
||||
}
|
||||
|
||||
/// Initializes this point from its components.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
/// # use nalgebra::Point1;
|
||||
/// let p = Point1::new(1.0);
|
||||
/// assert_eq!(p.x, 1.0);
|
||||
/// ```
|
||||
#[inline]
|
||||
#[cfg(feature = "cuda")]
|
||||
pub fn new(x: T) -> Self {
|
||||
Point {
|
||||
coords: Vector1::new(x),
|
||||
}
|
||||
}
|
||||
}
|
||||
macro_rules! componentwise_constructors_impl(
|
||||
($($doc: expr; $Point: ident, $Vector: ident, $($args: ident:$irow: expr),*);* $(;)*) => {$(
|
||||
@ -234,22 +216,9 @@ macro_rules! componentwise_constructors_impl(
|
||||
#[doc = $doc]
|
||||
#[doc = "```"]
|
||||
#[inline]
|
||||
#[cfg(not(feature = "cuda"))]
|
||||
pub const fn new($($args: T),*) -> Self {
|
||||
Point { coords: $Vector::new($($args),*) }
|
||||
}
|
||||
|
||||
// TODO: always let new be const once CUDA updates its supported
|
||||
// nightly version to something more recent.
|
||||
#[doc = "Initializes this point from its components."]
|
||||
#[doc = "# Example\n```"]
|
||||
#[doc = $doc]
|
||||
#[doc = "```"]
|
||||
#[inline]
|
||||
#[cfg(feature = "cuda")]
|
||||
pub fn new($($args: T),*) -> Self {
|
||||
Point { coords: $Vector::new($($args),*) }
|
||||
}
|
||||
}
|
||||
)*}
|
||||
);
|
||||
|
@ -38,7 +38,6 @@ use rkyv::bytecheck;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub struct Quaternion<T> {
|
||||
/// This quaternion as a 4D vector of coordinates in the `[ x, y, z, w ]` storage order.
|
||||
pub coords: Vector4<T>,
|
||||
@ -1016,9 +1015,6 @@ impl<T: RealField + fmt::Display> fmt::Display for Quaternion<T> {
|
||||
/// A unit quaternions. May be used to represent a rotation.
|
||||
pub type UnitQuaternion<T> = Unit<Quaternion<T>>;
|
||||
|
||||
#[cfg(feature = "cuda")]
|
||||
unsafe impl<T: cust_core::DeviceCopy> cust_core::DeviceCopy for UnitQuaternion<T> {}
|
||||
|
||||
impl<T: Scalar + ClosedNeg + PartialEq> PartialEq for UnitQuaternion<T> {
|
||||
#[inline]
|
||||
fn eq(&self, rhs: &Self) -> bool {
|
||||
|
@ -64,7 +64,6 @@ use rkyv::bytecheck;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Rotation<T, const D: usize> {
|
||||
matrix: SMatrix<T, D, D>,
|
||||
|
@ -32,7 +32,6 @@ use rkyv::bytecheck;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Scale<T, const D: usize> {
|
||||
/// The scale coordinates, i.e., how much is multiplied to a point's coordinates when it is
|
||||
|
@ -21,7 +21,6 @@ use rkyv::bytecheck;
|
||||
/// A similarity, i.e., an uniform scaling, followed by a rotation, followed by a translation.
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
#[cfg_attr(feature = "serde-serialize-no-std", derive(Serialize, Deserialize))]
|
||||
#[cfg_attr(
|
||||
feature = "serde-serialize-no-std",
|
||||
|
@ -60,17 +60,14 @@ where
|
||||
|
||||
/// Tag representing the most general (not necessarily inversible) `Transform` type.
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub enum TGeneral {}
|
||||
|
||||
/// Tag representing the most general inversible `Transform` type.
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub enum TProjective {}
|
||||
|
||||
/// Tag representing an affine `Transform`. Its bottom-row is equal to `(0, 0 ... 0, 1)`.
|
||||
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
pub enum TAffine {}
|
||||
|
||||
impl TCategory for TGeneral {
|
||||
@ -198,16 +195,6 @@ where
|
||||
{
|
||||
}
|
||||
|
||||
#[cfg(feature = "cuda")]
|
||||
unsafe impl<T: RealField + cust_core::DeviceCopy, C: TCategory, const D: usize>
|
||||
cust_core::DeviceCopy for Transform<T, C, D>
|
||||
where
|
||||
Const<D>: DimNameAdd<U1>,
|
||||
DefaultAllocator: Allocator<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>,
|
||||
Owned<T, DimNameSum<Const<D>, U1>, DimNameSum<Const<D>, U1>>: cust_core::DeviceCopy,
|
||||
{
|
||||
}
|
||||
|
||||
impl<T: RealField, C: TCategory, const D: usize> Clone for Transform<T, C, D>
|
||||
where
|
||||
Const<D>: DimNameAdd<U1>,
|
||||
|
@ -32,7 +32,6 @@ use rkyv::bytecheck;
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "rkyv-serialize", derive(bytecheck::CheckBytes))]
|
||||
#[cfg_attr(feature = "cuda", derive(cust_core::DeviceCopy))]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct Translation<T, const D: usize> {
|
||||
/// The translation coordinates, i.e., how much is added to a point's coordinates when it is
|
||||
|
@ -31,9 +31,6 @@ use std::cmp::{Eq, PartialEq};
|
||||
/// * [Conversion to a matrix <span style="float:right;">`to_rotation_matrix`, `to_homogeneous`…</span>](#conversion-to-a-matrix)
|
||||
pub type UnitComplex<T> = Unit<Complex<T>>;
|
||||
|
||||
#[cfg(feature = "cuda")]
|
||||
unsafe impl<T: cust_core::DeviceCopy> cust_core::DeviceCopy for UnitComplex<T> {}
|
||||
|
||||
impl<T: Scalar + PartialEq> PartialEq for UnitComplex<T> {
|
||||
#[inline]
|
||||
fn eq(&self, rhs: &Self) -> bool {
|
||||
|
Loading…
Reference in New Issue
Block a user