cornell-zhang / bnn-fpga

Binarized Convolutional Neural Networks on Software-Programmable FPGAs
BSD 3-Clause "New" or "Revised" License
301 stars 112 forks source link

max_align_t problem #5

Closed qingzengsong closed 6 years ago

qingzengsong commented 7 years ago

when mak in cpp,I have a problem ‘’max_align_t‘’. In file included from /opt/Xilinx/SDx/2016.4/Vivado_HLS/include/gmp.h:53:0, from /opt/Xilinx/SDx/2016.4/Vivado_HLS/include/floating_point_v7_0_bitacc_cmodel.h:143, from /opt/Xilinx/SDx/2016.4/Vivado_HLS/include/hls_half.h:40, from /opt/Xilinx/SDx/2016.4/Vivado_HLS/include/ap_int.h:28, from ../utils/Typedefs.h:4, from AccelTest.h:4, from AccelTest.cpp:1: /usr/include/c++/5/cstddef:51:11: error: ‘::max_align_t’ has not been declared using ::max_align_t; ^

I add #include to ParamIO.cpp Common.cpp DataIO.cpp AccelTest.cpp can solve this problem.

But, this wether lead other problem, since 'ParamIO.cpp Common.cpp DataIO.cpp AccelTest.cpp' will be build by Vivado_HLS?

MinLiAmoy commented 7 years ago

I met the same problem. I added #include and the problem was solved. There's no problem with the SDSoC.

qingzengsong commented 7 years ago

But I have the problem since #include with the sdsoc. There is error,

发自我的 iPhone

在 2017年8月17日,14:36,MinLi notifications@github.com 写道:

I met the same problem. I added #include and the problem was solved. There's no problem with the SDSoC.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

qingzengsong commented 7 years ago

Pragma processor failed: In file included from /home/songqingzeng/bnn-fpga-master/cpp/accel/Accel.cpp:1: the Accel.cpp :1 is "#include "

发自我的 iPhone

在 2017年8月17日,14:36,MinLi notifications@github.com 写道:

I met the same problem. I added #include and the problem was solved. There's no problem with the SDSoC.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

yunchenlo commented 6 years ago

@qingzengsong @MinLiAmoy May I know what specifically should I change to solve this problem, thanks! Jason Lo

rzhao01 commented 6 years ago

Looking online, the solution is to do #include<cstddef> before any other headers.

hex0102 commented 6 years ago

I added #include \<cstddef> in every .cpp file in both utils and accel. It seems work.