Skip to content

Commit

Permalink
Replace tests for __APPLE__ with tests for __cpp_lib_smart_ptr_for_ov…
Browse files Browse the repository at this point in the history
…erwrite
  • Loading branch information
lums658 authored and ihnorton committed Dec 5, 2023
1 parent 2ad1ae4 commit 7ee2a8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/include/detail/linalg/tdb_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class tdbBlockedMatrix : public Matrix<T, LayoutPolicy, I> {
blocksize_ = upper_bound;
}

#ifndef __APPLE__
#ifdef __cpp_lib_smart_ptr_for_overwrite
auto data_ = std::make_unique_for_overwrite<T[]>(dimension * blocksize_);
#else
// auto data_ = std::make_unique<T[]>(new T[mat_rows_ * mat_cols_]);
Expand Down Expand Up @@ -341,7 +341,7 @@ class tdbBlockedMatrix : public Matrix<T, LayoutPolicy, I> {
auto num_rows = row_end - row_begin;
auto num_cols = col_end - col_begin;

#ifndef __APPLE__
#ifdef __cpp_lib_smart_ptr_for_overwrite
auto data_ = std::make_unique_for_overwrite<T[]>(num_rows * num_cols);
#else
// auto data_ = std::make_unique<T[]>(new T[mat_rows_ * mat_cols_]);
Expand Down
2 changes: 1 addition & 1 deletion src/include/detail/linalg/tdb_partitioned_matrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class tdbPartitionedMatrix : public Matrix<T, LayoutPolicy, I> {
ids_.resize(max_cols_);
}

#ifndef __APPLE__
#ifdef __cpp_lib_smart_ptr_for_overwrite
auto data_ = std::make_unique_for_overwrite<T[]>(dimension * max_cols_);
#else
auto data_ = std::unique_ptr<T[]>(new T[dimension * max_cols_]);
Expand Down

0 comments on commit 7ee2a8f

Please sign in to comment.