-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoutenance.html
1133 lines (1087 loc) · 119 KB
/
soutenance.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang="en-US"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"><meta name="apple-mobile-web-app-capable" content="yes"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta property="og:type" content="website"><meta name="twitter:card" content="summary"><style>@media screen{body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button{-webkit-tap-highlight-color:transparent;-webkit-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;cursor:pointer;font-size:inherit;opacity:.8;outline:none;padding:0;transition:opacity .2s linear}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:disabled,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:disabled,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:disabled,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:disabled{cursor:not-allowed;opacity:.15!important}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover{opacity:1}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:active,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:active,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover:active,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover:active{opacity:.6}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:not(:disabled),body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button:hover:not(:disabled),body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button:hover:not(:disabled),body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button:hover:not(:disabled){transition:none}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev],body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button.bespoke-marp-presenter-info-page-prev{background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJNNjggOTAgMjggNTBsNDAtNDAiLz48L3N2Zz4=") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button.bespoke-marp-presenter-info-page-next{background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJtMzIgOTAgNDAtNDAtNDAtNDAiLz48L3N2Zz4=") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=fullscreen],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=fullscreen]{background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmF7ZmlsbDpub25lO3N0cm9rZTojZmZmO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6NXB4fTwvc3R5bGU+PC9kZWZzPjxyZWN0IHdpZHRoPSI4MCIgaGVpZ2h0PSI2MCIgeD0iMTAiIHk9IjIwIiBjbGFzcz0iYSIgcng9IjUuNjciLz48cGF0aCBkPSJNNDAgNzBIMjBWNTBtMjAgMEwyMCA3MG00MC00MGgyMHYyMG0tMjAgMCAyMC0yMCIgY2xhc3M9ImEiLz48L3N2Zz4=") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button.exit[data-bespoke-marp-osc=fullscreen],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button.exit[data-bespoke-marp-osc=fullscreen]{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48ZGVmcz48c3R5bGU+LmF7ZmlsbDpub25lO3N0cm9rZTojZmZmO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2Utd2lkdGg6NXB4fTwvc3R5bGU+PC9kZWZzPjxyZWN0IHdpZHRoPSI4MCIgaGVpZ2h0PSI2MCIgeD0iMTAiIHk9IjIwIiBjbGFzcz0iYSIgcng9IjUuNjciLz48cGF0aCBkPSJNMjAgNTBoMjB2MjBtLTIwIDAgMjAtMjBtNDAgMEg2MFYzMG0yMCAwTDYwIDUwIiBjbGFzcz0iYSIvPjwvc3ZnPg==")}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=presenter],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=presenter]{background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJNODcuOCA0Ny41Qzg5IDUwIDg3LjcgNTIgODUgNTJIMzVhOC43IDguNyAwIDAgMS03LjItNC41bC0xNS42LTMxQzExIDE0IDEyLjIgMTIgMTUgMTJoNTBhOC44IDguOCAwIDAgMSA3LjIgNC41ek02MCA1MnYzNm0tMTAgMGgyME00NSA0MmgyMCIvPjwvc3ZnPg==") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button.bespoke-marp-presenter-note-bigger{background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJNMTIgNTBoODBNNTIgOTBWMTAiLz48L3N2Zz4=") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button.bespoke-marp-presenter-note-smaller{background:transparent url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAgMTAwIj48cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLXdpZHRoPSI1IiBkPSJNMTIgNTBoODAiLz48L3N2Zz4=") no-repeat 50%;background-size:contain;overflow:hidden;text-indent:100%;white-space:nowrap}}@keyframes __bespoke_marp_transition_reduced_outgoing__{0%{opacity:1}to{opacity:0}}@keyframes __bespoke_marp_transition_reduced_incoming__{0%{mix-blend-mode:plus-lighter;opacity:0}to{mix-blend-mode:plus-lighter;opacity:1}}.bespoke-marp-note,.bespoke-marp-osc,.bespoke-progress-parent{display:none;transition:none}@media screen{::view-transition-group(*){animation-duration:var(--marp-bespoke-transition-animation-duration,.5s);animation-timing-function:ease}::view-transition-new(*),::view-transition-old(*){animation-delay:0s;animation-direction:var(--marp-bespoke-transition-animation-direction,normal);animation-duration:var(--marp-bespoke-transition-animation-duration,.5s);animation-fill-mode:both;animation-name:var(--marp-bespoke-transition-animation-name,var(--marp-bespoke-transition-animation-name-fallback,__bespoke_marp_transition_no_animation__));mix-blend-mode:normal}::view-transition-old(*){--marp-bespoke-transition-animation-name-fallback:__bespoke_marp_transition_reduced_outgoing__;animation-timing-function:ease}::view-transition-new(*){--marp-bespoke-transition-animation-name-fallback:__bespoke_marp_transition_reduced_incoming__;animation-timing-function:ease}::view-transition-new(root),::view-transition-old(root){animation-timing-function:linear}::view-transition-new(__bespoke_marp_transition_osc__),::view-transition-old(__bespoke_marp_transition_osc__){animation-duration:0s!important;animation-name:__bespoke_marp_transition_osc__!important}::view-transition-new(__bespoke_marp_transition_osc__){opacity:0!important}.bespoke-marp-transition-warming-up::view-transition-group(*),.bespoke-marp-transition-warming-up::view-transition-new(*),.bespoke-marp-transition-warming-up::view-transition-old(*){animation-play-state:paused!important}body,html{height:100%;margin:0}body{background:#000;overflow:hidden}svg.bespoke-marp-slide{content-visibility:hidden;opacity:0;pointer-events:none;z-index:-1}svg.bespoke-marp-slide:not(.bespoke-marp-active) *{view-transition-name:none!important}svg.bespoke-marp-slide.bespoke-marp-active{content-visibility:visible;opacity:1;pointer-events:auto;z-index:0}svg.bespoke-marp-slide.bespoke-marp-active.bespoke-marp-active-ready *{animation-name:__bespoke_marp__!important}@supports not (content-visibility:hidden){svg.bespoke-marp-slide[data-bespoke-marp-load=hideable]{display:none}svg.bespoke-marp-slide[data-bespoke-marp-load=hideable].bespoke-marp-active{display:block}}}@media screen and (prefers-reduced-motion:reduce){svg.bespoke-marp-slide *{view-transition-name:none!important}}@media screen{[data-bespoke-marp-fragment=inactive]{visibility:hidden}body[data-bespoke-view=""] .bespoke-marp-parent,body[data-bespoke-view=next] .bespoke-marp-parent{inset:0;position:absolute}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc{view-transition-name:__bespoke_marp_transition_osc__;background:rgba(0,0,0,.65);border-radius:7px;bottom:50px;color:#fff;contain:paint;display:block;font-family:Helvetica,Arial,sans-serif;font-size:16px;left:50%;line-height:0;opacity:1;padding:12px;position:absolute;touch-action:manipulation;transform:translateX(-50%);transition:opacity .2s linear;-webkit-user-select:none;user-select:none;white-space:nowrap;will-change:transform;z-index:1}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>*,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>*{margin-left:6px}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>:first-child,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>:first-child{margin-left:0}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>span,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>span{opacity:.8}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>span[data-bespoke-marp-osc=page],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>span[data-bespoke-marp-osc=page]{display:inline-block;min-width:140px;text-align:center}body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=fullscreen],body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=presenter],body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=fullscreen],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=next],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=presenter],body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button[data-bespoke-marp-osc=prev]{height:32px;line-height:32px;width:32px}body[data-bespoke-view=""] .bespoke-marp-parent.bespoke-marp-inactive,body[data-bespoke-view=next] .bespoke-marp-parent.bespoke-marp-inactive{cursor:none}body[data-bespoke-view=""] .bespoke-marp-parent.bespoke-marp-inactive>.bespoke-marp-osc,body[data-bespoke-view=next] .bespoke-marp-parent.bespoke-marp-inactive>.bespoke-marp-osc{opacity:0;pointer-events:none}body[data-bespoke-view=""] svg.bespoke-marp-slide,body[data-bespoke-view=next] svg.bespoke-marp-slide{height:100%;left:0;position:absolute;top:0;width:100%}body[data-bespoke-view=""] .bespoke-progress-parent{background:#222;display:flex;height:5px;width:100%}body[data-bespoke-view=""] .bespoke-progress-parent+.bespoke-marp-parent{top:5px}body[data-bespoke-view=""] .bespoke-progress-parent .bespoke-progress-bar{background:#0288d1;flex:0 0 0;transition:flex-basis .2s cubic-bezier(0,1,1,1)}body[data-bespoke-view=next]{background:transparent}body[data-bespoke-view=presenter]{background:#161616}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container{display:grid;font-family:Helvetica,Arial,sans-serif;grid-template:"current dragbar next" minmax(140px,1fr) "current dragbar note" 2fr "info dragbar note" 3em;grid-template-columns:minmax(3px,var(--bespoke-marp-presenter-split-ratio,66%)) 0 minmax(3px,1fr);height:100%;left:0;position:absolute;top:0;width:100%}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-parent{grid-area:current;overflow:hidden;position:relative}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-parent svg.bespoke-marp-slide{height:calc(100% - 40px);left:20px;pointer-events:none;position:absolute;top:20px;-webkit-user-select:none;user-select:none;width:calc(100% - 40px)}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-parent svg.bespoke-marp-slide.bespoke-marp-active{filter:drop-shadow(0 3px 10px rgba(0,0,0,.5))}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-dragbar-container{background:#0288d1;cursor:col-resize;grid-area:dragbar;margin-left:-3px;opacity:0;position:relative;transition:opacity .4s linear .1s;width:6px;z-index:10}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-dragbar-container:hover{opacity:1}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-dragbar-container.active{opacity:1;transition-delay:0s}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-next-container{background:#222;cursor:pointer;display:none;grid-area:next;overflow:hidden;position:relative}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-next-container.active{display:block}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-next-container iframe.bespoke-marp-presenter-next{background:transparent;border:0;display:block;filter:drop-shadow(0 3px 10px rgba(0,0,0,.5));height:calc(100% - 40px);left:20px;pointer-events:none;position:absolute;top:20px;-webkit-user-select:none;user-select:none;width:calc(100% - 40px)}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container{background:#222;color:#eee;grid-area:note;position:relative;z-index:1}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container button{height:1.5em;line-height:1.5em;width:1.5em}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-presenter-note-wrapper{display:block;inset:0;position:absolute}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-presenter-note-buttons{background:rgba(0,0,0,.65);border-radius:4px;bottom:0;display:flex;gap:4px;margin:12px;opacity:0;padding:6px;pointer-events:none;position:absolute;right:0;transition:opacity .2s linear}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-presenter-note-buttons:focus-within,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-presenter-note-wrapper:focus-within+.bespoke-marp-presenter-note-buttons,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container:hover .bespoke-marp-presenter-note-buttons{opacity:1;pointer-events:auto}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note{word-wrap:break-word;box-sizing:border-box;font-size:calc(1.1em*var(--bespoke-marp-note-font-scale, 1));height:calc(100% - 40px);margin:20px;overflow:auto;padding-right:3px;scrollbar-color:hsla(0,0%,93%,.5) transparent;scrollbar-width:thin;white-space:pre-wrap;width:calc(100% - 40px)}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note::-webkit-scrollbar{width:6px}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note::-webkit-scrollbar-track{background:transparent}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note::-webkit-scrollbar-thumb{background:hsla(0,0%,93%,.5);border-radius:6px}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note:empty{pointer-events:none}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note.active{display:block}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note p:first-child{margin-top:0}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-note-container .bespoke-marp-note p:last-child{margin-bottom:0}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container{align-items:center;box-sizing:border-box;color:#eee;display:flex;flex-wrap:nowrap;grid-area:info;justify-content:center;overflow:hidden;padding:0 10px}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-page,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-time,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-timer{box-sizing:border-box;display:block;padding:0 10px;white-space:nowrap;width:100%}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button{height:1.5em;line-height:1.5em;width:1.5em}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-page{order:2;text-align:center}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-page .bespoke-marp-presenter-info-page-text{display:inline-block;min-width:120px;text-align:center}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-time{color:#999;order:1;text-align:left}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-timer{color:#999;order:3;text-align:right}body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container .bespoke-marp-presenter-info-timer:hover{cursor:pointer}}@media print{.bespoke-marp-presenter-info-container,.bespoke-marp-presenter-next-container,.bespoke-marp-presenter-note-container{display:none}}</style><style>div#\:\$p>svg>foreignObject>section{width:1280px;height:720px;box-sizing:border-box;overflow:hidden;position:relative;scroll-snap-align:center center}div#\:\$p>svg>foreignObject>section:after{bottom:0;content:attr(data-marpit-pagination);padding:inherit;pointer-events:none;position:absolute;right:0}div#\:\$p>svg>foreignObject>section:not([data-marpit-pagination]):after{display:none}/* Normalization */div#\:\$p>svg>foreignObject>section :is(h1,marp-h1){font-size:2em;margin:0.67em 0}div#\:\$p>svg>foreignObject>section video::-webkit-media-controls{will-change:transform}@page{size:1920px 1080px;margin:0}@media print{body,html{background-color:#fff;margin:0;page-break-inside:avoid;break-inside:avoid-page}div#\:\$p>svg>foreignObject>section{page-break-before:always;break-before:page}div#\:\$p>svg>foreignObject>section,div#\:\$p>svg>foreignObject>section *{-webkit-print-color-adjust:exact!important;animation-delay:0s!important;animation-duration:0s!important;color-adjust:exact!important;transition:none!important}div#\:\$p>svg[data-marpit-svg]{display:block;height:100vh;width:100vw}}div#\:\$p>svg>foreignObject>:where(section){container-type:size}div#\:\$p>svg>foreignObject>section img[data-marp-twemoji]{background:transparent;height:1em;margin:0 .05em 0 .1em;vertical-align:-.1em;width:1em}
/* Dracula color scheme */div#\:\$p>svg>foreignObject>section{--background:#282a36;--current-line:#44475a;--selection:#44475a;--foreground:#f8f8f2;--comment:#6272a4;--cyan:#8be9fd;--green:#50fa7b;--orange:#ffb86c;--pink:#ff79c6;--purple:#bd93f9;--red:#ff5555;--yellow:#f1fa8c}
/* General */div#\:\$p>svg>foreignObject>:where(section):not([root]){width:1920px;height:1080px;font-size:40px;padding:40px;padding-top:20px;font-family:Jetbrains Mono;color:var(--foreground);background-color:var(--background)}div#\:\$p>svg>foreignObject>:where(section):not([root]){--marpit-root-font-size:40px}
/* Titles */div#\:\$p>svg>foreignObject>section :is(h1,marp-h1){font-size:60px;color:var(--pink);padding-left:80px}div#\:\$p>svg>foreignObject>section :is(h2,marp-h2){font-size:50px;color:var(--cyan)}div#\:\$p>svg>foreignObject>section :is(h3,marp-h3){color:var(--yellow)}
/* Highlights */div#\:\$p>svg>foreignObject>section a{color:var(--yellow)}div#\:\$p>svg>foreignObject>section strong{color:var(--orange)}div#\:\$p>svg>foreignObject>section em{color:var(--cyan)}div#\:\$p>svg>foreignObject>section blockquote{color:var(--purple)}
/* Inline code */div#\:\$p>svg>foreignObject>section code{font-family:Jetbrains Mono}div#\:\$p>svg>foreignObject>section :is(pre,marp-pre){font-family:Jetbrains Mono;display:block;border-radius:10px;border:solid 2px var(--cyan);padding:10px;font-size:30px;width:1500px}div#\:\$p>svg>foreignObject>section .hljs-meta{color:var(--pink)}div#\:\$p>svg>foreignObject>section .hljs-comment{color:var(--comment)}div#\:\$p>svg>foreignObject>section .hljs-meta-string{color:var(--yellow)}div#\:\$p>svg>foreignObject>section .hljs-keyword{color:var(--pink)}div#\:\$p>svg>foreignObject>section .hljs-title{color:var(--green)}div#\:\$p>svg>foreignObject>section:after{color:var(--comment);content:attr(data-marpit-pagination) '/' attr(data-marpit-pagination-total)}
/* Tables */div#\:\$p>svg>foreignObject>section table,div#\:\$p>svg>foreignObject>section td,div#\:\$p>svg>foreignObject>section th{border:solid var(--cyan);border-collapse:collapse;padding:5px}div#\:\$p>svg>foreignObject>section td{color:var(--purple)}
/* Images */div#\:\$p>svg>foreignObject>section img:not(.emoji){background:white;border:solid var(--cyan);border-radius:10px}div#\:\$p>svg>foreignObject>section.centered img:not(.emoji){display:block;margin-left:auto;margin-right:auto;width:50%}
/* @theme pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb */div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]{columns:initial!important;display:block!important;padding:0!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]:before,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:after,div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content]:before{display:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]{all:initial;display:flex;flex-direction:row;height:100%;overflow:hidden;width:100%}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container][data-marpit-advanced-background-direction=vertical]{flex-direction:column}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split]>div[data-marpit-advanced-background-container]{width:var(--marpit-advanced-background-split,50%)}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background][data-marpit-advanced-background-split=right]>div[data-marpit-advanced-background-container]{margin-left:calc(100% - var(--marpit-advanced-background-split, 50%))}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure{all:initial;background-position:center;background-repeat:no-repeat;background-size:cover;flex:auto;margin:0}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=background]>div[data-marpit-advanced-background-container]>figure>figcaption{position:absolute;border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=content],div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo]{background:transparent!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background=pseudo],div#\:\$p>svg[data-marpit-svg]>foreignObject[data-marpit-advanced-background=pseudo]{pointer-events:none!important}div#\:\$p>svg>foreignObject>section[data-marpit-advanced-background-split]{width:100%;height:100%}</style></head><body><div class="bespoke-marp-osc"><button data-bespoke-marp-osc="prev" tabindex="-1" title="Previous slide">Previous slide</button><span data-bespoke-marp-osc="page"></span><button data-bespoke-marp-osc="next" tabindex="-1" title="Next slide">Next slide</button><button data-bespoke-marp-osc="fullscreen" tabindex="-1" title="Toggle fullscreen (f)">Toggle fullscreen</button><button data-bespoke-marp-osc="presenter" tabindex="-1" title="Open presenter view (p)">Open presenter view</button></div><div id=":$p"><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="1" data-paginate="skip" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" style="--paginate:skip;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;"><br />
<br />
<h1 id="techniques-avanc%C3%A9es-de-g%C3%A9n%C3%A9ration-de-code-pour-la-performance">Techniques avancées de génération de code pour la performance</h1>
<br />
<blockquote>
<p>Jules Pénuchot</p>
</blockquote>
<br />
<p><strong>Université Paris-Saclay</strong><br />
<em>Equipe ParSys</em></p>
<p>Thèse sous la direction de <em>Joël Falcou</em><br />
Soutenue le 24/09/2024 à l'Université Paris-Saclay</p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="2" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="1" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="le-hpc-un-paysage-de-plus-en-plus-complexe">Le HPC: un paysage de plus en plus complexe</h2>
<p><strong>Le matériel:</strong></p>
<ul>
<li>
<p>Plus de <em>parallélisme(s)</em>: CPUs multi-coeurs, SIMD, GPUs<br />
Exemples: AMD EPYC, Fujitsu A64FX</p>
</li>
<li>
<p>Plus de <em>spécialisation</em>: TPU, FPGA<br />
Exemples: Cerebras WSE-3</p>
</li>
</ul>
<p><strong>Bibliothèques, langages, et applications:</strong></p>
<ul>
<li>
<p>Une compatibilité de plus en plus <em>large</em></p>
</li>
<li>
<p>Des domaines de plus en plus <em>diversifiés</em></p>
</li>
</ul>
<p><em>Comment assurer la portabilité et la pérennité du code haute performance ?</em></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="3" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="2" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="le-millefeuille-dabstractions-du-hpc-en-c">Le millefeuille d'abstractions du HPC en C++</h2>
<br />
<p><img src="images/millefeuille-hpc.svg" alt="" style="width:1700px;" /></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="4" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="3" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="concilier-abstraction-et-performance">Concilier abstraction et performance</h2>
<ul>
<li>
<p>Des abstractions <strong>à forte capacité d'adaptation</strong>:</p>
<ul>
<li>
<p>Différents types de processeurs (CPU/GPU)</p>
</li>
<li>
<p>Differents jeux d'instructions</p>
</li>
<li>
<p>Différents paramètres de tuning (taille de cache, etc.)</p>
</li>
</ul>
</li>
<li>
<p>Des abstractions <strong>performantes</strong>:</p>
<ul>
<li>Autant que possible, <strong>résolues à la compilation</strong></li>
</ul>
</li>
</ul>
<br />
<p><strong>Pour ces raisons, on se tourne vers la métaprogrammation</strong></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="5" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="4" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="la-m%C3%A9taprogrammation-pour-la-performance">La métaprogrammation pour la performance</h2>
<ul>
<li>
<p><strong>Métaprogramme:</strong> programme consommant et/ou générant du code.</p>
<ul>
<li>Exemples: LISP, C, Rust, Haskell, MetaOCaml, etc...</li>
</ul>
</li>
<li>
<p>En C++, les bibliothèques HPC utilisent très majoritairement<br />
<strong>la métaprogrammation de templates</strong></p>
<ul>
<li><strong>Principe:</strong> utiliser les types pour effectuer des calculs à la compilation</li>
<li><strong>Intérêts:</strong> évaluation partielle, composabilité, nouvelles abstractions</li>
<li><strong>Exemples:</strong> Thrust, EVE, HPX<br />
<br /></li>
</ul>
</li>
</ul>
<p><em>Peut-on aller plus haut en niveau d'abstraction ?</em><br />
<strong>Oui, via les Domain Specific Embedded Languages</strong></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="6" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="5" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="les-domain-specific-embedded-languages-dsels">Les Domain Specific Embedded Languages (DSELs)</h2>
<ul>
<li>
<p>En C++, les langages dédiés embarqués utilisent la <strong>surcharge d'opérateurs</strong><br />
et les <strong>expression templates</strong> pour la génération de code.</p>
</li>
<li>
<p><strong>Expression templates:</strong> représentation d'expressions algébriques<br />
sous forme d'arborescences de templates de types.</p>
</li>
</ul>
<p><em>Exemple: Blaze</em></p>
<pre><code class="language-c++"><span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string"><blaze/Blaze.h></span></span>
<span class="hljs-function"><span class="hljs-type">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span> </span>{
<span class="hljs-function">blaze::DynamicMatrix<<span class="hljs-type">int</span>> <span class="hljs-title">mat_a</span><span class="hljs-params">({{<span class="hljs-number">4</span>, <span class="hljs-number">-2</span>, <span class="hljs-number">5</span>}})</span>, <span class="hljs-title">mat_b</span><span class="hljs-params">({{<span class="hljs-number">2</span>}, {<span class="hljs-number">5</span>}, {<span class="hljs-number">-3</span>}})</span></span>;
<span class="hljs-comment">// Add<DynamicMatrix<int>, Trans<DynamicMatrix<int>>></span>
<span class="hljs-keyword">auto</span> expr = mat_a + <span class="hljs-built_in">trans</span>(mat_b);
blaze::DynamicMatrix<<span class="hljs-type">int</span>> mat_c = expr; <span class="hljs-comment">// Génération de code à l'assignation</span>
}
</code></pre>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="7" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="6" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="probl%C3%A9matiques-des-dsel-pour-le-hpc">Problématiques des DSEL pour le HPC</h2>
<br />
<br />
<ul>
<li>
<p>Temps de compilation</p>
</li>
<li>
<p>Difficulté de la métaprogrammation de templates</p>
</li>
<li>
<p>DSELs pour le calcul numérique limités à la syntaxe C++</p>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="8" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="7" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="probl%C3%A9matiques-des-dsel-pour-le-hpc-1">Problématiques des DSEL pour le HPC</h2>
<br />
<br />
<ul>
<li>
<p>Temps de compilation<br />
<em>Quels outils pour analyser les temps de compilation ?</em></p>
</li>
<li>
<p>Difficulté de la métaprogrammation de templates<br />
<em>Quelles nouvelle abstractions pour la métaprogrammation ?</em></p>
</li>
<li>
<p>DSELs pour le calcul numérique limités à la syntaxe C++<br />
<em>Aller au-delà de la syntaxe C++: comment et avec quel impact ?</em></p>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="9" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="8" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h1 id="les-travaux-de-cette-th%C3%A8se">Les travaux de cette thèse</h1>
<br />
<ul>
<li>
<p><strong>Portabilité des bibliothèques HPC "classiques"</strong></p>
<ul>
<li>Génération de noyaux de calcul SIMD</li>
</ul>
</li>
<li>
<p><strong>Analyse des temps de compilation</strong></p>
<ul>
<li>Nouvelle méthode de benchmarking pour les métaprogrammes</li>
</ul>
</li>
<li>
<p><strong>Techniques d'implémentation des DSELs</strong></p>
<ul>
<li>Nouvelles méthodes pour leur implémentation</li>
<li>DSEL arbitraires appliqués au calcul numérique</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="10" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="9" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="g%C3%A9n%C3%A9ration-de-noyaux-de-calcul-simd">Génération de noyaux de calcul SIMD</h2>
<br />
<ul>
<li>
<p><strong>Ge</strong>neral <strong>M</strong>atrix-<strong>V</strong>ector multiply <em>(GEMV)</em><br />
<em>matrice column-major</em></p>
<ul>
<li>
<p>Référence: implémentation en <strong>assembleur</strong> dans OpenBLAS</p>
</li>
<li>
<p>Optimisée manuellement pour <strong>chaque architecture</strong></p>
</li>
<li>
<p>Le coût des abstractions est <strong>critique</strong><br />
<br /></p>
</li>
</ul>
</li>
</ul>
<p><strong>Comment générer du code performant au lieu de le réimplémenter<br />
pour chaque architecture?</strong></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="11" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="10" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="g%C3%A9n%C3%A9ration-de-noyaux-gemv-performants">Génération de noyaux GEMV performants</h2>
<ul>
<li>
<p><strong>Deux techniques pour son optimisation:</strong></p>
<ul>
<li>
<p>Utilisation des instructions vectorielles</p>
</li>
<li>
<p>Déroulage des boucles pour exploiter le pipelining des instructions</p>
</li>
</ul>
</li>
<li>
<p><strong>Générer du code quelle que soit l'architecture:</strong></p>
<ul>
<li>
<p>Exploiter les architectures SIMD de manière portable,<br />
et dont la taille est connue à la compilation<br />
<em>boost.simd/EVE</em></p>
</li>
<li>
<p>Automatiser le déroulage<br />
<em>déroulage automatique par template metaprogramming</em></p>
</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="12" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="11" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="gemv-optimis%C3%A9-broadcast-produit-r%C3%A9duction-simd">GEMV optimisé: broadcast, produit, réduction SIMD</h2>
<p><img src="1-current-metaprogramming/images/gemv-fig1.svg" alt="" style="width:1300px;" /></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="13" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="12" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="impl%C3%A9mentation-g%C3%A9n%C3%A9rique-de-gemv">Implémentation générique de GEMV</h2>
<pre><code class="language-cpp"><span class="hljs-keyword">template</span> <<span class="hljs-keyword">typename</span> T, std::<span class="hljs-type">size_t</span> M, std::<span class="hljs-type">size_t</span> N>
<span class="hljs-function"><span class="hljs-type">void</span> <span class="hljs-title">gemv</span><span class="hljs-params">(mat<T, M, N> &mat, vec<T, N> &vec, vec<T, N> &r)</span> </span>{
<span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> Size = eve::wide<T>::static_size;
<span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> SIMD_M = eve::<span class="hljs-built_in">align</span>(M, eve::under{Size});
<span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> SIMD_N = eve::<span class="hljs-built_in">align</span>(N, eve::under{Size});
for_constexpr<<span class="hljs-number">0</span>, SIMD_N,Size>([](<span class="hljs-keyword">auto</span> j) {
eve::wide<T> <span class="hljs-built_in">pvec</span>(&vec[j]), mulp_arr[Size];
for_constexpr<<span class="hljs-number">0</span>, Size>(
[&](<span class="hljs-keyword">auto</span> idx) { mulp_arr[idx] = eve::<span class="hljs-built_in">broadcast</span><idx>(pvec); });
for_constexpr<<span class="hljs-number">0</span>, SIMD_M>([&](<span class="hljs-keyword">auto</span> I) {
eve::wide<T> <span class="hljs-built_in">resp</span>(&res[i + (I * Size)]);
for_constexpr<<span class="hljs-number">0</span>, Size>([&](<span class="hljs-keyword">auto</span> J) {
eve::wide<T> <span class="hljs-built_in">matp</span>(&<span class="hljs-built_in">mat</span>(i + (I * Size), j + J));
resp = eve::<span class="hljs-built_in">fma</span>(matp, mulp_arr[J], resp);
eve::<span class="hljs-built_in">store</span>(resp, &r[i + (I * Size)]);
});
} <span class="hljs-comment">// Scalar code follows ...</span>
}
</code></pre>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="14" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="13" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="gemv-code-g%C3%A9n%C3%A9r%C3%A9-vs-openblas---x86-intel-i5-7200">GEMV: Code généré vs OpenBLAS - x86 (Intel i5-7200)</h2>
<p><img src="1-current-metaprogramming/images/gemv-fig3.svg" alt="" style="width:1200px;" /></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="15" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="14" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="gemv-code-g%C3%A9n%C3%A9r%C3%A9-vs-openblas---arm-arm-cortex-a57">GEMV: Code généré vs OpenBLAS - ARM (ARM Cortex A57)</h2>
<p><img src="1-current-metaprogramming/images/gemv-fig4.svg" alt="" style="width:1200px;" /></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="16" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="15" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="gemv-conclusion">GEMV: Conclusion</h2>
<ul>
<li>
<p>Grâce à la métaprogrammation:</p>
<ul>
<li>Les performances des noyaux générés sont <strong>très bonnes</strong></li>
<li>Le code est <strong>compact</strong></li>
<li>Le code est <strong>portable</strong></li>
<li>Il bénéficie des <strong>optimisations du compilateur</strong></li>
</ul>
</li>
<li>
<p>Mais...</p>
<ul>
<li>Les temps de compilation sont notablement <strong>plus longs</strong></li>
<li>On ne sait pas précisémment <strong>pourquoi</strong></li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="17" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="16" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h1 id="les-travaux-de-cette-th%C3%A8se-1">Les travaux de cette thèse</h1>
<br />
<br />
<ul>
<li>
<p><strong>Portabilité des bibliothèques HPC "classiques"</strong></p>
</li>
<li>
<p><strong>Analyse des temps de compilation</strong></p>
<ul>
<li>Nouvelle méthode de benchmarking pour les métaprogrammes</li>
</ul>
</li>
<li>
<p><strong>Techniques d'implémentation des DSELs</strong></p>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="18" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="17" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="lex%C3%A9cution-de-programmes-%C3%A0-la-compilation-en-c">L'exécution de programmes à la compilation en C++</h2>
<ul>
<li>
<p>Croissance du support et de l'utilisation de la métaprogrammation:</p>
<ul>
<li><em>C++98:</em> templates récursifs</li>
<li><em>C++11:</em> parameter pack, constexpr</li>
<li><em>C++17:</em> if constexpr</li>
<li><em>C++20:</em> concepts, constexpr new, std::vector, std::string</li>
<li><em>C++23:</em> std::unique_ptr</li>
</ul>
</li>
<li>
<p><strong>Comment comparer l'efficacité des techniques de métaprogrammation?</strong><br />
Exemple: <em>SFINAE</em> vs <em>if constexpr</em> vs <em>concepts</em></p>
</li>
<li>
<p>Temps de <strong>compilation</strong> vs temps de <strong>développement</strong></p>
</li>
<li>
<p><strong>Besoin d'outils d'analyse des temps de compilation</strong></p>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="19" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="18" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="lanalyse-des-temps-de-compilation">L'analyse des temps de compilation</h2>
<br />
<ul>
<li>
<p><strong>Templight:</strong> Zoltán Borók-Nagy, Zoltán Porkoláb, József Mihalicza, 2009<br />
Profiling et debug d'instanciation de templates</p>
</li>
<li>
<p><strong>Build-bench:</strong> Fred Tingaud, 2017<br />
Benchmarking basique sans analyse</p>
</li>
<li>
<p><strong>Metabench:</strong> Louis Dionne, 2017<br />
Analyse de temps de compilation, export en fichiers web</p>
</li>
</ul>
<br />
<p><strong>Aucun outil ne permet des analyses détaillées, complètes, et reproductibles</strong></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="20" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="19" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="ctbench">ctbench</h2>
<ul>
<li>
<p><strong>Objectif:</strong> Analyse des temps de compilation via le profiler de Clang</p>
</li>
<li>
<p><strong>Orienté C++:</strong> API CMake, configuration JSON, bibliothèque C++,<br />
utilisation du préprocesseur pour l'instanciation des benchmarks</p>
</li>
<li>
<p><strong>Fonctionnalités:</strong></p>
<ul>
<li>
<p>Permet de <strong>filtrer, agréger, et analyser les évènements de compilation</strong><br />
de manière configurable, puis de tracer des courbes</p>
</li>
<li>
<p>Génère des graphes dans plusieurs formats: SVG, PNG, etc.</p>
</li>
<li>
<p>S'adapte à d'autres compilateurs <em>(mesure des temps d'exécution)</em><br />
<br /></p>
</li>
</ul>
</li>
</ul>
<p><em>Publié dans le Journal of Open-Source Software 2023</em></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="21" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="20" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="cas-dusage-de-ctbench">Cas d'usage de ctbench</h2>
<ul>
<li>Entiers sous forme de types</li>
</ul>
<pre><code class="language-cpp"><span class="hljs-keyword">template</span> <std::<span class="hljs-type">size_t</span> N> <span class="hljs-keyword">struct</span> <span class="hljs-title class_">ct_uint_t</span> {
<span class="hljs-type">static</span> <span class="hljs-keyword">constexpr</span> std::<span class="hljs-type">size_t</span> value = N;
};
</code></pre>
<ul>
<li>Addition d'un pack d'entiers</li>
</ul>
<pre><code class="language-cpp"><span class="hljs-function"><span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">foo</span><span class="hljs-params">()</span> </span>{
<span class="hljs-keyword">return</span> []<std::<span class="hljs-type">size_t</span>... Is>(std::index_sequence<Is...>) {
<span class="hljs-keyword">return</span> <span class="hljs-built_in">sum</span>(<span class="hljs-type">ct_uint_t</span><Is>{}...);
}
(std::make_index_sequence<BENCHMARK_SIZE>{});
}
<span class="hljs-keyword">constexpr</span> std::<span class="hljs-type">size_t</span> result = <span class="hljs-keyword">decltype</span>(<span class="hljs-built_in">foo</span>())::value;
</code></pre>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="22" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="21" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="cas-dusage-de-ctbench-1">Cas d'usage de ctbench</h2>
<ul>
<li><strong>1e implémentation:</strong> récursion <em>(C++11)</em></li>
</ul>
<pre><code class="language-cpp"><span class="hljs-function"><span class="hljs-keyword">template</span><<span class="hljs-keyword">typename</span> ... Ts> <span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">sum</span><span class="hljs-params">()</span></span>;
<span class="hljs-keyword">template</span> <> <span class="hljs-function"><span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">sum</span><span class="hljs-params">()</span> </span>{ <span class="hljs-keyword">return</span> <span class="hljs-type">ct_uint_t</span><<span class="hljs-number">0</span>>{}; }
<span class="hljs-keyword">template</span> <<span class="hljs-keyword">typename</span> T> <span class="hljs-function"><span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">sum</span><span class="hljs-params">(T <span class="hljs-type">const</span> &)</span> </span>{ <span class="hljs-keyword">return</span> T{}; }
<span class="hljs-keyword">template</span> <<span class="hljs-keyword">typename</span> T, <span class="hljs-keyword">typename</span>... Ts>
<span class="hljs-function"><span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">sum</span><span class="hljs-params">(T <span class="hljs-type">const</span> &, Ts <span class="hljs-type">const</span> &...tl)</span> </span>{
<span class="hljs-keyword">return</span> <span class="hljs-type">ct_uint_t</span><T::value + <span class="hljs-keyword">decltype</span>(<span class="hljs-built_in">sum</span>(tl...))::value>{};
}
</code></pre>
<ul>
<li><strong>2e implémentation:</strong> fold expression <em>(C++17)</em></li>
</ul>
<pre><code class="language-cpp"><span class="hljs-function"><span class="hljs-keyword">template</span><<span class="hljs-keyword">typename</span> ... Ts> <span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">sum</span><span class="hljs-params">()</span></span>;
<span class="hljs-keyword">template</span> <> <span class="hljs-function"><span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">sum</span><span class="hljs-params">()</span> </span>{ <span class="hljs-keyword">return</span> <span class="hljs-type">ct_uint_t</span><<span class="hljs-number">0</span>>{}; }
<span class="hljs-keyword">template</span> <<span class="hljs-keyword">typename</span>... Ts> <span class="hljs-function"><span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">sum</span><span class="hljs-params">(Ts <span class="hljs-type">const</span> &...)</span> </span>{
<span class="hljs-keyword">return</span> <span class="hljs-type">ct_uint_t</span><(Ts::value + ... + <span class="hljs-number">0</span>)>{};
}
</code></pre>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="23" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="22" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="cas-dusage-de-ctbench-r%C3%A9cursion-vs-fold-expression">Cas d'usage de ctbench: Récursion vs fold expression</h2>
<p><img src="images/ctbench-example.svg" alt="" style="width:1600px;" /></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="24" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="23" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="ctbench-conclusion">ctbench: Conclusion</h2>
<ul>
<li>
<p>Disponible en open-source: <em>github.com/jpenuchot/ctbench</em></p>
</li>
<li>
<p>L'outil est facilement <strong>installable et réutilisable</strong></p>
</li>
<li>
<p>Il permet d'effectuer des <strong>analyses reproductibles</strong> des temps de compilation</p>
</li>
</ul>
<br />
<ul>
<li>
<p><strong>Applications:</strong></p>
<ul>
<li>
<p>Estimation globale de l'impact sur le temps de compilation</p>
</li>
<li>
<p>Comparaison des techniques de métaprogrammation</p>
</li>
<li>
<p>Peut nous guider dans l'implémentation de <strong>métaprogrammes plus complexes</strong></p>
</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="25" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="24" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h1 id="les-travaux-de-cette-th%C3%A8se-2">Les travaux de cette thèse</h1>
<br />
<br />
<ul>
<li>
<p><strong>Portabilité des bibliothèques HPC "classiques"</strong></p>
</li>
<li>
<p><strong>Analyse des temps de compilation</strong></p>
</li>
<li>
<p><strong>Techniques d'implémentation des DSELs</strong></p>
<ul>
<li>Nouvelles méthodes pour leur implémentation</li>
<li>DSEL arbitraires appliqués au calcul numérique</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="26" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="25" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="etat-de-lart-des-dsel">Etat de l'art des DSEL</h2>
<ul>
<li><strong>Pour le calcul numérique:</strong> Eigen (2009), Blaze (2012), NT2 (2014)</li>
</ul>
<pre><code class="language-c++"><span class="hljs-meta">#<span class="hljs-keyword">include</span> <span class="hljs-string"><blaze/Blaze.h></span></span>
<span class="hljs-function"><span class="hljs-type">int</span> <span class="hljs-title">main</span><span class="hljs-params">()</span> </span>{
<span class="hljs-function">blaze::DynamicMatrix<<span class="hljs-type">int</span>> <span class="hljs-title">mat_a</span><span class="hljs-params">({{<span class="hljs-number">4</span>, <span class="hljs-number">-2</span>, <span class="hljs-number">5</span>}})</span>, <span class="hljs-title">mat_b</span><span class="hljs-params">({{<span class="hljs-number">2</span>}, {<span class="hljs-number">5</span>}, {<span class="hljs-number">-3</span>}})</span></span>;
blaze::DynamicMatrix<<span class="hljs-type">int</span>> mat_c = mat_a + <span class="hljs-built_in">trans</span>(mat_b);
}
</code></pre>
<ul>
<li>
<p><strong>Problème:</strong> la syntaxe C++ limite celle des DSELs pour le calcul numérique</p>
</li>
<li>
<p><strong>Est-il possible de s'affranchir de la syntaxe C++?</strong></p>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="27" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="26" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="compile-time-regular-expressions-ctre">Compile Time Regular Expressions (CTRE)</h2>
<p><em>Hana Dusíková, 2018</em><br />
<em>github.com/hanickadot/compile-time-regular-expressions</em></p>
<p>Parsing d'expressions régulières PCRE et transformation en code C++</p>
<pre><code class="language-cpp"><span class="hljs-function">std::optional<std::string_view> <span class="hljs-title">extract_number</span><span class="hljs-params">(std::string_view s)</span> <span class="hljs-keyword">noexcept</span>
</span>{
<span class="hljs-keyword">if</span> (<span class="hljs-keyword">auto</span> m = ctre::<span class="hljs-built_in">match</span><<span class="hljs-string">"[a-z]+([0-9]+)"</span>>(s)) <span class="hljs-comment">// Génération du matcher</span>
<span class="hljs-keyword">return</span> m.<span class="hljs-built_in">get</span><<span class="hljs-number">1</span>>().<span class="hljs-built_in">to_view</span>();
<span class="hljs-keyword">else</span> <span class="hljs-keyword">return</span> std::<span class="hljs-literal">nullopt</span>;
}
</code></pre>
<p>CTRE utilise un <strong>parser d'expressions PCRE</strong> à la compilation</p>
<ul>
<li>
<p><strong>Quelles techniques pour généraliser cette idée ?</strong></p>
</li>
<li>
<p><strong>Peut-on appliquer ces techniques aux DSELs pour le calcul numérique ?</strong></p>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="28" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="27" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="vers-des-compilateurs-embarqu%C3%A9s-constexpr">Vers des compilateurs embarqués constexpr</h2>
<ul>
<li><strong>constexpr</strong>: rend des fonctions exécutables à la compilation</li>
<li>Nouvelles fonctionnalités constexpr:
<ul>
<li>Allocation dynamique</li>
<li>Support de la bibliothèque standard (std::vector, std::unique_ptr...)</li>
</ul>
</li>
</ul>
<pre><code class="language-cpp"><span class="hljs-function"><span class="hljs-keyword">constexpr</span> std::vector<<span class="hljs-type">int</span>> <span class="hljs-title">foo</span><span class="hljs-params">()</span> </span>{ <span class="hljs-keyword">return</span> {<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>}; }
</code></pre>
<br />
<p><strong>Idée:</strong> peut-on développer un parser constexpr et passer son résultat en paramètre template ?</p>
<pre><code class="language-cpp"><span class="hljs-keyword">template</span> <<span class="hljs-keyword">auto</span> Value> <span class="hljs-keyword">struct</span> <span class="hljs-title class_">my_type</span> {};
my_type<<span class="hljs-built_in">foo</span>()> my_value; <span class="hljs-comment">// ERREUR</span>
</code></pre>
<p><em>Comment contourner cette contrainte ?</em></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="29" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="28" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="le-langage-brainfuck">Le langage Brainfuck</h2>
<table>
<thead>
<tr>
<th>Token</th>
<th>Sémantique</th>
<th>Token</th>
<th>Sémantique</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>></strong></td>
<td><code>ptr++;</code></td>
<td><strong><</strong></td>
<td><code>ptr--;</code></td>
</tr>
<tr>
<td><strong>+</strong></td>
<td><code>++(*ptr);</code></td>
<td><strong>-</strong></td>
<td><code>--(*ptr);</code></td>
</tr>
<tr>
<td><strong>.</strong></td>
<td><code>putchar(*ptr);</code></td>
<td><strong>,</strong></td>
<td><code>(*ptr) = getchar();</code></td>
</tr>
<tr>
<td><strong>[</strong></td>
<td><code>while(*ptr) {</code></td>
<td><strong>]</strong></td>
<td><code>}</code></td>
</tr>
</tbody>
</table>
<ul>
<li>
<p><strong>Propriétés du langage:</strong></p>
<ul>
<li>1 token = un noeud d'AST</li>
<li>Langage structuré</li>
</ul>
</li>
<li>
<p><em>hello-world.bf</em></p>
</li>
</ul>
<pre><code>++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]
>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
</code></pre>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="30" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="29" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="un-parser-brainfuck">Un parser Brainfuck</h2>
<pre><code class="language-cpp"><span class="hljs-function">std::tuple<<span class="hljs-type">ast_block_t</span>, <span class="hljs-type">token_vec_t</span>::const_iterator>
<span class="hljs-title">parse_block</span><span class="hljs-params">(<span class="hljs-type">token_vec_t</span>::const_iterator parse_begin,
<span class="hljs-type">token_vec_t</span>::const_iterator parse_end)</span> </span>{
std::vector<<span class="hljs-type">ast_node_ptr_t</span>> block_content;
<span class="hljs-keyword">for</span> (; parse_begin != parse_end; parse_begin++) {
<span class="hljs-keyword">if</span> (*parse_begin == while_end_v) {
<span class="hljs-keyword">return</span> {std::<span class="hljs-built_in">move</span>(block_content), parse_begin};
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (*parse_begin == while_begin_v) {
<span class="hljs-keyword">auto</span> [while_block_content, while_block_end] =
<span class="hljs-built_in">parse_block</span>(parse_begin + <span class="hljs-number">1</span>, parse_end);
block_content.<span class="hljs-built_in">push_back</span>(
std::<span class="hljs-built_in">make_unique</span><<span class="hljs-type">ast_while_t</span>>(std::<span class="hljs-built_in">move</span>(while_block_content)));
parse_begin = while_block_end;
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (*parse_begin != nop_v) {
block_content.<span class="hljs-built_in">push_back</span>(
<span class="hljs-built_in">ast_node_ptr_t</span>(std::<span class="hljs-built_in">make_unique</span><<span class="hljs-type">ast_token_t</span>>(*parse_begin)));
}
}
<span class="hljs-keyword">return</span> {<span class="hljs-built_in">ast_block_t</span>(std::<span class="hljs-built_in">move</span>(block_content)), parse_end};
}
</code></pre>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="31" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="30" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="un-parser-brainfuck-constexpr">Un parser Brainfuck constexpr</h2>
<pre><code class="language-cpp"><span class="hljs-function"><span class="hljs-keyword">constexpr</span> std::tuple<<span class="hljs-type">ast_block_t</span>, <span class="hljs-type">token_vec_t</span>::const_iterator>
<span class="hljs-title">parse_block</span><span class="hljs-params">(<span class="hljs-type">token_vec_t</span>::const_iterator parse_begin,
<span class="hljs-type">token_vec_t</span>::const_iterator parse_end)</span> </span>{
std::vector<<span class="hljs-type">ast_node_ptr_t</span>> block_content;
<span class="hljs-keyword">for</span> (; parse_begin != parse_end; parse_begin++) {
<span class="hljs-keyword">if</span> (*parse_begin == while_end_v) {
<span class="hljs-keyword">return</span> {std::<span class="hljs-built_in">move</span>(block_content), parse_begin};
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (*parse_begin == while_begin_v) {
<span class="hljs-keyword">auto</span> [while_block_content, while_block_end] =
<span class="hljs-built_in">parse_block</span>(parse_begin + <span class="hljs-number">1</span>, parse_end);
block_content.<span class="hljs-built_in">push_back</span>(
std::<span class="hljs-built_in">make_unique</span><<span class="hljs-type">ast_while_t</span>>(std::<span class="hljs-built_in">move</span>(while_block_content)));
parse_begin = while_block_end;
} <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (*parse_begin != nop_v) {
block_content.<span class="hljs-built_in">push_back</span>(
<span class="hljs-built_in">ast_node_ptr_t</span>(std::<span class="hljs-built_in">make_unique</span><<span class="hljs-type">ast_token_t</span>>(*parse_begin)));
}
}
<span class="hljs-keyword">return</span> {<span class="hljs-built_in">ast_block_t</span>(std::<span class="hljs-built_in">move</span>(block_content)), parse_end};
}
</code></pre>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="32" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="31" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="g%C3%A9n%C3%A9ration-de-programmes-brainfuck">Génération de programmes Brainfuck</h2>
<ul>
<li>
<p><strong>Intuition:</strong> On souhaite traduire des AST en expression templates</p>
<ul>
<li><em>Comment passer la mémoire dynamique en paramètre de templates ?</em></li>
<li>On passe pas les noeuds, on passe leurs <strong>fonctions génératrices</strong></li>
</ul>
</li>
</ul>
<pre><code class="language-cpp"><span class="hljs-function"><span class="hljs-keyword">constexpr</span> std::vector<<span class="hljs-type">int</span>> <span class="hljs-title">foo</span><span class="hljs-params">()</span> </span>{ <span class="hljs-keyword">return</span> {<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>}; }
<span class="hljs-keyword">template</span> <<span class="hljs-keyword">auto</span> Value> <span class="hljs-keyword">struct</span> <span class="hljs-title class_">my_type</span> {};
<span class="hljs-comment">// my_type<foo()> my_value; // ERREUR</span>
my_type<foo> my_value; <span class="hljs-comment">// OK</span>
</code></pre>
<ul>
<li>
<p>Visite de l'AST en passant récursivement les génératrices des sous-noeuds</p>
<ul>
<li>
<p>Fonction de parsing appelée <strong>autant de fois qu'il y a de noeuds</strong>.</p>
</li>
<li>
<p><strong>Quel est l'impact sur les performances ?<br />
O(N^2) ?</strong></p>
</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="33" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="32" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="temps-de-g%C3%A9n%C3%A9ration-via-expression-templates">Temps de génération via expression templates</h2>
<p><em>Temps de compilation en secondes</em></p>
<table>
<thead>
<tr>
<th>Backend</th>
<th>Hello World</th>
<th>Hello World x2</th>
<th>Mandelbrot</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Noeuds d'AST</strong></td>
<td><em>106</em></td>
<td><em>212</em></td>
<td><em>11672</em></td>
</tr>
<tr>
<td>Avec expression templates</td>
<td>19.18</td>
<td>74.51</td>
<td>Failure (timeout)</td>
</tr>
</tbody>
</table>
<ul>
<li>
<p>Avec les expression templates:</p>
<ul>
<li>Temps de compilation insatisfaisants, <strong>quadratiques</strong></li>
<li>Représentation intermédiaire superflue</li>
</ul>
</li>
<li>
<p>Sans les expression templates ?</p>
<ul>
<li>Il suffit de <strong>générer le code directement</strong></li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="34" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="33" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="temps-de-g%C3%A9n%C3%A9ration-sans-expression-templates">Temps de génération sans expression templates</h2>
<p><em>Temps de compilation en secondes</em></p>
<table>
<thead>
<tr>
<th>Backend</th>
<th>Hello World</th>
<th>Hello World x2</th>
<th>Mandelbrot</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Noeuds d'AST</strong></td>
<td><em>106</em></td>
<td><em>212</em></td>
<td><em>11672</em></td>
</tr>
<tr>
<td>Avec expression templates</td>
<td>19.18</td>
<td>74.51</td>
<td>Failure (timeout)</td>
</tr>
<tr>
<td>Sans expression templates</td>
<td>3.55</td>
<td>12.73</td>
<td>Failure (timeout)</td>
</tr>
</tbody>
</table>
<ul>
<li>
<p>Sans les expression templates:</p>
<ul>
<li>Gain de performances considérable</li>
<li><strong>Toujours quadratique</strong></li>
</ul>
</li>
<li>
<p>Il faut une solution pour passer à l'échelle <strong>sur des grands cas</strong></p>
</li>
</ul>
<p><em>Qu'est-ce qu'il se passe sur des benchmarks de plus petite taille ?</em></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="35" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="34" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="benchmarks-synth%C3%A9tiques-de-petite-taille">Benchmarks synthétiques de petite taille</h2>
<ul>
<li>Boucles imbriquées: <strong>[[...]]</strong> <em>(AST profond)</em></li>
<li>Boucles consecutives: <strong>[][]...</strong> <em>(AST large)</em></li>
</ul>
<p><img src="images/bf-imbricated-loops-partial-graph.svg" alt="" style="width:1400px;" /></p>
<ul>
<li>La <strong>forme</strong> des expression templates influe sur le temps de compilation</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="36" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="35" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="conversion-de-tableaux-dynamiques-en-tableaux-statiques">Conversion de tableaux dynamiques en tableaux statiques</h2>
<pre><code class="language-c++"><span class="hljs-function"><span class="hljs-keyword">constexpr</span> std::vector<<span class="hljs-type">int</span>> <span class="hljs-title">foo</span><span class="hljs-params">()</span> </span>{ <span class="hljs-keyword">return</span> {<span class="hljs-number">0</span>, <span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>}; }
<span class="hljs-keyword">template</span> <<span class="hljs-keyword">auto</span> Value> <span class="hljs-keyword">struct</span> <span class="hljs-title class_">my_type</span> {};
<span class="hljs-function"><span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> <span class="hljs-title">foo_arr</span><span class="hljs-params">()</span> </span>{
std::array<<span class="hljs-type">int</span>, foo().size()> array; <span class="hljs-comment">// foo().size() est constexpr</span>
std::ranges::<span class="hljs-built_in">copy</span>(<span class="hljs-built_in">foo</span>(), array.<span class="hljs-built_in">begin</span>());
<span class="hljs-keyword">return</span> array;
}
my_type<<span class="hljs-built_in">foo_arr</span>()> my_value; <span class="hljs-comment">// OK</span>
</code></pre>
<ul>
<li>
<p>Méthode <strong>généralisable</strong> pour passer des tableaux dynamiques<br />
en paramètres de templates</p>
</li>
<li>
<p><strong>Pour passer un AST en paramètre de template, il suffit de le sérialiser</strong></p>
</li>
<li>
<p><strong>Réduction de la complexité</strong>: la génératrice n'est appelée que 2 fois</p>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="37" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="36" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="temps-de-compilation-via-s%C3%A9rialisation">Temps de compilation via sérialisation</h2>
<table>
<thead>
<tr>
<th>Backend</th>
<th>Hello World</th>
<th>Hello World x2</th>
<th>Mandelbrot</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Noeuds d'AST</strong></td>
<td><em>106</em></td>
<td><em>212</em></td>
<td><em>11672</em></td>
</tr>
<tr>
<td>Gen. avec ET</td>
<td>19.18</td>
<td>74.51</td>
<td>Failure (timeout)</td>
</tr>
<tr>
<td>Gen. sans ET</td>
<td>3.55</td>
<td>12.73</td>
<td>Failure (timeout)</td>
</tr>
<tr>
<td>Sérialisation</td>
<td>0.63</td>
<td>0.80</td>
<td>18.16</td>
</tr>
</tbody>
</table>
<ul>
<li>
<p>Temps de compilation <strong>linéaire</strong></p>
</li>
<li>
<p>Coût d'implémentation <strong>non négligeable</strong>:</p>
<ul>
<li>Représentation intermédiaire sérialisée</li>
<li>Fonctions de sérialisation</li>
</ul>
</li>
</ul>
<p>-> <strong>Temps d'implémentation vs temps de compilation</strong></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="38" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="37" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="benchmarks-synth%C3%A9tiques-de-petite-taille-1">Benchmarks synthétiques de petite taille</h2>
<p><img src="images/bf-imbricated-loops-graph.svg" alt="" style="width:1800px;" /></p>
<p><strong>Impact négligeable sur les cas de petite taille</strong></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="39" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="38" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="application-pour-le-calcul-num%C3%A9rique">Application pour le calcul numérique</h2>
<ul>
<li><strong>Langage mathématique simple:</strong> Tiny Math Language, inspiré d'AsciiMath</li>
</ul>
<pre><code class="language-cpp"><span class="hljs-type">static</span> <span class="hljs-keyword">constexpr</span> <span class="hljs-keyword">auto</span> formula = <span class="hljs-string">"sin(x + 3) / 3 * y ^ 2"</span>;
<span class="hljs-keyword">auto</span> function = tml::<span class="hljs-built_in">codegen</span><formula>(); <span class="hljs-comment">// Génère une fonction générique</span>
<span class="hljs-keyword">auto</span> res_scalar = <span class="hljs-built_in">function</span>(<span class="hljs-number">8.3</span>, <span class="hljs-number">42.8</span>);
<span class="hljs-function">blaze::DynamicVector<<span class="hljs-type">float</span>> <span class="hljs-title">vector_x</span><span class="hljs-params">(<span class="hljs-number">16</span>, <span class="hljs-number">1.</span>)</span>, <span class="hljs-title">vector_y</span><span class="hljs-params">(<span class="hljs-number">16</span>, <span class="hljs-number">12.</span>)</span></span>;
blaze::DynamicVector<<span class="hljs-type">float</span>> res_vec = <span class="hljs-built_in">function</span>(vector_x, vector_y);
</code></pre>
<ul>
<li>
<p><strong>Parser:</strong> Shunting-Yard (Dijkstra, 1961)</p>
<ul>
<li>
<p>Précédence et associativité des opérateurs</p>
</li>
<li>
<p>Sortie en <strong>notation postfix</strong>, <em>exemple: 2 + 3 + 4 -> 2 3 + 4 +</em></p>
</li>
<li>
<p>Nécessite une pile implémentée par un tuple<br />
-> Temps de compilation non-linéaire ?</p>
</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="40" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="39" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="temps-de-compilation-de-blaze-et-tml">Temps de compilation de Blaze et TML</h2>
<p><img src="images/shunting-yard.addition-series-partial.svg" alt="" style="width:1500px;" /><br />
<em>Mesures de temps de compilation pour des séries d'additions<br />
(0 + x + y + ...)</em></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="41" data-paginate="true" data-class="centered" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" class="centered" data-marpit-pagination="40" style="--paginate:true;--class:centered;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="temps-de-compilation-de-blaze-et-tml-1">Temps de compilation de Blaze et TML</h2>
<p><img src="images/shunting-yard.addition-series.svg" alt="" style="width:1500px;" /><br />
<em>Mesures de temps de compilation pour des séries d'additions<br />
(0 + x + y + ...)</em></p>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="42" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="41" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="dsels-conclusion">DSELs: Conclusion</h2>
<ul>
<li>
<p>Implémentations et benchmarks: <em>github.com/jpenuchot/poacher</em></p>
</li>
<li>
<p><strong>Résultats:</strong></p>
<ul>
<li>
<p>On peut s'affranchir de la syntaxe C++</p>
</li>
<li>
<p>Techniques de génération de code adaptées à différents cas<br />
<em>(prototypage, expressions simples, programmes de grande taille)</em></p>
</li>
<li>
<p>On peut combiner ces abstractions avec des bibliothèques existantes</p>
</li>
</ul>
</li>
<li>
<p><strong>Utilité de ctbench:</strong></p>
<ul>
<li>
<p>Validation des hypothèses sur les temps de compilation</p>
</li>
<li>
<p>Analyse fine des résultats finaux</p>
</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="43" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="42" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h1 id="conclusions">Conclusions</h1>
<ul>
<li>
<p><strong>Etat de l'art: des métaprogrammes de "seconde zone"</strong></p>
<ul>
<li>Les templates limitent la métaprogrammation C++ constexpr</li>
<li>Les outils d'analyse de temps de compilation sont insuffisants</li>
</ul>
</li>
<li>
<p><strong>Première contribution: ctbench</strong></p>
<ul>
<li>Analyse des temps de compilation</li>
<li>Reproductibilité</li>
<li>Contribue à l'optimisation des métaprogrammes</li>
</ul>
</li>
<li>
<p><strong>Deuxième contribution: parsing de DSELs arbitraires</strong></p>
<ul>
<li>Stratégie d'implémentation à faible coût de compilation</li>
<li>Démonstration de leur utilisation pour le calcul numérique</li>
</ul>
</li>
</ul>
</section>
</foreignObject></svg><svg data-marpit-svg="" viewBox="0 0 1920 1080"><foreignObject width="1920" height="1080"><section id="44" data-paginate="true" data-theme="pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb" lang="en-US" data-marpit-pagination="43" style="--paginate:true;--theme:pyh55uahrkfi2m4ejtp1slcmcaeed9atm0yzibcrp8yb;" data-marpit-pagination-total="46">
<h2 id="perspectives">Perspectives</h2>
<ul>
<li>
<p><strong>Benchmarking:</strong></p>
<ul>
<li>Améliorer les outils existants</li>
<li>Données de profiling pour GCC</li>
</ul>
</li>
<li>
<p><strong>Génération de code:</strong></p>
<ul>