Overview
Comment:Vectorisation
csex rep.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 42c317bf4245e072d044b344bab3439d1fa9fbac365e39793a90f4a1206a1b80
User & Date: gawthrop@users.sourceforge.net on 2000-10-11 09:07:53
Other Links: branch diff | manifest | tags
Context
2000-10-11
09:08:08
cse --> csex check-in: 5f75209ddf user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:07:53
Vectorisation
csex rep.
check-in: 42c317bf42 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:07:17
Added csex rep (cse without E) check-in: c5351966cd user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_r2m from [91f6e3a0f2] to [33d2b02988].

14
15
16
17
18
19
20



21
22
23
24
25
26
27
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.22  2000/09/15 08:27:07  peterg
## Removed debugging lines
##
## Revision 1.21  2000/08/30 11:43:40  peterg
## -optimise switch added
##
## Revision 1.20  2000/08/30 10:43:17  peterg







>
>
>







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.23  2000/10/10 21:00:43  peterg
## More reps added
##
## Revision 1.22  2000/09/15 08:27:07  peterg
## Removed debugging lines
##
## Revision 1.21  2000/08/30 11:43:40  peterg
## -optimise switch added
##
## Revision 1.20  2000/08/30 10:43:17  peterg
118
119
120
121
122
123
124
125
126




127
128

129
130
131

132
133

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153







154
155
156
157
158
159

# Remove the old log file
rm -f mtt_r2m.log

#Header
case $rep in
    cse)
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' 'mttedx,mtte' > $out
       ;;




    cseo)
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' mtty > $out

       ;;
    ode)
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' mttdx > $out

       ;;
    odeo)

    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' mtty > $out
       ;;
    sm)
    mtt_header  $1 $rep $ext mttpar 'mtta,mttb,mttc,mttd' > $out
       ;;
    *)
esac

#Convert from the (optimised) r file
echo >> $out
echo '## Code' >> $out
grep 'mtt' < $1_$2.r |\
sed \
    -e "s/^mtt/  mtt/" \
    -e "s/:=/=/" \
    -e "s/\\$/;/" \
 >> $out


echo endfunction >> $out








# Now invoke the standard error handling.
#mtt_error_r mtt_r2m.log










|

>
>
>
>

|
>


|
>


>
|


|





|
|
|




|


|
>
>
>
>
>
>
>






121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

# Remove the old log file
rm -f mtt_r2m.log

#Header
case $rep in
    cse)
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' 'mttedx,mtte' > mtt_junk
       ;;
    csex)
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' 'mttedx' > mtt_junk
    vectorise=yes
       ;;
    cseo)
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' mtty > mtt_junk
    vectorise=yes
       ;;
    ode)
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' mttdx > mtt_junk
    vectorise=yes
       ;;
    odeo)
    vectorise=yes
    mtt_header  $1 $rep $ext 'mttx,mttu,mttt,mttpar' mtty > mtt_junk
       ;;
    sm)
    mtt_header  $1 $rep $ext mttpar 'mtta,mttb,mttc,mttd' > mtt_junk
       ;;
    *)
esac

#Convert from the (optimised) r file
echo >> mtt_junk
echo '## Code' >> mtt_junk
grep 'mtt'  $1_$2.r |\
sed \
    -e "s/^mtt/  mtt/" \
    -e "s/:=/=/" \
    -e "s/\\$/;/" \
 >> mtt_junk


echo endfunction >> mtt_junk

# Vectorise (n,1) arrays when appropriate
if [ -n "$vectorise" ]; then
     mtt_vectorise <mtt_junk >$out
else
     mv mtt_junk $out
fi

# Now invoke the standard error handling.
#mtt_error_r mtt_r2m.log




MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]