source: soft/giet_vm/applications/rosenfeld/nrc2/include/nrbool1.h @ 822

Last change on this file since 822 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.5 KB
Line 
1/* ----------------- */
2/* --- nrbool1.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_BOOL1_H_
11#define _NR_BOOL1_H_
12
13
14/* ========================== */
15/* === Logical operations === */
16/* ========================== */
17
18/* ----------- */
19/* --- Not --- */
20/* ----------- */
21/* Y = ! Y */
22
23#define not_type_vector(t) \
24void short_name(t,not_,vector)(t * X, int32_t ncl, int32_t nch, t * Y)
25
26not_type_vector(int8_t);
27not_type_vector(uint8_t);
28not_type_vector(int16_t);
29not_type_vector(uint16_t);
30not_type_vector(int32_t);
31not_type_vector(uint32_t);
32not_type_vector(int64_t);
33not_type_vector(uint64_t);
34not_type_vector(rgb8);
35not_type_vector(rgbx8);
36
37
38/* ---------- */
39/* --- Or --- */
40/* ---------- */
41/* Z = X | Y */
42
43#define or_type_vector(t) \
44void short_name(t,or_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
45void short_name(t,orc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
46
47or_type_vector(int8_t);
48or_type_vector(uint8_t);
49or_type_vector(int16_t);
50or_type_vector(uint16_t);
51or_type_vector(int32_t);
52or_type_vector(uint32_t);
53or_type_vector(int64_t);
54or_type_vector(uint64_t);
55or_type_vector(rgb8);
56or_type_vector(rgbx8);
57
58
59/* ----------- */
60/* --- Xor --- */
61/* ----------- */
62/* Z = X ^ Y */
63
64#define xor_type_vector(t) \
65void short_name(t,xor_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
66void short_name(t,xorc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
67
68xor_type_vector(int8_t);
69xor_type_vector(uint8_t);
70xor_type_vector(int16_t);
71xor_type_vector(uint16_t);
72xor_type_vector(int32_t);
73xor_type_vector(uint32_t);
74xor_type_vector(int64_t);
75xor_type_vector(uint64_t);
76xor_type_vector(rgb8);
77xor_type_vector(rgbx8);
78
79
80/* ----------- */
81/* --- And --- */
82/* ----------- */
83/* Z = X & Y */
84
85#define and_type_vector(t) \
86void short_name(t,and_,vector)(t * X, int32_t ncl, int32_t nch, t * Y, t * Z); \
87void short_name(t,andc_,vector)(t * X, int32_t ncl, int32_t nch, t y, t * Z)
88
89and_type_vector(int8_t);
90and_type_vector(uint8_t);
91and_type_vector(int16_t);
92and_type_vector(uint16_t);
93and_type_vector(int32_t);
94and_type_vector(uint32_t);
95and_type_vector(int64_t);
96and_type_vector(uint64_t);
97and_type_vector(rgb8);
98and_type_vector(rgbx8);
99
100
101#endif // _NR_BOOL1_H_
102
103// Local Variables:
104// tab-width: 4
105// c-basic-offset: 4
106// c-file-offsets:((innamespace . 0)(inline-open . 0))
107// indent-tabs-mode: nil
108// End:
109
110// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
111
Note: See TracBrowser for help on using the repository browser.