|
1 | | -From Coq Require Import Sint63 Uint63. |
| 1 | +From Coq Require Import Sint63 Uint63 PrimArray. |
2 | 2 | From NeuralNetInterp.Torch Require Import Tensor. |
3 | 3 | From NeuralNetInterp.Util Require Import Slice Arith.Classes Arith.Instances PolymorphicOption Nat Notations. |
4 | 4 | Import Instances.Uint63. |
@@ -219,44 +219,44 @@ Module SliceIndex. |
219 | 219 | Export SliceIndexNotations0. |
220 | 220 | Notation "t .[ x , .. , y ]" |
221 | 221 | := (SliceIndex.slice (snoc .. (snoc nil x) .. y) t%raw_tensor) |
222 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
| 222 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
223 | 223 | : raw_tensor_scope. |
224 | 224 | Notation "t .[ x , .. , y ]" |
225 | 225 | := (SliceIndex.slice (snoc .. (snoc nil x) .. y) t%tensor) |
226 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
| 226 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
227 | 227 | : tensor_scope. |
228 | 228 | Notation "t .[ … , x , .. , y ]" |
229 | 229 | := (SliceIndex.slice (snoc .. (snoc elipsis x) .. y) t%raw_tensor) |
230 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
| 230 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
231 | 231 | : raw_tensor_scope. |
232 | 232 | Notation "t .[ … , x , .. , y ]" |
233 | 233 | := (SliceIndex.slice (snoc .. (snoc elipsis x) .. y) t%tensor) |
234 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
| 234 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
235 | 235 | : tensor_scope. |
236 | 236 | Notation "t .[< i >]" |
237 | 237 | := (SliceIndex.slice (snoc nil i) t%tensor) |
238 | | - (at level 2, i custom fancy_slice at level 60, left associativity, format "t .[< i >]") |
| 238 | + (i custom fancy_slice at level 60, left associativity, format "t .[< i >]") |
239 | 239 | : tensor_scope. |
240 | 240 |
|
241 | 241 | Notation "t .[ x , .. , y ] <- v" |
242 | 242 | := (SliceIndex.set_slice (snoc .. (snoc nil x) .. y) t%raw_tensor v%raw_tensor) |
243 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v") |
| 243 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v") |
244 | 244 | : raw_tensor_scope. |
245 | 245 | Notation "t .[ x , .. , y ] <- v" |
246 | 246 | := (SliceIndex.set_slice (snoc .. (snoc nil x) .. y) t%tensor v%tensor) |
247 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v") |
| 247 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ x , .. , y ] <- v") |
248 | 248 | : tensor_scope. |
249 | 249 | Notation "t .[ … , x , .. , y ] <- v" |
250 | 250 | := (SliceIndex.set_slice (snoc .. (snoc elipsis x) .. y) t%raw_tensor v%raw_tensor) |
251 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v") |
| 251 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v") |
252 | 252 | : raw_tensor_scope. |
253 | 253 | Notation "t .[ … , x , .. , y ] <- v" |
254 | 254 | := (SliceIndex.set_slice (snoc .. (snoc elipsis x) .. y) t%tensor v%tensor) |
255 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v") |
| 255 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, no associativity, format "t .[ … , x , .. , y ] <- v") |
256 | 256 | : tensor_scope. |
257 | 257 | Notation "t .[< i >] <- v" |
258 | 258 | := (SliceIndex.set_slice (snoc nil i) t%tensor v%tensor) |
259 | | - (at level 2, i custom fancy_slice at level 60, no associativity, format "t .[< i >] <- v") |
| 259 | + (i custom fancy_slice at level 60, no associativity, format "t .[< i >] <- v") |
260 | 260 | : tensor_scope. |
261 | 261 | End SliceIndexNotations. |
262 | 262 | End SliceIndex. |
@@ -362,23 +362,23 @@ Module FancyIndex. |
362 | 362 | Delimit Scope fancy_raw_tensor_scope with fancy_raw_tensor. |
363 | 363 | Notation "t .[ x , .. , y ]" |
364 | 364 | := (FancyIndex.slice (snoc .. (snoc nil x) .. y) t%fancy_raw_tensor) |
365 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
| 365 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
366 | 366 | : fancy_raw_tensor_scope. |
367 | 367 | Notation "t .[ x , .. , y ]" |
368 | 368 | := (FancyIndex.slice (snoc .. (snoc nil x) .. y) t%fancy_tensor) |
369 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
| 369 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ x , .. , y ]") |
370 | 370 | : fancy_tensor_scope. |
371 | 371 | Notation "t .[ … , x , .. , y ]" |
372 | 372 | := (FancyIndex.slice (snoc .. (snoc elipsis x) .. y) t%fancy_raw_tensor) |
373 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
| 373 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
374 | 374 | : fancy_raw_tensor_scope. |
375 | 375 | Notation "t .[ … , x , .. , y ]" |
376 | 376 | := (FancyIndex.slice (snoc .. (snoc elipsis x) .. y) t%fancy_tensor) |
377 | | - (at level 2, x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
| 377 | + (x custom fancy_slice at level 60, y custom fancy_slice at level 60, left associativity, format "t .[ … , x , .. , y ]") |
378 | 378 | : fancy_tensor_scope. |
379 | 379 | Notation "t .[< i >]" |
380 | 380 | := (FancyIndex.slice (snoc nil i) t%fancy_tensor) |
381 | | - (at level 2, i custom fancy_slice at level 60, left associativity, format "t .[< i >]") |
| 381 | + (i custom fancy_slice at level 60, left associativity, format "t .[< i >]") |
382 | 382 | : fancy_tensor_scope. |
383 | 383 | End FancyIndexNotations. |
384 | 384 | End FancyIndex. |
|
0 commit comments