source: trunk/lib/bitblock_align.hpp @ 2093

Last change on this file since 2093 was 2093, checked in by ksherdy, 7 years ago

Minor updates.

File size: 565 bytes
RevLine 
[1918]1#ifndef BITBLOCK_ALIGN_HPP
2#define BITBLOCK_ALIGN_HPP
3
[1950]4/*=============================================================================
5  bitblock_align.hpp - Alignment assertion.
6  Created on:
7  Author: Ken Herdy
8=============================================================================*/
9
[1918]10#include "bitblock.hpp"
11#include <cassert>
12#using namespace std;
13
14static IDISA_ALWAYS_INLINE assert_align(BitBlock v) {
15    assert(0 != (&v) & (sizeof(BitBlock)-1));
16    return v;
17}
18
19#define ASSERT_BITBLOCK_ALIGN(v) assert_bitblock_align(v)
20
21#endif // BITBLOCK_ALIGN_HPP
Note: See TracBrowser for help on using the repository browser.