相关疑难解决方法(0)

为什么gcc autovectorization对3x3的卷积矩阵不起作用?

我已经为卷积矩阵实现了以下程序

#include <stdio.h>
#include <time.h>

#define NUM_LOOP 1000
#define N 128   //input or output dimention 1
#define M N     //input or output dimention 2
#define P 5 //convolution matrix dimention 1 if you want a 3x3 convolution matrix it must be 3
#define Q P     //convolution matrix dimention 2
#define Csize P*Q   
#define Cdiv  1     //div for filter 
#define Coffset 0   //offset 

//functions
void unusual(); //unusual implementation of convolution
void naive();
//data
unsigned short int input[N][M] __attribute__(( aligned(32))); // input …
Run Code Online (Sandbox Code Playgroud)

c x86 gcc compiler-optimization auto-vectorization

10
推荐指数
1
解决办法
363
查看次数

标签 统计

auto-vectorization ×1

c ×1

compiler-optimization ×1

gcc ×1

x86 ×1