maxpool_layer on CPU uses AVX2 and OpenMP

This commit is contained in:
AlexeyAB
2018-08-21 20:44:18 +03:00
parent e1801f5aec
commit 8436251a05
3 changed files with 149 additions and 4 deletions

View File

@ -1,5 +1,6 @@
#include "maxpool_layer.h"
#include "cuda.h"
#include "gemm.h"
#include <stdio.h>
image get_maxpool_image(maxpool_layer l)
@ -79,6 +80,11 @@ void resize_maxpool_layer(maxpool_layer *l, int w, int h)
void forward_maxpool_layer(const maxpool_layer l, network_state state)
{
if (!state.train) {
forward_maxpool_layer_avx(state.input, l.output, l.indexes, l.size, l.w, l.h, l.out_w, l.out_h, l.c, l.pad, l.stride, l.batch);
return;
}
int b,i,j,k,m,n;
int w_offset = -l.pad / 2;
int h_offset = -l.pad / 2;