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) \ |
---|
33 | void 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 |
---|
47 | zero_type_matrix(si16Point); |
---|
48 | zero_type_matrix(ui16Point); |
---|
49 | zero_type_matrix(si32Point); |
---|
50 | zero_type_matrix(ui32Point); |
---|
51 | zero_type_matrix(f32Point); |
---|
52 | #undef INIT_Z |
---|
53 | #define INIT_Z ({ mi[j].z = 0; }) |
---|
54 | zero_type_matrix(si16Triplet); |
---|
55 | zero_type_matrix(ui16Triplet); |
---|
56 | zero_type_matrix(si32Triplet); |
---|
57 | zero_type_matrix(ui32Triplet); |
---|
58 | zero_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 | |
---|