source: proto/pabloj/trunk/output/cpplang/pablo_definitions.hpp @ 3231

Last change on this file since 3231 was 3231, checked in by ksherdy, 6 years ago

Added a simple test to support the creation dump statement tests.

File size: 2.6 KB
Line 
1// GENERATED CODE. DO NOT MODIFY.
2//
3// This template includes the minimal set of runtime support libraries required
4// to support compilation of PabloJ generated C++ code (bitblock.hpp, carryQ.hpp,
5// pabloSupport.hpp, error_tracker.hpp)
6//
7// (c) 2012, 2013 Robert D. Cameron, Ken Herdy
8// All rights reserved.
9// Licensed to International Characters, Inc. under Academic Free License 3.0
10//
11//////////////////////////////////////////////////////////////////////////////////////////
12// @ global - Stream structure and stream function declarations.
13//
14//////////////////////////////////////////////////////////////////////////////////////////
15//
16#ifndef PABLO_DEFINITIONS_HPP
17#define PABLO_DEFINITIONS_HPP
18
19// runtime libraries
20#include <simd-lib/bitblock.hpp>
21#include <simd-lib/carryQ.hpp>
22#include <simd-lib/pabloSupport.hpp>
23
24// migrate error tracker, line/column tracker to compiler runtime
25#include <ErrorTracker.h>
26ErrorTracker error_tracker;
27
28#define assert_0_error(errkind, errstrm) error_tracker.NoteError(errkind, errstrm);
29BitBlock EOF_mask = simd<1>::constant<1>();
30
31
32// XMLWF application headers and definitions
33/*
34#include <stdio.h>
35#include <stdlib.h>
36#include <errno.h>
37#include <sys/types.h>
38#include <sys/stat.h>
39
40#include <simd-lib/s2p.hpp>
41#include <simd-lib/buffer.hpp>
42#include <simd-lib/bitblock_iterator.hpp>
43#include <simd-lib/perflib/perfsec.h>
44
45#include <xmldecl.h>
46#include <namechars.h>
47#include <LineColTracker.hpp>
48#include <XMLTestSuiteError.h>
49
50// Define the mappings for pablo.assert_0(strm, errkind) statements which
51// compile to the the form assert_0_error(errkind, strm)
52#include <ErrorTracker.h>
53
54ErrorTracker error_tracker;
55#define assert_0_error(errkind, errstrm) error_tracker.NoteError(errkind, errstrm);
56*/
57
58// namespace pablo
59// {
60struct KernelName
61{
62        KernelName()
63        {
64               
65        }
66         
67        IDISA_INLINE void do_block()
68        {
69                BitBlock a;
70                BitBlock b;
71                BitBlock c;
72                BitBlock k;
73                BitBlock r;
74                bool t;
75                t = bitblock::any(a);
76                r = bitblock::slli<10>(a);
77                bitblock::store_unaligned(a, &b);
78                r = bitblock::load_aligned(&b);
79                r = simd_not(a);
80                r = simd_nor(a,b);
81                r = simd<16>::ifh(a,b,c);
82                r = simd<2>::constant<3>();
83                r = simd<8>::slli<1>(a);
84                r = simd<1>::add(a,b);
85                r = simd<2>::sub(a,b);
86                r = simd<4>::mult(a,b);
87                r = simd<8>::eq(a,b);
88                r = simd<16>::gt(a,b);
89                r = simd<32>::ugt(a,b);
90                r = simd<64>::lt(a,b);
91                r = simd<128>::ult(a,b);
92                r = simd<128>::max(a,b);
93                r = simd<1>::umax(a,b);
94                r = simd<2>::min(a,b);
95                r = simd<4>::umin(a,b);
96                r = simd<64>::sll(a,b);
97                r = simd<64>::srl(a,b);
98        }
99       
100        void do_final_block()
101        {
102               
103        }
104       
105        CarryDeclare(carry_set_0,0,0);
106};
107 
108
109// } // pablo namespace
110
111#endif // PABLO_DEFINITIONS_HPP
Note: See TracBrowser for help on using the repository browser.