Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace tests for __APPLE__ with tests for __cpp_lib_smart_ptr_for_overwrite #157

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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