Skip to content

Commit

Permalink
Fix complex support.
Browse files Browse the repository at this point in the history
And enable complex tests. Fixes #6.
  • Loading branch information
devinamatthews committed Jul 3, 2017
2 parents 237c870 + 6723710 commit cb3ba61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/basic_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ namespace matrix_constants

typedef struct tblis_scalar
{
type_t type;
union scalar
{
float s;
Expand All @@ -188,14 +187,15 @@ typedef struct tblis_scalar
scalar(dcomplex v) : z(v) {}
#endif
} data;
type_t type;

#if defined(__cplusplus) && !defined(TBLIS_DONT_USE_CXX11)

tblis_scalar() : type(TYPE_DOUBLE), data(1.0) {}
tblis_scalar() : data(1.0), type(TYPE_DOUBLE) {}

template <typename T>
tblis_scalar(T value)
: type(type_tag<T>::value), data(value) {}
: data(value), type(type_tag<T>::value) {}

template <typename T>
T& get();
Expand Down

0 comments on commit cb3ba61

Please sign in to comment.