Remove const for Point1::new when targetting cuda
@@ -202,11 +202,29 @@ 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),*);* $(;)*) => {$(
