tdf#151548 ContentControls: Add Delete()
[LibreOffice.git] / include / tools / simd.hxx
blobbdfdb8928271bd60aad9a680fb11b9c9f768299c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 */
11 #ifndef INCLUDED_TOOLS_SIMD_HXX
12 #define INCLUDED_TOOLS_SIMD_HXX
14 namespace simd
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: */