| 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) \ |
|---|
| 26 | void 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 | |
|---|
| 33 | zero_type_cube(int8_t); |
|---|
| 34 | zero_type_cube(uint8_t); |
|---|
| 35 | zero_type_cube(int16_t); |
|---|
| 36 | zero_type_cube(uint16_t); |
|---|
| 37 | zero_type_cube(int32_t); |
|---|
| 38 | zero_type_cube(uint32_t); |
|---|
| 39 | zero_type_cube(int64_t); |
|---|
| 40 | zero_type_cube(uint64_t); |
|---|
| 41 | zero_type_cube(float); |
|---|
| 42 | zero_type_cube(double); |
|---|
| 43 | zero_type_cube(rgb8); |
|---|
| 44 | zero_type_cube(rgbx8); |
|---|
| 45 | |
|---|
| 46 | #undef set_type_cube_param |
|---|
| 47 | #define set_type_cube_param(t) \ |
|---|
| 48 | void 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 | |
|---|
| 56 | set_type_cube_param(int8_t); |
|---|
| 57 | set_type_cube_param(uint8_t); |
|---|
| 58 | set_type_cube_param(int16_t); |
|---|
| 59 | set_type_cube_param(uint16_t); |
|---|
| 60 | set_type_cube_param(int32_t); |
|---|
| 61 | set_type_cube_param(uint32_t); |
|---|
| 62 | set_type_cube_param(int64_t); |
|---|
| 63 | set_type_cube_param(uint64_t); |
|---|
| 64 | set_type_cube_param(float); |
|---|
| 65 | set_type_cube_param(double); |
|---|
| 66 | |
|---|
| 67 | |
|---|
| 68 | void 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 | |
|---|
| 76 | void 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 | |
|---|