source: trunk/lib/bitblock_align.hpp @ 2006

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

Updated comments format.

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