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

Last change on this file was 826, checked in by meunier, 7 years ago
  • Mise à jour NR2 et Rosenfeld
File size: 2.7 KB
Line 
1/* ---------------- */
2/* --- nrset3.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#include "mypredef.h"
15#include "nrtype.h"
16#include "nrdef.h"
17#include "nrmacro.h"
18#include "nrkernel.h"
19
20#include "nrset2.h"
21#include "nrset3.h"
22
23
24#undef zero_type_cube
25#define zero_type_cube(t) \
26void short_name(t,zero_,cube)(t *** c, int32_t k0, int32_t k1, int32_t i0, int32_t i1, int32_t j0, int32_t j1) \
27{                                                         \
28    for (int32_t k = k0; k <= k1; k++) {                  \
29        short_name(t,zero_,matrix)(c[k], i0, i1, j0, j1); \
30    }                                                     \
31}
32
33zero_type_cube(int8_t);
34zero_type_cube(uint8_t);
35zero_type_cube(int16_t);
36zero_type_cube(uint16_t);
37zero_type_cube(int32_t);
38zero_type_cube(uint32_t);
39zero_type_cube(int64_t);
40zero_type_cube(uint64_t);
41zero_type_cube(float);
42zero_type_cube(double);
43zero_type_cube(rgb8);
44zero_type_cube(rgbx8);
45
46#undef set_type_cube_param
47#define set_type_cube_param(t) \
48void short_name(t,set_,cube_param)(t *** c, int32_t k0, int32_t k1, int32_t i0, int32_t i1, int32_t j0, int32_t j1, t x, t xstep, t ystep, t zstep) \
49{                                        \
50    for (int32_t k = k0; k <= k1; k++) { \
51        short_name(t,set_,matrix_param)(c[k], i0, i1, j0, j1, x, xstep, ystep); \
52        x += zstep;                      \
53    }                                    \
54}
55
56set_type_cube_param(int8_t);
57set_type_cube_param(uint8_t);
58set_type_cube_param(int16_t);
59set_type_cube_param(uint16_t);
60set_type_cube_param(int32_t);
61set_type_cube_param(uint32_t);
62set_type_cube_param(int64_t);
63set_type_cube_param(uint64_t);
64set_type_cube_param(float);
65set_type_cube_param(double);
66
67
68void set_rgb8cube_param(rgb8 *** c, int32_t k0, int32_t k1, int32_t i0, int32_t i1, int32_t j0, int32_t j1, rgb8 x, rgb8 xstep, rgb8 ystep, rgb8 zstep)
69{
70    for (int32_t k = k0; k <= k1; k++) {
71        set_rgb8matrix_param(c[k], i0, i1, j0, j1, x, xstep, ystep);
72        RGB8_ADD(x, xstep, x);
73    }
74}
75
76void set_rgbx8cube_param(rgbx8 *** c, int32_t k0, int32_t k1, int32_t i0, int32_t i1, int32_t j0, int32_t j1, rgbx8 x, rgbx8 xstep, rgbx8 ystep, rgbx8 zstep)
77{
78    for (int32_t k = k0; k <= k1; k++) {
79        set_rgbx8matrix_param(c[k], i0, i1, j0, j1, x, xstep, ystep);
80        RGBX8_ADD(x, xstep, x);
81    }
82}
83
84
85// Local Variables:
86// tab-width: 4
87// c-basic-offset: 4
88// c-file-offsets:((innamespace . 0)(inline-open . 0))
89// indent-tabs-mode: nil
90// End:
91
92// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
93
Note: See TracBrowser for help on using the repository browser.