source: soft/giet_vm/applications/rosenfeld/nrc2/src/nrset2x.c

Last change on this file was 826, checked in by meunier, 7 years ago
  • Mise à jour NR2 et Rosenfeld
File size: 1.8 KB
Line 
1/* ----------------- */
2/* --- nrset2X.c --- */
3/* ----------------- */
4
5/*
6 * Copyright (c) 2000-2014, Lionel Lacassagne, All rights reserved
7 * Univ Paris Sud XI, CNRS
8 *
9 * Distributed under the Boost Software License, Version 1.0
10 * see accompanying file LICENSE.txt or copy it at
11 * http://www.boost.org/LICENSE_1_0.txt
12 */
13
14
15#include <stdio.h>
16#include <stddef.h>
17#include <stdlib.h>
18
19#include "mypredef.h"
20#include "nrtype.h"
21#include "nrtypex.h"
22#include "nrdef.h"
23#include "nrmacro.h"
24#include "nrkernel.h"
25
26#include "nrset1.h"
27#include "nrset2.h"
28#include "nrset2x.h"
29
30
31#undef zero_type_matrix
32#define zero_type_matrix(t) \
33void short_name(t,zero_,matrix)(t ** m, int32_t nrl, int32_t nrh, int32_t ncl, int32_t nch) \
34{                                              \
35    t * mi;                                    \
36    for (int32_t i = nrl; i <= nrh; i++) {     \
37        mi = m[i];                             \
38        for (int32_t j = ncl; j <= nch; j++) { \
39            mi[j].x = 0;                       \
40            mi[j].y = 0;                       \
41            INIT_Z;                            \
42        }                                      \
43    }                                          \
44}
45
46#define INIT_Z
47zero_type_matrix(si16Point);
48zero_type_matrix(ui16Point);
49zero_type_matrix(si32Point);
50zero_type_matrix(ui32Point);
51zero_type_matrix(f32Point);
52#undef INIT_Z
53#define INIT_Z ({ mi[j].z = 0; })
54zero_type_matrix(si16Triplet);
55zero_type_matrix(ui16Triplet);
56zero_type_matrix(si32Triplet);
57zero_type_matrix(ui32Triplet);
58zero_type_matrix(f32Triplet);
59
60
61
62// Local Variables:
63// tab-width: 4
64// c-basic-offset: 4
65// c-file-offsets:((innamespace . 0)(inline-open . 0))
66// indent-tabs-mode: nil
67// End:
68
69// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
70
Note: See TracBrowser for help on using the repository browser.