mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
Compile error fix
This commit is contained in:
@ -6,6 +6,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#if defined(_OPENMP)
|
||||||
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
void gemm_bin(int M, int N, int K, float ALPHA,
|
void gemm_bin(int M, int N, int K, float ALPHA,
|
||||||
char *A, int lda,
|
char *A, int lda,
|
||||||
float *B, int ldb,
|
float *B, int ldb,
|
||||||
@ -458,6 +462,7 @@ static inline __m256i count256(__m256i v) {
|
|||||||
|
|
||||||
return _mm256_sad_epu8(total, _mm256_setzero_si256());
|
return _mm256_sad_epu8(total, _mm256_setzero_si256());
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int popcnt256_custom(__m256i n) {
|
static inline int popcnt256_custom(__m256i n) {
|
||||||
__m256i val = count256(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;
|
int i;
|
||||||
|
|
||||||
|
#if defined(_OPENMP)
|
||||||
static int max_num_threads = 0;
|
static int max_num_threads = 0;
|
||||||
if (max_num_threads == 0) {
|
if (max_num_threads == 0) {
|
||||||
max_num_threads = omp_get_max_threads();
|
max_num_threads = omp_get_max_threads();
|
||||||
omp_set_num_threads(max_num_threads / 2);
|
omp_set_num_threads(max_num_threads / 2);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
for (i = 0; i < M; ++i)
|
for (i = 0; i < M; ++i)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef GEMM_H
|
#ifndef GEMM_H
|
||||||
#define GEMM_H
|
#define GEMM_H
|
||||||
#include "activations.h"
|
#include "activations.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
static inline void set_bit(unsigned char *const dst, size_t index) {
|
static inline void set_bit(unsigned char *const dst, size_t index) {
|
||||||
size_t dst_i = index / 8;
|
size_t dst_i = index / 8;
|
||||||
|
Reference in New Issue
Block a user