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

Last change on this file since 808 was 772, checked in by meunier, 9 years ago
  • Ajout de l'application rosenfeld
  • Changement du nom du flag O_CREATE en O_CREAT
File size: 2.4 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#include <math.h> // fabs
19
20#include "mypredef.h"
21#include "nrtype.h"
22#include "nrtypex.h"
23#include "nrdef.h"
24#include "nrmacro.h"
25#include "nrkernel.h"
26
27#include "nrset1.h"
28#include "nrset2.h"
29#include "nrset2x.h"
30
31
32/* --------------------------------------------------------------------------------- */
33IMAGE_EXPORT(void) zero_si32Pmatrix(si32Point **m, long nrl,long nrh,long ncl,long nch)
34/* --------------------------------------------------------------------------------- */
35{
36    long i,j;
37    si32Point *mi;
38   
39    for(i=nrl; i<=nrh; i++) {
40        mi = m[i];
41        for(j=ncl; j<=nch; j++) {
42            mi[j].x = 0;
43            mi[j].y = 0;
44        }
45    }
46}
47/* ------------------------------------------------------------------------------- */
48IMAGE_EXPORT(void) zero_f32Pmatrix(f32Point **m, long nrl,long nrh,long ncl,long nch)
49/* ------------------------------------------------------------------------------- */
50{
51    long i,j;
52    f32Point *mi;
53   
54    for(i=nrl; i<=nrh; i++) {
55        mi = m[i];
56        for(j=ncl; j<=nch; j++) {
57            mi[j].x = 0;
58            mi[j].y = 0;
59        }
60    }
61}
62/* ----------------------------------------------------------------------------------- */
63IMAGE_EXPORT(void) zero_si32Tmatrix(si32Triplet **m, long nrl,long nrh,long ncl,long nch)
64/* ----------------------------------------------------------------------------------- */
65{
66    long i,j;
67    si32Triplet *mi;
68   
69    for(i=nrl; i<=nrh; i++) {
70        mi = m[i];
71        for(j=ncl; j<=nch; j++) {
72            mi[j].x = 0;
73            mi[j].y = 0;
74            mi[j].z = 0;
75        }
76    }
77}
78/* --------------------------------------------------------------------------------- */
79IMAGE_EXPORT(void) zero_f32Tmatrix(f32Triplet **m, long nrl,long nrh,long ncl,long nch)
80/* --------------------------------------------------------------------------------- */
81{
82    long i,j;
83    f32Triplet *mi;
84   
85    for(i=nrl; i<=nrh; i++) {
86        mi = m[i];
87        for(j=ncl; j<=nch; j++) {
88            mi[j].x = 0;
89            mi[j].y = 0;
90            mi[j].z = 0;
91        }
92    }
93}
Note: See TracBrowser for help on using the repository browser.