赞
踩
pool_core.h
- #ifndef __POOL_CORE_H__
- #define __POOL_CORE_H__
-
- #include <ap_int.h>
- #include <iostream>
-
- typedef float Dtype_f;
-
- void Pool(ap_uint<16> CHin,ap_uint<16> Hin,ap_uint<16> Win,
- ap_uint<8> Kx,ap_uint<8> Ky,ap_uint<2> mode,
- Dtype_f feature_in[],Dtype_f feature_out[]
- );//mode: 0:MEAN, 1:MIN, 2:MAX
-
- #endif
pool_core.cpp
- #include "pool_core.h"
-
- #define max(a,b) ((a>b)?a:b)
- #define min(a,b) ((a>b)?b:a)
-
- void Pool(ap_uint<16> CHin,ap_uint<16> Hin,ap_uint<16> Win,
- ap_uint<8> Kx,ap_uint<8> Ky,ap_uint<2> mode,
- Dtype_f feature_in[],Dtype_f feature_out[]
- )//mode: 0:MEAN, 1:MIN, 2:MAX
- {
- #pragma HLS INTERFACE m_axi depth=4294967295 port=feature_out offset=slave
- #pragma HLS INTERFACE m_axi depth=4294967295 port=feature_in offset=slave
- #pragma HLS INTERFACE s_axilite port
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。