Compile error fix

This commit is contained in:
AlexeyAB
2018-08-09 03:07:06 +03:00
parent d6162af210
commit 3baf534a2d
2 changed files with 1218 additions and 1210 deletions

View File

@ -6,6 +6,10 @@
#include <stdio.h>
#include <math.h>
#if defined(_OPENMP)
#include <omp.h>
#endif
void gemm_bin(int M, int N, int K, float ALPHA,
char *A, int lda,
float *B, int ldb,
@ -458,6 +462,7 @@ static inline __m256i count256(__m256i v) {
return _mm256_sad_epu8(total, _mm256_setzero_si256());
}
static inline int popcnt256_custom(__m256i n) {
__m256i val = count256(n);
@ -474,11 +479,13 @@ void gemm_nn_custom_bin_mean_transposed(int M, int N, int K, float ALPHA_UNUSED,
{
int i;
#if defined(_OPENMP)
static int max_num_threads = 0;
if (max_num_threads == 0) {
max_num_threads = omp_get_max_threads();
omp_set_num_threads(max_num_threads / 2);
}
#endif
#pragma omp parallel for
for (i = 0; i < M; ++i)

View File

@ -1,6 +1,7 @@
#ifndef GEMM_H
#define GEMM_H
#include "activations.h"
#include <stdint.h>
static inline void set_bit(unsigned char *const dst, size_t index) {
size_t dst_i = index / 8;