From 89354d0a0ce6fbb22ff262658045cdb8796ff6fd Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Fri, 04 May 2018 20:52:05 +0000
Subject: [PATCH] Fixed memory leaks. And fixes for Web-camera and IP-camera.
---
src/gemm.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gemm.c b/src/gemm.c
index 0efefd0..317fd65 100644
--- a/src/gemm.c
+++ b/src/gemm.c
@@ -92,6 +92,7 @@
#include <ammintrin.h>
#include <immintrin.h>
#include <smmintrin.h>
+#include <cpuid.h>
void asm_cpuid(uint32_t* abcd, uint32_t eax)
{
@@ -109,6 +110,7 @@
abcd[2] = ecx;
abcd[3] = edx;
}
+
#endif
int simd_detect_x86(unsigned int idFeature)
@@ -118,8 +120,8 @@
__cpuid(regs, 0);
if (regs[0] > 1U) __cpuid(regs, 1);
#else
- asm_cpuid(regs, 0);
- if (regs[0] > 1U) asm_cpuid(regs, 0);
+ __get_cpuid(0, ®s[0], ®s[1], ®s[2], ®s[3]);
+ if(regs[0] > 1U) __get_cpuid(1, ®s[0], ®s[1], ®s[2], ®s[3]);
#endif
if ((regs[2] & idFeature) != idFeature)
--
Gitblit v1.10.0