Debian Codegraph @

ext/uvector/uvector.h.tmpl

raw
1 ///; Process this file with uvgen.scm to generate uvect.c
2 ///; Lines beginning with '///' are directives for ugven.scm.
3
4 ///;; Header ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5 ///(define *tmpl-prologue* (list
6 /*
7 * uvector - uniform (homogeneous) numeric vector types (SRFI-4)
8 *
9 * Copyright (c) 1999-2007 Shiro Kawai, All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 *
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * 3. Neither the name of the authors nor the names of its contributors
23 * may be used to endorse or promote products derived from this
24 * software without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
32 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *
38 * This file is automatically generated. DO NOT EDIT.
39 */
40
41 #ifndef GAUCHE_UVECT_H
42 #define GAUCHE_UVECT_H
43
44 #include <gauche.h>
45
46 SCM_DECL_BEGIN
47
48 #if defined(EXTUVECTOR_EXPORTS)
49 #define LIBGAUCHE_EXT_BODY
50 #endif
51 #include <gauche/extern.h> /* redefine SCM_EXTERN */
52
53 /*
54 * This header file is for other extension modules which need
55 * to access uniform vectors in C level.
56 */
57
58 SCM_EXTERN ScmObj Scm_UVectorAlias(ScmClass *klass, ScmUVector *v,
59 ScmSmallInt start, ScmSmallInt end);
60
61 SCM_EXTERN ScmObj Scm_UVectorCopy(ScmUVector *v,
62 ScmSmallInt start, ScmSmallInt end);
63 SCM_EXTERN ScmObj Scm_UVectorSwapBytes(ScmUVector *v, int option);
64 SCM_EXTERN ScmObj Scm_UVectorSwapBytesX(ScmUVector *v, int option);
65
66 SCM_EXTERN ScmObj Scm_ReadBlockX(ScmUVector *v, ScmPort *port,
67 ScmSmallInt start, ScmSmallInt end,
68 ScmSymbol *endian);
69 SCM_EXTERN ScmObj Scm_WriteBlock(ScmUVector *v, ScmPort *port,
70 ScmSmallInt start, ScmSmallInt end,
71 ScmSymbol *endian);
72
73 ///)) ;; tmpl-prologue
74
75 ///(define *tmpl-body* (list
76 /* ${T}Vector */
77
78 SCM_EXTERN ScmObj Scm_${T}VectorFill(ScmUVector *vec, ${etype} fill, int, int);
79 SCM_EXTERN ScmObj Scm_${T}VectorSet(ScmUVector *vec, int index, ScmObj val, int clamp);
80 SCM_EXTERN ScmObj Scm_${T}VectorToList(ScmUVector *vec, int start, int end);
81 SCM_EXTERN ScmObj Scm_${T}VectorCopy(ScmUVector *vec,
82 ScmSmallInt start, ScmSmallInt end);
83 SCM_EXTERN ScmObj Scm_${T}VectorCopyX(ScmUVector *dst, ScmSmallInt dstart,
84 ScmUVector *src, ScmSmallInt sstart,
85 ScmSmallInt send);
86 SCM_EXTERN ScmObj Scm_ObjArrayTo${T}Vector(ScmObj *arr, int size, int clamp);
87 SCM_EXTERN ScmObj Scm_${T}VectorToVector(ScmUVector *vec, int start, int end);
88 SCM_EXTERN ScmObj Scm_VectorTo${T}Vector(ScmVector *vec, int start, int end, int clamp);
89
90 /* arithmetics */
91 SCM_EXTERN ScmObj Scm_${T}VectorAdd(ScmUVector *s0, ScmObj s1, int clamp);
92 SCM_EXTERN ScmObj Scm_${T}VectorAddX(ScmUVector *s0, ScmObj s1, int clamp);
93 SCM_EXTERN ScmObj Scm_${T}VectorSub(ScmUVector *s0, ScmObj s1, int clamp);
94 SCM_EXTERN ScmObj Scm_${T}VectorSubX(ScmUVector *s0, ScmObj s1, int clamp);
95 SCM_EXTERN ScmObj Scm_${T}VectorMul(ScmUVector *s0, ScmObj s1, int clamp);
96 SCM_EXTERN ScmObj Scm_${T}VectorMulX(ScmUVector *s0, ScmObj s1, int clamp);
97 SCM_EXTERN ScmObj Scm_${T}VectorDiv(ScmUVector *s0, ScmObj s1, int clamp);
98 SCM_EXTERN ScmObj Scm_${T}VectorDivX(ScmUVector *s0, ScmObj s1, int clamp);
99
100 SCM_EXTERN ScmObj Scm_${T}VectorAnd(ScmUVector *s0, ScmObj s1);
101 SCM_EXTERN ScmObj Scm_${T}VectorAndX(ScmUVector *s0, ScmObj s1);
102 SCM_EXTERN ScmObj Scm_${T}VectorIor(ScmUVector *s0, ScmObj s1);
103 SCM_EXTERN ScmObj Scm_${T}VectorIorX(ScmUVector *s0, ScmObj s1);
104 SCM_EXTERN ScmObj Scm_${T}VectorXor(ScmUVector *s0, ScmObj s1);
105 SCM_EXTERN ScmObj Scm_${T}VectorXorX(ScmUVector *s0, ScmObj s1);
106
107 SCM_EXTERN ScmObj Scm_${T}VectorDotProd(ScmUVector *v0, ScmObj v1);
108 SCM_EXTERN ScmObj Scm_VM${T}VectorDotProd(ScmUVector *v0, ScmObj v1);
109 SCM_EXTERN ScmObj Scm_${T}VectorRangeCheck(ScmUVector *v0, ScmObj min, ScmObj max);
110 SCM_EXTERN ScmObj Scm_${T}VectorClamp(ScmUVector *v0, ScmObj min, ScmObj max);
111 SCM_EXTERN ScmObj Scm_${T}VectorClampX(ScmUVector *v0, ScmObj min, ScmObj max);
112
113 SCM_EXTERN ScmObj Scm_${T}VectorSwapBytes(ScmUVector *v0);
114 SCM_EXTERN ScmObj Scm_${T}VectorSwapBytesX(ScmUVector *v0);
115
116 ///)) ;; tmpl-body
117
118 ///(define *tmpl-epilogue* '(
119
120 #undef LIBGAUCHE_EXT_BODY
121
122 SCM_DECL_END
123
124 #endif /* GAUCHE_UVECT_H */
125
126 ///)) ;; tmpl-epilogue
127
128
129 ///; Local variables:
130 ///; mode: c
131 ///; end: