[PATCH] D75459: [mlir] Add padding to 1-D Vector in CRunnerUtils.h

Frank Laub via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 16:40:13 PST 2020


flaub added inline comments.


================
Comment at: mlir/include/mlir/ExecutionEngine/CRunnerUtils.h:85
   T vector[Dim];
+  char padding[detail::nextPowerOf2<sizeof(T[Dim])>() - sizeof(T[Dim])];
 };
----------------
With the above change, this can be:

```
char padding[detail::nextPowerOf2(sizeof(T[Dim])) - sizeof(T[Dim])];
```

Which I think is both easier to read and works on MSVC. We should probably try to use constexpr functions over template specialization now that we can use C++11.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75459/new/

https://reviews.llvm.org/D75459





More information about the llvm-commits mailing list