Skip to content

Commit

Permalink
Merge pull request #209 from ROCmSoftwarePlatform/variable_template_o…
Browse files Browse the repository at this point in the history
…dr_master

Workaround clang bug with static variable templates
  • Loading branch information
leekillough authored May 12, 2020
2 parents 87d7229 + faea3e6 commit ea69580
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clients/include/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ template <typename T>
static constexpr bool is_complex = false;

template <>
constexpr bool is_complex<hipblasComplex> = true;
HIPBLAS_CLANG_STATIC constexpr bool is_complex<hipblasComplex> = true;

template <>
constexpr bool is_complex<hipblasDoubleComplex> = true;
HIPBLAS_CLANG_STATIC constexpr bool is_complex<hipblasDoubleComplex> = true;

// Get base types from complex types.
template <typename T, typename = void>
Expand Down
6 changes: 6 additions & 0 deletions library/include/hipblas.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
#include <hip/hip_runtime_api.h>
#include <stdint.h>

#if __clang__
#define HIPBLAS_CLANG_STATIC static
#else
#define HIPBLAS_CLANG_STATIC
#endif

typedef void* hipblasHandle_t;

typedef uint16_t hipblasHalf;
Expand Down

0 comments on commit ea69580

Please sign in to comment.