Skip to content

Commit

Permalink
Add explicit specifier to Parallel Matrix constructors.
Browse files Browse the repository at this point in the history
This avoids the use of certain parallel matrix constructors for
dangerous implicit conversions.
  • Loading branch information
andrewreisner committed Sep 30, 2024
1 parent 9971966 commit 0e2b849
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions raptor/core/par_matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ namespace raptor
class ParMatrix
{
public:
ParMatrix(Partition* part)
explicit ParMatrix(Partition* part)
{
partition = part;
partition->num_shared++;
Expand Down Expand Up @@ -347,7 +347,7 @@ namespace raptor
class ParCOOMatrix : public ParMatrix
{
public:
ParCOOMatrix(bool form_mat = true) : ParMatrix()
explicit ParCOOMatrix(bool form_mat = true) : ParMatrix()
{
if (form_mat)
{
Expand Down Expand Up @@ -483,7 +483,7 @@ namespace raptor
class ParCSRMatrix : public ParMatrix
{
public:
ParCSRMatrix(bool form_mat = true) : ParMatrix()
explicit ParCSRMatrix(bool form_mat = true) : ParMatrix()
{
if (form_mat)
{
Expand Down Expand Up @@ -703,7 +703,7 @@ namespace raptor
class ParCSCMatrix : public ParMatrix
{
public:
ParCSCMatrix(bool form_mat = true) : ParMatrix()
explicit ParCSCMatrix(bool form_mat = true) : ParMatrix()
{
if (form_mat)
{
Expand Down

0 comments on commit 0e2b849

Please sign in to comment.