Skip to content

Commit

Permalink
Merge pull request #9193 from cms-sw/hls-constexpr-patch
Browse files Browse the repository at this point in the history
[HLS] Apply constexpr patch
  • Loading branch information
smuzaffar authored May 15, 2024
2 parents a46abdc + 1cb3882 commit 08fb0e9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions hls-fix-constexpr.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/include/ap_int_base.h b/include/ap_int_base.h
index 091552a..1d30fea 100644
--- a/include/ap_int_base.h
+++ b/include/ap_int_base.h
@@ -122,7 +122,7 @@ struct ap_int_base : public _AP_ROOT_TYPE<_AP_W, _AP_S> {
*/
typedef typename retval<AP_MAX((_AP_W + 7) / 8, 8), _AP_S>::Type RetType;

- static const int width = _AP_W;
+ constexpr static const int width = _AP_W;

template <int _AP_W2, bool _AP_S2>
struct RType {
2 changes: 2 additions & 0 deletions hls.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
%define runpath_opts -m examples
Source: git+https://github.com/%{github_user}/HLS_arbitrary_Precision_Types.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Patch0: hls-fix-uninitialized
Patch1: hls-fix-constexpr
Requires: gmake

%prep
%setup -n %{n}-%{realversion}
%patch0 -p1
%patch1 -p1

%build

Expand Down

0 comments on commit 08fb0e9

Please sign in to comment.