Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
skailasa committed Sep 26, 2022
1 parent d3a5490 commit 7a6e216
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 26 deletions.
4 changes: 2 additions & 2 deletions src/data_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ impl<Item: HScalar, const N: usize> ArrayContainer<Item, N> {
}
}

impl<Item: Scalar, const N: usize> Default for ArrayContainer<Item, N> {
impl<Item: HScalar, const N: usize> Default for ArrayContainer<Item, N> {
fn default() -> Self {
Self::new()
}
}

impl<'a, Item: Scalar> SliceContainer<'a, Item> {
impl<'a, Item: HScalar> SliceContainer<'a, Item> {
/// New slice container from a reference.
pub fn new(slice: &'a [Item]) -> SliceContainer<Item> {
SliceContainer::<Item> { data: slice }
Expand Down
12 changes: 0 additions & 12 deletions src/traits/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,17 @@
//! [MatrixTraitMut] additionally depends on the trait [RandomAccessMut] to provide
//! mutable access to matrix elements.
use crate::traits::{Layout, LayoutType, RandomAccess, RandomAccessMut, SizeIdentifier, SizeType};
<<<<<<< HEAD
use crate::types::Scalar;

/// Combined trait for basic matrix properties. See [crate::traits::matrix]
/// for details.
pub trait MatrixTrait<Item: Scalar, L: LayoutType, RS: SizeIdentifier, CS: SizeIdentifier>:
=======
use crate::types::HScalar;

/// Combined trait for basic matrix properties. See [crate::traits::matrix]
/// for details.
pub trait MatrixTrait<Item: HScalar, L: LayoutType, RS: SizeIdentifier, CS: SizeIdentifier>:
>>>>>>> main
RandomAccess<Item = Item> + Layout<Impl = L> + SizeType<R = RS, C = CS>
{
}

/// Combined trait for mutable matrices. See [crate::traits::matrix] for details.
<<<<<<< HEAD
pub trait MatrixTraitMut<Item: Scalar, L: LayoutType, RS: SizeIdentifier, CS: SizeIdentifier>:
=======
pub trait MatrixTraitMut<Item: HScalar, L: LayoutType, RS: SizeIdentifier, CS: SizeIdentifier>:
>>>>>>> main
RandomAccessMut<Item = Item> + MatrixTrait<Item, L, RS, CS>
{
}
Expand Down
12 changes: 0 additions & 12 deletions src/traits/random_access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@
//! the memory layout defined in that trait.
use crate::traits::{Layout, LayoutType};
<<<<<<< HEAD
use crate::types::{IndexType, Scalar};
=======
use crate::types::{HScalar, IndexType};
>>>>>>> main

/// This trait provides unsafe access to the underlying data. See
/// [Random Access](crate::traits::random_access) for a description.
Expand Down Expand Up @@ -101,11 +97,7 @@ fn assert_dimension1d(elem: IndexType, nelems: IndexType) {
);
}

<<<<<<< HEAD
impl<Item: Scalar, Mat: UnsafeRandomAccess<Item = Item> + Layout> RandomAccess for Mat {
=======
impl<Item: HScalar, Mat: UnsafeRandomAccess<Item = Item> + Layout> RandomAccess for Mat {
>>>>>>> main
fn get(&self, row: IndexType, col: IndexType) -> Self::Item {
assert_dimension(row, col, self.layout().dim());
unsafe { self.get_unchecked(row, col) }
Expand All @@ -117,11 +109,7 @@ impl<Item: HScalar, Mat: UnsafeRandomAccess<Item = Item> + Layout> RandomAccess
}
}

<<<<<<< HEAD
impl<Item: Scalar, Mat: UnsafeRandomAccessMut<Item = Item> + Layout> RandomAccessMut for Mat {
=======
impl<Item: HScalar, Mat: UnsafeRandomAccessMut<Item = Item> + Layout> RandomAccessMut for Mat {
>>>>>>> main
fn get_mut(&mut self, row: IndexType, col: IndexType) -> &mut Self::Item {
assert_dimension(row, col, self.layout().dim());
unsafe { self.get_unchecked_mut(row, col) }
Expand Down

0 comments on commit 7a6e216

Please sign in to comment.