| @@ -310,7 +310,7 @@ typedef int blasint; | |||||
| #endif | #endif | ||||
| #if defined(OS_WINDOWS) | #if defined(OS_WINDOWS) | ||||
| #ifdef _MSC_VER | |||||
| #if defined(_MSC_VER) && !defined(__clang__) | |||||
| #define YIELDING YieldProcessor() | #define YIELDING YieldProcessor() | ||||
| #else | #else | ||||
| #define YIELDING SwitchToThread() | #define YIELDING SwitchToThread() | ||||
| @@ -40,7 +40,7 @@ | |||||
| #include <string.h> | #include <string.h> | ||||
| #include "cpuid.h" | #include "cpuid.h" | ||||
| #ifdef _MSC_VER | |||||
| #if defined(_MSC_VER) && !defined(__clang__) | |||||
| #define C_INLINE __inline | #define C_INLINE __inline | ||||
| #else | #else | ||||
| #define C_INLINE inline | #define C_INLINE inline | ||||
| @@ -154,7 +154,7 @@ static C_INLINE int have_excpuid(void){ | |||||
| #ifndef NO_AVX | #ifndef NO_AVX | ||||
| static C_INLINE void xgetbv(int op, int * eax, int * edx){ | static C_INLINE void xgetbv(int op, int * eax, int * edx){ | ||||
| //Use binary code for xgetbv | //Use binary code for xgetbv | ||||
| #ifdef _MSC_VER | |||||
| #if defined(_MSC_VER) && !defined(__clang__) | |||||
| *eax = __xgetbv(op); | *eax = __xgetbv(op); | ||||
| #else | #else | ||||
| __asm__ __volatile__ | __asm__ __volatile__ | ||||
| @@ -769,12 +769,12 @@ static void *alloc_hugetlb(void *address){ | |||||
| if (LookupPrivilegeValue(NULL, SE_LOCK_MEMORY_NAME, &tp.Privileges[0].Luid) != TRUE) { | if (LookupPrivilegeValue(NULL, SE_LOCK_MEMORY_NAME, &tp.Privileges[0].Luid) != TRUE) { | ||||
| CloseHandle(hToken); | CloseHandle(hToken); | ||||
| return -1; | |||||
| return (void*)-1; | |||||
| } | } | ||||
| if (AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) != TRUE) { | if (AdjustTokenPrivileges(hToken, FALSE, &tp, 0, NULL, NULL) != TRUE) { | ||||
| CloseHandle(hToken); | CloseHandle(hToken); | ||||
| return -1; | |||||
| return (void*)-1; | |||||
| } | } | ||||
| map_address = (void *)VirtualAlloc(address, | map_address = (void *)VirtualAlloc(address, | ||||
| @@ -35,9 +35,13 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||||
| **************************************************************************************/ | **************************************************************************************/ | ||||
| #include "common.h" | #include "common.h" | ||||
| #include <complex.h> | |||||
| #ifndef _MSC_VER | |||||
| #include <complex.h> | |||||
| FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) | FLOAT _Complex CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) | ||||
| #else | |||||
| openblas_complex_double CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y) | |||||
| #endif | |||||
| { | { | ||||
| BLASLONG i=0; | BLASLONG i=0; | ||||
| BLASLONG ix=0,iy=0; | BLASLONG ix=0,iy=0; | ||||