AlexeyAB
2018-08-09 3baf534a2d603f6b20a06ca45c29350e52a859fb
Compile error fix
2 files modified
8 ■■■■■ changed files
src/gemm.c 7 ●●●●● patch | view | raw | blame | history
src/gemm.h 1 ●●●● patch | view | raw | blame | history
src/gemm.c
@@ -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 @@
    return _mm256_sad_epu8(total, _mm256_setzero_si256());
}
static inline int popcnt256_custom(__m256i n) {
    __m256i val = count256(n);
@@ -474,11 +479,13 @@
{
    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)
src/gemm.h
@@ -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;