Skip to content

Commit

Permalink
Merge pull request #13366 from vbrunini/hip_unified_memory
Browse files Browse the repository at this point in the history
Fix some build errors with HIP unified memory
  • Loading branch information
ndellingwood authored Sep 6, 2024
2 parents 002d398 + 826b8ee commit 446b5b0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
16 changes: 8 additions & 8 deletions packages/amesos2/src/Amesos2_Umfpack_FunctionMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ namespace Amesos2 {
#ifdef HAVE_TEUCHOS_COMPLEX

template <>
struct FunctionMap<Umfpack,std::complex<double>>
struct FunctionMap<Umfpack,Kokkos::complex<double>>
{
typedef TypeMap<Umfpack,std::complex<double>> type_map;
typedef TypeMap<Umfpack,Kokkos::complex<double>> type_map;

/**
* \brief Binds to the appropriate Umfpack solver driver based on data type
*/

static double * stdComplexToUmfpackDoubleConversion(
const std::complex<double> v [ ])
const Kokkos::complex<double> v [ ])
{
return (double*)(&v[0]);
}
Expand All @@ -116,9 +116,9 @@ namespace Amesos2 {
int sys,
const int Ap [ ],
const int Ai [ ],
const std::complex<double> Ax [ ],
std::complex<double> X [ ],
const std::complex<double> B [ ],
const Kokkos::complex<double> Ax [ ],
Kokkos::complex<double> X [ ],
const Kokkos::complex<double> B [ ],
void *Numeric,
const double Control [UMFPACK_CONTROL],
double Info [UMFPACK_INFO])
Expand All @@ -133,7 +133,7 @@ namespace Amesos2 {
static int umfpack_numeric(
const int Ap [ ],
const int Ai [ ],
const std::complex<double> Ax [ ],
const Kokkos::complex<double> Ax [ ],
void *Symbolic,
void **Numeric,
const double Control[UMFPACK_CONTROL],
Expand All @@ -147,7 +147,7 @@ namespace Amesos2 {
int n_col,
const int Ap [ ],
const int Ai [ ],
const std::complex<double> Ax [ ],
const Kokkos::complex<double> Ax [ ],
void **Symbolic,
const double Control [UMFPACK_CONTROL],
double Info [UMFPACK_INFO])
Expand Down
4 changes: 2 additions & 2 deletions packages/amesos2/src/Amesos2_Umfpack_TypeMap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,14 @@ struct TypeMap<Umfpack,double>
template <>
struct TypeMap<Umfpack,std::complex<float> > // provide conversion from std::complex<float> to std::complex<double>
{
typedef std::complex<double> type;
typedef Kokkos::complex<double> type;
typedef double magnitude_type;
};

template <>
struct TypeMap<Umfpack,std::complex<double> >
{
typedef std::complex<double> type;
typedef Kokkos::complex<double> type;
typedef double magnitude_type;
};

Expand Down
1 change: 0 additions & 1 deletion packages/minitensor/src/MiniTensor_Geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ volume(Vector<T, N> const & p0, Vector<T, N> const & p1,
/// WARNING: This is not the center of mass.
///
template<typename T, Index N>
KOKKOS_INLINE_FUNCTION
Vector<T, N>
centroid(std::vector<Vector<T, N>> const & points);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ template <typename ValueType, typename DeviceType> class NumericToolsBase {
using host_space = typename host_device_type::execution_space;
using host_memory_space = typename host_device_type::memory_space;

using ordinal_type_array_host = typename ordinal_type_array::HostMirror;
using size_type_array_host = typename size_type_array::HostMirror;
using supernode_type_array_host = typename supernode_type_array::HostMirror;
using ordinal_type_array_host = Kokkos::View<ordinal_type *, host_device_type>;
using size_type_array_host = Kokkos::View<size_type *, host_device_type>;
using supernode_type_array_host = Kokkos::View<typename supernode_info_type::supernode_type *, host_device_type>;

protected:
///
Expand Down

0 comments on commit 446b5b0

Please sign in to comment.