1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 #ifndef INCLUDED_TOOLS_SIMD_HXX
12 #define INCLUDED_TOOLS_SIMD_HXX
16 template <typename T
, unsigned int N
> inline bool isAligned(const T
* pointer
)
18 return 0 == (uintptr_t(pointer
) % N
);
21 template <typename T
> inline T
roundDown(T value
, unsigned int multiple
)
23 return value
& ~(multiple
- 1);
26 } // end namespace simd
28 #endif // INCLUDED_TOOLS_SIMD_HXX
30 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */