source: soft/giet_vm/applications/rosenfeld/nrc2/include/nrbool2.h

Last change on this file was 822, checked in by meunier, 8 years ago

In rosenfeld:

  • Updated nrio0, nrio1, nrio2, nrio1f, nrio2f, nrio1x, nrbool1, nrbool2 and nralloc1 in the nrc2 lib in order to use macro-typed functions
  • Updated the simulation script to include performance evaluation with random images, and a script to generate graphs
  • Updated the clock.h to use 64-bit integers, which potentially breaks the printing on the giet
File size: 2.9 KB
Line 
1/* ----------------- */
2/* --- nrbool2.h --- */
3/* ----------------- */
4
5/*
6 * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved
7 * Univ Paris Sud XI, CNRS
8*/
9
10#ifndef _NR_BOOL2_H_
11#define _NR_BOOL2_H_
12
13#include "nrc_os_config.h"
14
15
16#define cmpeq_type_matrix(t) \
17int32_t short_name(t,cmpeq_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y)
18
19cmpeq_type_matrix(int8_t);
20cmpeq_type_matrix(uint8_t);
21cmpeq_type_matrix(int16_t);
22cmpeq_type_matrix(uint16_t);
23cmpeq_type_matrix(int32_t);
24cmpeq_type_matrix(uint32_t);
25cmpeq_type_matrix(int64_t);
26cmpeq_type_matrix(uint64_t);
27
28
29/*
30 * -----------
31 * --- Not ---
32 * -----------
33 */
34
35#define not_type_matrix(t) \
36void short_name(t,not_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y)
37
38not_type_matrix(int8_t);
39not_type_matrix(uint8_t);
40not_type_matrix(int16_t);
41not_type_matrix(uint16_t);
42not_type_matrix(int32_t);
43not_type_matrix(uint32_t);
44not_type_matrix(int64_t);
45not_type_matrix(uint64_t);
46not_type_matrix(rgb8);
47not_type_matrix(rgbx8);
48
49
50/*
51 * ----------
52 * --- Or ---
53 * ----------
54 */
55
56#define or_type_matrix(t) \
57void short_name(t,or_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z); \
58void short_name(t,orc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z)
59
60or_type_matrix(int8_t);
61or_type_matrix(uint8_t);
62or_type_matrix(int16_t);
63or_type_matrix(uint16_t);
64or_type_matrix(int32_t);
65or_type_matrix(uint32_t);
66or_type_matrix(int64_t);
67or_type_matrix(uint64_t);
68or_type_matrix(rgb8);
69or_type_matrix(rgbx8);
70
71
72/*
73 * -----------
74 * --- Xor ---
75 * -----------
76 */
77
78#define xor_type_matrix(t) \
79void short_name(t,xor_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z); \
80void short_name(t,xorc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z)
81
82xor_type_matrix(int8_t);
83xor_type_matrix(uint8_t);
84xor_type_matrix(int16_t);
85xor_type_matrix(uint16_t);
86xor_type_matrix(int32_t);
87xor_type_matrix(uint32_t);
88xor_type_matrix(int64_t);
89xor_type_matrix(uint64_t);
90xor_type_matrix(rgb8);
91xor_type_matrix(rgbx8);
92
93
94/*
95 * ----------
96 * --- And ---
97 * ----------
98 */
99
100#define and_type_matrix(t) \
101void short_name(t,and_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t ** Y, t ** Z); \
102void short_name(t,andc_,matrix)(t ** X, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch, t y, t ** Z)
103
104and_type_matrix(int8_t);
105and_type_matrix(uint8_t);
106and_type_matrix(int16_t);
107and_type_matrix(uint16_t);
108and_type_matrix(int32_t);
109and_type_matrix(uint32_t);
110and_type_matrix(int64_t);
111and_type_matrix(uint64_t);
112and_type_matrix(rgb8);
113and_type_matrix(rgbx8);
114
115
116#endif // _NR_BOOL2_H_
117
118// Local Variables:
119// tab-width: 4
120// c-basic-offset: 4
121// c-file-offsets:((innamespace . 0)(inline-open . 0))
122// indent-tabs-mode: nil
123// End:
124
125// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
126
Note: See TracBrowser for help on using the repository browser.