Poplar and PopLibs
analysis.h
1#pragma once
2#include <algorithm>
3#include <array>
4#include <cassert>
5#include <cstddef>
6#include <cstdint>
7#include <initializer_list>
8#include <iterator>
9#include <new>
10#include <string>
11#include <type_traits>
12#include <utility>
13
14namespace rust {
15inline namespace cxxbridge1 {
16// #include "rust/cxx.h"
17
18#ifndef CXXBRIDGE1_PANIC
19#define CXXBRIDGE1_PANIC
20template <typename Exception>
21void panic [[noreturn]] (const char *msg);
22#endif // CXXBRIDGE1_PANIC
23
24struct unsafe_bitcopy_t;
25
26namespace {
27template <typename T>
28class impl;
29} // namespace
30
31template <typename T>
32::std::size_t size_of();
33template <typename T>
34::std::size_t align_of();
35
36#ifndef CXXBRIDGE1_RUST_STRING
37#define CXXBRIDGE1_RUST_STRING
38class String final {
39public:
40 String() noexcept;
41 String(const String &) noexcept;
42 String(String &&) noexcept;
43 ~String() noexcept;
44
45 String(const std::string &);
46 String(const char *);
47 String(const char *, std::size_t);
48
49 String &operator=(const String &) noexcept;
50 String &operator=(String &&) noexcept;
51
52 explicit operator std::string() const;
53
54 const char *data() const noexcept;
55 std::size_t size() const noexcept;
56 std::size_t length() const noexcept;
57
58 const char *c_str() noexcept;
59
60 using iterator = char *;
61 iterator begin() noexcept;
62 iterator end() noexcept;
63
64 using const_iterator = const char *;
65 const_iterator begin() const noexcept;
66 const_iterator end() const noexcept;
67 const_iterator cbegin() const noexcept;
68 const_iterator cend() const noexcept;
69
70 bool operator==(const String &) const noexcept;
71 bool operator!=(const String &) const noexcept;
72 bool operator<(const String &) const noexcept;
73 bool operator<=(const String &) const noexcept;
74 bool operator>(const String &) const noexcept;
75 bool operator>=(const String &) const noexcept;
76
77 void swap(String &) noexcept;
78
79 String(unsafe_bitcopy_t, const String &) noexcept;
80
81private:
82 friend void swap(String &lhs, String &rhs) noexcept { lhs.swap(rhs); }
83
84 std::array<std::uintptr_t, 3> repr;
85};
86#endif // CXXBRIDGE1_RUST_STRING
87
88#ifndef CXXBRIDGE1_RUST_STR
89#define CXXBRIDGE1_RUST_STR
90class Str final {
91public:
92 Str() noexcept;
93 Str(const String &) noexcept;
94 Str(const std::string &);
95 Str(const char *);
96 Str(const char *, std::size_t);
97
98 Str &operator=(const Str &) noexcept = default;
99
100 explicit operator std::string() const;
101
102 const char *data() const noexcept;
103 std::size_t size() const noexcept;
104 std::size_t length() const noexcept;
105
106 Str(const Str &) noexcept = default;
107 ~Str() noexcept = default;
108
109 using iterator = const char *;
110 using const_iterator = const char *;
111 const_iterator begin() const noexcept;
112 const_iterator end() const noexcept;
113 const_iterator cbegin() const noexcept;
114 const_iterator cend() const noexcept;
115
116 bool operator==(const Str &) const noexcept;
117 bool operator!=(const Str &) const noexcept;
118 bool operator<(const Str &) const noexcept;
119 bool operator<=(const Str &) const noexcept;
120 bool operator>(const Str &) const noexcept;
121 bool operator>=(const Str &) const noexcept;
122
123 void swap(Str &) noexcept;
124
125private:
126 class uninit;
127 Str(uninit) noexcept;
128 friend impl<Str>;
129
130 std::array<std::uintptr_t, 2> repr;
131};
132#endif // CXXBRIDGE1_RUST_STR
133
134#ifndef CXXBRIDGE1_RUST_SLICE
135#define CXXBRIDGE1_RUST_SLICE
136namespace detail {
137template <bool>
138struct copy_assignable_if {};
139
140template <>
141struct copy_assignable_if<false> {
142 copy_assignable_if() noexcept = default;
143 copy_assignable_if(const copy_assignable_if &) noexcept = default;
144 copy_assignable_if &operator=(const copy_assignable_if &) noexcept = delete;
145 copy_assignable_if &operator=(copy_assignable_if &&) noexcept = default;
146};
147} // namespace detail
148
149template <typename T>
150class Slice final
151 : private detail::copy_assignable_if<std::is_const<T>::value> {
152public:
153 using value_type = T;
154
155 Slice() noexcept;
156 Slice(T *, std::size_t count) noexcept;
157
158 Slice &operator=(const Slice<T> &) noexcept = default;
159 Slice &operator=(Slice<T> &&) noexcept = default;
160
161 T *data() const noexcept;
162 std::size_t size() const noexcept;
163 std::size_t length() const noexcept;
164 bool empty() const noexcept;
165
166 T &operator[](std::size_t n) const noexcept;
167 T &at(std::size_t n) const;
168 T &front() const noexcept;
169 T &back() const noexcept;
170
171 Slice(const Slice<T> &) noexcept = default;
172 ~Slice() noexcept = default;
173
174 class iterator;
175 iterator begin() const noexcept;
176 iterator end() const noexcept;
177
178 void swap(Slice &) noexcept;
179
180private:
181 class uninit;
182 Slice(uninit) noexcept;
183 friend impl<Slice>;
184 friend void sliceInit(void *, const void *, std::size_t) noexcept;
185 friend void *slicePtr(const void *) noexcept;
186 friend std::size_t sliceLen(const void *) noexcept;
187
188 std::array<std::uintptr_t, 2> repr;
189};
190
191template <typename T>
192class Slice<T>::iterator final {
193public:
194 using iterator_category = std::random_access_iterator_tag;
195 using value_type = T;
196 using difference_type = std::ptrdiff_t;
197 using pointer = typename std::add_pointer<T>::type;
198 using reference = typename std::add_lvalue_reference<T>::type;
199
200 reference operator*() const noexcept;
201 pointer operator->() const noexcept;
202 reference operator[](difference_type) const noexcept;
203
204 iterator &operator++() noexcept;
205 iterator operator++(int) noexcept;
206 iterator &operator--() noexcept;
207 iterator operator--(int) noexcept;
208
209 iterator &operator+=(difference_type) noexcept;
210 iterator &operator-=(difference_type) noexcept;
211 iterator operator+(difference_type) const noexcept;
212 iterator operator-(difference_type) const noexcept;
213 difference_type operator-(const iterator &) const noexcept;
214
215 bool operator==(const iterator &) const noexcept;
216 bool operator!=(const iterator &) const noexcept;
217 bool operator<(const iterator &) const noexcept;
218 bool operator<=(const iterator &) const noexcept;
219 bool operator>(const iterator &) const noexcept;
220 bool operator>=(const iterator &) const noexcept;
221
222private:
223 friend class Slice;
224 void *pos;
225 std::size_t stride;
226};
227
228template <typename T>
229Slice<T>::Slice() noexcept {
230 sliceInit(this, reinterpret_cast<void *>(align_of<T>()), 0);
231}
232
233template <typename T>
234Slice<T>::Slice(T *s, std::size_t count) noexcept {
235 sliceInit(this, const_cast<typename std::remove_const<T>::type *>(s), count);
236}
237
238template <typename T>
239T *Slice<T>::data() const noexcept {
240 return reinterpret_cast<T *>(slicePtr(this));
241}
242
243template <typename T>
244std::size_t Slice<T>::size() const noexcept {
245 return sliceLen(this);
246}
247
248template <typename T>
249std::size_t Slice<T>::length() const noexcept {
250 return this->size();
251}
252
253template <typename T>
254bool Slice<T>::empty() const noexcept {
255 return this->size() == 0;
256}
257
258template <typename T>
259T &Slice<T>::operator[](std::size_t n) const noexcept {
260 assert(n < this->size());
261 auto pos = static_cast<char *>(slicePtr(this)) + size_of<T>() * n;
262 return *reinterpret_cast<T *>(pos);
263}
264
265template <typename T>
266T &Slice<T>::at(std::size_t n) const {
267 if (n >= this->size()) {
268 panic<std::out_of_range>("rust::Slice index out of range");
269 }
270 return (*this)[n];
271}
272
273template <typename T>
274T &Slice<T>::front() const noexcept {
275 assert(!this->empty());
276 return (*this)[0];
277}
278
279template <typename T>
280T &Slice<T>::back() const noexcept {
281 assert(!this->empty());
282 return (*this)[this->size() - 1];
283}
284
285template <typename T>
286typename Slice<T>::iterator::reference
287Slice<T>::iterator::operator*() const noexcept {
288 return *static_cast<T *>(this->pos);
289}
290
291template <typename T>
292typename Slice<T>::iterator::pointer
293Slice<T>::iterator::operator->() const noexcept {
294 return static_cast<T *>(this->pos);
295}
296
297template <typename T>
298typename Slice<T>::iterator::reference Slice<T>::iterator::operator[](
299 typename Slice<T>::iterator::difference_type n) const noexcept {
300 auto pos = static_cast<char *>(this->pos) + this->stride * n;
301 return *reinterpret_cast<T *>(pos);
302}
303
304template <typename T>
305typename Slice<T>::iterator &Slice<T>::iterator::operator++() noexcept {
306 this->pos = static_cast<char *>(this->pos) + this->stride;
307 return *this;
308}
309
310template <typename T>
311typename Slice<T>::iterator Slice<T>::iterator::operator++(int) noexcept {
312 auto ret = iterator(*this);
313 this->pos = static_cast<char *>(this->pos) + this->stride;
314 return ret;
315}
316
317template <typename T>
318typename Slice<T>::iterator &Slice<T>::iterator::operator--() noexcept {
319 this->pos = static_cast<char *>(this->pos) - this->stride;
320 return *this;
321}
322
323template <typename T>
324typename Slice<T>::iterator Slice<T>::iterator::operator--(int) noexcept {
325 auto ret = iterator(*this);
326 this->pos = static_cast<char *>(this->pos) - this->stride;
327 return ret;
328}
329
330template <typename T>
331typename Slice<T>::iterator &Slice<T>::iterator::operator+=(
332 typename Slice<T>::iterator::difference_type n) noexcept {
333 this->pos = static_cast<char *>(this->pos) + this->stride * n;
334 return *this;
335}
336
337template <typename T>
338typename Slice<T>::iterator &Slice<T>::iterator::operator-=(
339 typename Slice<T>::iterator::difference_type n) noexcept {
340 this->pos = static_cast<char *>(this->pos) - this->stride * n;
341 return *this;
342}
343
344template <typename T>
345typename Slice<T>::iterator Slice<T>::iterator::operator+(
346 typename Slice<T>::iterator::difference_type n) const noexcept {
347 auto ret = iterator(*this);
348 ret.pos = static_cast<char *>(this->pos) + this->stride * n;
349 return ret;
350}
351
352template <typename T>
353typename Slice<T>::iterator Slice<T>::iterator::operator-(
354 typename Slice<T>::iterator::difference_type n) const noexcept {
355 auto ret = iterator(*this);
356 ret.pos = static_cast<char *>(this->pos) - this->stride * n;
357 return ret;
358}
359
360template <typename T>
361typename Slice<T>::iterator::difference_type
362Slice<T>::iterator::operator-(const iterator &other) const noexcept {
363 auto diff = std::distance(static_cast<char *>(other.pos),
364 static_cast<char *>(this->pos));
365 return diff / this->stride;
366}
367
368template <typename T>
369bool Slice<T>::iterator::operator==(const iterator &other) const noexcept {
370 return this->pos == other.pos;
371}
372
373template <typename T>
374bool Slice<T>::iterator::operator!=(const iterator &other) const noexcept {
375 return this->pos != other.pos;
376}
377
378template <typename T>
379bool Slice<T>::iterator::operator<(const iterator &other) const noexcept {
380 return this->pos < other.pos;
381}
382
383template <typename T>
384bool Slice<T>::iterator::operator<=(const iterator &other) const noexcept {
385 return this->pos <= other.pos;
386}
387
388template <typename T>
389bool Slice<T>::iterator::operator>(const iterator &other) const noexcept {
390 return this->pos > other.pos;
391}
392
393template <typename T>
394bool Slice<T>::iterator::operator>=(const iterator &other) const noexcept {
395 return this->pos >= other.pos;
396}
397
398template <typename T>
399typename Slice<T>::iterator Slice<T>::begin() const noexcept {
400 iterator it;
401 it.pos = slicePtr(this);
402 it.stride = size_of<T>();
403 return it;
404}
405
406template <typename T>
407typename Slice<T>::iterator Slice<T>::end() const noexcept {
408 iterator it = this->begin();
409 it.pos = static_cast<char *>(it.pos) + it.stride * this->size();
410 return it;
411}
412
413template <typename T>
414void Slice<T>::swap(Slice &rhs) noexcept {
415 std::swap(*this, rhs);
416}
417#endif // CXXBRIDGE1_RUST_SLICE
418
419#ifndef CXXBRIDGE1_RUST_BOX
420#define CXXBRIDGE1_RUST_BOX
421template <typename T>
422class Box final {
423public:
424 using element_type = T;
425 using const_pointer =
426 typename std::add_pointer<typename std::add_const<T>::type>::type;
427 using pointer = typename std::add_pointer<T>::type;
428
429 Box() = delete;
430 Box(Box &&) noexcept;
431 ~Box() noexcept;
432
433 explicit Box(const T &);
434 explicit Box(T &&);
435
436 Box &operator=(Box &&) noexcept;
437
438 const T *operator->() const noexcept;
439 const T &operator*() const noexcept;
440 T *operator->() noexcept;
441 T &operator*() noexcept;
442
443 template <typename... Fields>
444 static Box in_place(Fields &&...);
445
446 void swap(Box &) noexcept;
447
448 static Box from_raw(T *) noexcept;
449
450 T *into_raw() noexcept;
451
452 /* Deprecated */ using value_type = element_type;
453
454private:
455 class uninit;
456 class allocation;
457 Box(uninit) noexcept;
458 void drop() noexcept;
459
460 friend void swap(Box &lhs, Box &rhs) noexcept { lhs.swap(rhs); }
461
462 T *ptr;
463};
464
465template <typename T>
466class Box<T>::uninit {};
467
468template <typename T>
469class Box<T>::allocation {
470 static T *alloc() noexcept;
471 static void dealloc(T *) noexcept;
472
473public:
474 allocation() noexcept : ptr(alloc()) {}
475 ~allocation() noexcept {
476 if (this->ptr) {
477 dealloc(this->ptr);
478 }
479 }
480 T *ptr;
481};
482
483template <typename T>
484Box<T>::Box(Box &&other) noexcept : ptr(other.ptr) {
485 other.ptr = nullptr;
486}
487
488template <typename T>
489Box<T>::Box(const T &val) {
490 allocation alloc;
491 ::new (alloc.ptr) T(val);
492 this->ptr = alloc.ptr;
493 alloc.ptr = nullptr;
494}
495
496template <typename T>
497Box<T>::Box(T &&val) {
498 allocation alloc;
499 ::new (alloc.ptr) T(std::move(val));
500 this->ptr = alloc.ptr;
501 alloc.ptr = nullptr;
502}
503
504template <typename T>
505Box<T>::~Box() noexcept {
506 if (this->ptr) {
507 this->drop();
508 }
509}
510
511template <typename T>
512Box<T> &Box<T>::operator=(Box &&other) noexcept {
513 if (this->ptr) {
514 this->drop();
515 }
516 this->ptr = other.ptr;
517 other.ptr = nullptr;
518 return *this;
519}
520
521template <typename T>
522const T *Box<T>::operator->() const noexcept {
523 return this->ptr;
524}
525
526template <typename T>
527const T &Box<T>::operator*() const noexcept {
528 return *this->ptr;
529}
530
531template <typename T>
532T *Box<T>::operator->() noexcept {
533 return this->ptr;
534}
535
536template <typename T>
537T &Box<T>::operator*() noexcept {
538 return *this->ptr;
539}
540
541template <typename T>
542template <typename... Fields>
543Box<T> Box<T>::in_place(Fields &&... fields) {
544 allocation alloc;
545 auto ptr = alloc.ptr;
546 ::new (ptr) T{std::forward<Fields>(fields)...};
547 alloc.ptr = nullptr;
548 return from_raw(ptr);
549}
550
551template <typename T>
552void Box<T>::swap(Box &rhs) noexcept {
553 using std::swap;
554 swap(this->ptr, rhs.ptr);
555}
556
557template <typename T>
558Box<T> Box<T>::from_raw(T *raw) noexcept {
559 Box box = uninit{};
560 box.ptr = raw;
561 return box;
562}
563
564template <typename T>
565T *Box<T>::into_raw() noexcept {
566 T *raw = this->ptr;
567 this->ptr = nullptr;
568 return raw;
569}
570
571template <typename T>
572Box<T>::Box(uninit) noexcept {}
573#endif // CXXBRIDGE1_RUST_BOX
574
575#ifndef CXXBRIDGE1_RUST_BITCOPY
576#define CXXBRIDGE1_RUST_BITCOPY
577struct unsafe_bitcopy_t final {
578 explicit unsafe_bitcopy_t() = default;
579};
580
581constexpr unsafe_bitcopy_t unsafe_bitcopy{};
582#endif // CXXBRIDGE1_RUST_BITCOPY
583
584#ifndef CXXBRIDGE1_RUST_VEC
585#define CXXBRIDGE1_RUST_VEC
586template <typename T>
587class Vec final {
588public:
589 using value_type = T;
590
591 Vec() noexcept;
592 Vec(std::initializer_list<T>);
593 Vec(const Vec &);
594 Vec(Vec &&) noexcept;
595 ~Vec() noexcept;
596
597 Vec &operator=(Vec &&) noexcept;
598 Vec &operator=(const Vec &);
599
600 std::size_t size() const noexcept;
601 bool empty() const noexcept;
602 const T *data() const noexcept;
603 T *data() noexcept;
604 std::size_t capacity() const noexcept;
605
606 const T &operator[](std::size_t n) const noexcept;
607 const T &at(std::size_t n) const;
608 const T &front() const noexcept;
609 const T &back() const noexcept;
610
611 T &operator[](std::size_t n) noexcept;
612 T &at(std::size_t n);
613 T &front() noexcept;
614 T &back() noexcept;
615
616 void reserve(std::size_t new_cap);
617 void push_back(const T &value);
618 void push_back(T &&value);
619 template <typename... Args>
620 void emplace_back(Args &&... args);
621
622 using iterator = typename Slice<T>::iterator;
623 iterator begin() noexcept;
624 iterator end() noexcept;
625
626 using const_iterator = typename Slice<const T>::iterator;
627 const_iterator begin() const noexcept;
628 const_iterator end() const noexcept;
629 const_iterator cbegin() const noexcept;
630 const_iterator cend() const noexcept;
631
632 void swap(Vec &) noexcept;
633
634 Vec(unsafe_bitcopy_t, const Vec &) noexcept;
635
636private:
637 void reserve_total(std::size_t cap) noexcept;
638 void set_len(std::size_t len) noexcept;
639 void drop() noexcept;
640
641 friend void swap(Vec &lhs, Vec &rhs) noexcept { lhs.swap(rhs); }
642
643 std::array<std::uintptr_t, 3> repr;
644};
645
646template <typename T>
647Vec<T>::Vec(std::initializer_list<T> init) : Vec{} {
648 this->reserve_total(init.size());
649 std::move(init.begin(), init.end(), std::back_inserter(*this));
650}
651
652template <typename T>
653Vec<T>::Vec(const Vec &other) : Vec() {
654 this->reserve_total(other.size());
655 std::copy(other.begin(), other.end(), std::back_inserter(*this));
656}
657
658template <typename T>
659Vec<T>::Vec(Vec &&other) noexcept : repr(other.repr) {
660 new (&other) Vec();
661}
662
663template <typename T>
664Vec<T>::~Vec() noexcept {
665 this->drop();
666}
667
668template <typename T>
669Vec<T> &Vec<T>::operator=(Vec &&other) noexcept {
670 if (this != &other) {
671 this->drop();
672 this->repr = other.repr;
673 new (&other) Vec();
674 }
675 return *this;
676}
677
678template <typename T>
679Vec<T> &Vec<T>::operator=(const Vec &other) {
680 if (this != &other) {
681 this->drop();
682 new (this) Vec(other);
683 }
684 return *this;
685}
686
687template <typename T>
688bool Vec<T>::empty() const noexcept {
689 return this->size() == 0;
690}
691
692template <typename T>
693T *Vec<T>::data() noexcept {
694 return const_cast<T *>(const_cast<const Vec<T> *>(this)->data());
695}
696
697template <typename T>
698const T &Vec<T>::operator[](std::size_t n) const noexcept {
699 assert(n < this->size());
700 auto data = reinterpret_cast<const char *>(this->data());
701 return *reinterpret_cast<const T *>(data + n * size_of<T>());
702}
703
704template <typename T>
705const T &Vec<T>::at(std::size_t n) const {
706 if (n >= this->size()) {
707 panic<std::out_of_range>("rust::Vec index out of range");
708 }
709 return (*this)[n];
710}
711
712template <typename T>
713const T &Vec<T>::front() const noexcept {
714 assert(!this->empty());
715 return (*this)[0];
716}
717
718template <typename T>
719const T &Vec<T>::back() const noexcept {
720 assert(!this->empty());
721 return (*this)[this->size() - 1];
722}
723
724template <typename T>
725T &Vec<T>::operator[](std::size_t n) noexcept {
726 assert(n < this->size());
727 auto data = reinterpret_cast<char *>(this->data());
728 return *reinterpret_cast<T *>(data + n * size_of<T>());
729}
730
731template <typename T>
732T &Vec<T>::at(std::size_t n) {
733 if (n >= this->size()) {
734 panic<std::out_of_range>("rust::Vec index out of range");
735 }
736 return (*this)[n];
737}
738
739template <typename T>
740T &Vec<T>::front() noexcept {
741 assert(!this->empty());
742 return (*this)[0];
743}
744
745template <typename T>
746T &Vec<T>::back() noexcept {
747 assert(!this->empty());
748 return (*this)[this->size() - 1];
749}
750
751template <typename T>
752void Vec<T>::reserve(std::size_t new_cap) {
753 this->reserve_total(new_cap);
754}
755
756template <typename T>
757void Vec<T>::push_back(const T &value) {
758 this->emplace_back(value);
759}
760
761template <typename T>
762void Vec<T>::push_back(T &&value) {
763 this->emplace_back(std::move(value));
764}
765
766template <typename T>
767template <typename... Args>
768void Vec<T>::emplace_back(Args &&... args) {
769 auto size = this->size();
770 this->reserve_total(size + 1);
771 ::new (reinterpret_cast<T *>(reinterpret_cast<char *>(this->data()) +
772 size * size_of<T>()))
773 T(std::forward<Args>(args)...);
774 this->set_len(size + 1);
775}
776
777template <typename T>
778typename Vec<T>::iterator Vec<T>::begin() noexcept {
779 return Slice<T>(this->data(), this->size()).begin();
780}
781
782template <typename T>
783typename Vec<T>::iterator Vec<T>::end() noexcept {
784 return Slice<T>(this->data(), this->size()).end();
785}
786
787template <typename T>
788typename Vec<T>::const_iterator Vec<T>::begin() const noexcept {
789 return this->cbegin();
790}
791
792template <typename T>
793typename Vec<T>::const_iterator Vec<T>::end() const noexcept {
794 return this->cend();
795}
796
797template <typename T>
798typename Vec<T>::const_iterator Vec<T>::cbegin() const noexcept {
799 return Slice<const T>(this->data(), this->size()).begin();
800}
801
802template <typename T>
803typename Vec<T>::const_iterator Vec<T>::cend() const noexcept {
804 return Slice<const T>(this->data(), this->size()).end();
805}
806
807template <typename T>
808void Vec<T>::swap(Vec &rhs) noexcept {
809 using std::swap;
810 swap(this->repr, rhs.repr);
811}
812
813template <typename T>
814Vec<T>::Vec(unsafe_bitcopy_t, const Vec &bits) noexcept : repr(bits.repr) {}
815#endif // CXXBRIDGE1_RUST_VEC
816
817#ifndef CXXBRIDGE1_RUST_OPAQUE
818#define CXXBRIDGE1_RUST_OPAQUE
819class Opaque {
820public:
821 Opaque() = delete;
822 Opaque(const Opaque &) = delete;
823 ~Opaque() = delete;
824};
825#endif // CXXBRIDGE1_RUST_OPAQUE
826
827#ifndef CXXBRIDGE1_IS_COMPLETE
828#define CXXBRIDGE1_IS_COMPLETE
829namespace detail {
830namespace {
831template <typename T, typename = std::size_t>
832struct is_complete : std::false_type {};
833template <typename T>
834struct is_complete<T, decltype(sizeof(T))> : std::true_type {};
835} // namespace
836} // namespace detail
837#endif // CXXBRIDGE1_IS_COMPLETE
838
839#ifndef CXXBRIDGE1_LAYOUT
840#define CXXBRIDGE1_LAYOUT
841class layout {
842 template <typename T>
843 friend std::size_t size_of();
844 template <typename T>
845 friend std::size_t align_of();
846 template <typename T>
847 static typename std::enable_if<std::is_base_of<Opaque, T>::value,
848 std::size_t>::type
849 do_size_of() {
850 return T::layout::size();
851 }
852 template <typename T>
853 static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
854 std::size_t>::type
855 do_size_of() {
856 return sizeof(T);
857 }
858 template <typename T>
859 static
860 typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
861 size_of() {
862 return do_size_of<T>();
863 }
864 template <typename T>
865 static typename std::enable_if<std::is_base_of<Opaque, T>::value,
866 std::size_t>::type
867 do_align_of() {
868 return T::layout::align();
869 }
870 template <typename T>
871 static typename std::enable_if<!std::is_base_of<Opaque, T>::value,
872 std::size_t>::type
873 do_align_of() {
874 return alignof(T);
875 }
876 template <typename T>
877 static
878 typename std::enable_if<detail::is_complete<T>::value, std::size_t>::type
879 align_of() {
880 return do_align_of<T>();
881 }
882};
883
884template <typename T>
885std::size_t size_of() {
886 return layout::size_of<T>();
887}
888
889template <typename T>
890std::size_t align_of() {
891 return layout::align_of<T>();
892}
893#endif // CXXBRIDGE1_LAYOUT
894} // namespace cxxbridge1
895} // namespace rust
896
897namespace graphcore {
898 struct VertexType;
899 enum class VertexSource : ::std::uint8_t;
900 struct CategoryMemory;
901 struct VertexMemory;
902 struct ComputeSetMemory;
903 struct MemoryByOverlappedness;
904 struct Variable;
905 struct VariableIdWithDebugIds;
906 struct VariableBytes;
907 struct TileMemory;
908 struct MemoryWWOGaps;
909 struct VertexMemoryVec;
910 struct ComputeSetMemoryVec;
911 struct TileRange;
912 struct TileLiveBytes;
913 struct ProgramStep;
914 struct LoweredVar;
915 struct VarCategory;
916 struct EquivalenceClass;
917 struct AllocationOrder;
918 enum class ProgramType : ::std::uint8_t;
919 struct ProgramTypeInfo;
920 struct Program;
921 struct CallInfo;
922 struct OnTileExecuteInfo;
923 struct DoExchangeInfo;
924 struct InterIpuExchangeCycles;
925 struct GlobalExchangeInfo;
926 struct GlobalExchangeInfoAux;
927 struct StreamCopyInfo;
928 struct SyncInfoAux;
929 struct SyncInfo;
930 struct SansInfo;
931 struct SyncAnsInfo;
932 enum class SyncType : ::std::uint8_t;
933 enum class TargetType : ::std::uint8_t;
934 enum class IpuArch : ::std::uint8_t;
935 struct PoplarVersion;
936 struct VersionInfo;
937 struct StreamCopy;
938 struct InternalExchange;
939 struct HostExchange;
940 struct InterIpuExchange;
941 struct Region;
942 struct InstrumentationSettings;
943 enum class ComputeInstrumentationLevel : ::std::uint8_t;
944 enum class ExternalExchangeInstrumentationLevel : ::std::uint8_t;
945 struct VertexCycleEstimateEntry;
946 struct OptimizationInfoEntry;
947 struct ComputeSetInfo;
948 struct VertexCountsEntry;
949 struct VertexCyclesEstimateEntry;
950 struct TileCycleTotals;
951 struct VertexInfo;
952 struct Period;
953 struct Run;
954 struct StepRange;
955 struct ProgramRange;
956 struct CyclesInfo;
957 struct CyclesRange;
958 struct Step;
959 struct TileCycles;
960 struct IpuRange;
961 struct EngineOption;
962 struct DebugContextLocation;
963 struct DebugContext;
964 struct DynProfileAccess;
965 struct DynDebugAccess;
966}
967
968namespace graphcore {
969#ifndef CXXBRIDGE1_STRUCT_graphcore$VertexType
970#define CXXBRIDGE1_STRUCT_graphcore$VertexType
971struct VertexType final {
972 ::rust::String name;
973 ::std::uint64_t size;
974 ::graphcore::VertexSource source;
975
976 using IsRelocatable = ::std::true_type;
977};
978#endif // CXXBRIDGE1_STRUCT_graphcore$VertexType
979
980#ifndef CXXBRIDGE1_ENUM_graphcore$VertexSource
981#define CXXBRIDGE1_ENUM_graphcore$VertexSource
982enum class VertexSource : ::std::uint8_t {
983 Cplusplus = 0,
984 Asm = 1,
985 Unknown = 2,
986};
987#endif // CXXBRIDGE1_ENUM_graphcore$VertexSource
988
989#ifndef CXXBRIDGE1_STRUCT_graphcore$MemoryByOverlappedness
990#define CXXBRIDGE1_STRUCT_graphcore$MemoryByOverlappedness
991struct MemoryByOverlappedness final {
992 ::std::uint64_t non_overlapped;
993 ::std::uint64_t overlapped;
994
995 using IsRelocatable = ::std::true_type;
996};
997#endif // CXXBRIDGE1_STRUCT_graphcore$MemoryByOverlappedness
998
999#ifndef CXXBRIDGE1_STRUCT_graphcore$CategoryMemory
1000#define CXXBRIDGE1_STRUCT_graphcore$CategoryMemory
1001struct CategoryMemory final {
1002 ::graphcore::MemoryByOverlappedness interleaved;
1003 ::graphcore::MemoryByOverlappedness non_interleaved;
1004 ::graphcore::MemoryByOverlappedness overflowed;
1005
1006 using IsRelocatable = ::std::true_type;
1007};
1008#endif // CXXBRIDGE1_STRUCT_graphcore$CategoryMemory
1009
1010#ifndef CXXBRIDGE1_STRUCT_graphcore$VertexMemory
1011#define CXXBRIDGE1_STRUCT_graphcore$VertexMemory
1012struct VertexMemory final {
1013 ::std::uint64_t code_bytes;
1014 ::std::uint64_t copy_ptr_bytes;
1015 ::std::uint64_t descriptor_bytes;
1016 ::std::uint64_t edge_ptr_bytes;
1017 ::std::uint64_t padding_bytes;
1018 ::std::uint64_t vertex_data_bytes;
1019
1020 using IsRelocatable = ::std::true_type;
1021};
1022#endif // CXXBRIDGE1_STRUCT_graphcore$VertexMemory
1023
1024#ifndef CXXBRIDGE1_STRUCT_graphcore$ComputeSetMemory
1025#define CXXBRIDGE1_STRUCT_graphcore$ComputeSetMemory
1026struct ComputeSetMemory final {
1027 ::std::uint64_t copy_ptr_bytes;
1028 ::std::uint64_t descriptor_bytes;
1029 ::std::uint64_t edge_ptr_bytes;
1030 ::std::uint64_t padding_bytes;
1031 ::std::uint64_t vertex_data_bytes;
1032
1033 using IsRelocatable = ::std::true_type;
1034};
1035#endif // CXXBRIDGE1_STRUCT_graphcore$ComputeSetMemory
1036
1037#ifndef CXXBRIDGE1_STRUCT_graphcore$Variable
1038#define CXXBRIDGE1_STRUCT_graphcore$Variable
1039struct Variable final {
1040 ::std::uint64_t id;
1041 ::rust::String name;
1042
1043 using IsRelocatable = ::std::true_type;
1044};
1045#endif // CXXBRIDGE1_STRUCT_graphcore$Variable
1046
1047#ifndef CXXBRIDGE1_STRUCT_graphcore$VariableIdWithDebugIds
1048#define CXXBRIDGE1_STRUCT_graphcore$VariableIdWithDebugIds
1049struct VariableIdWithDebugIds final {
1050 ::std::uint64_t id;
1051 ::rust::Vec<::std::uint64_t> debug_ids;
1052
1053 using IsRelocatable = ::std::true_type;
1054};
1055#endif // CXXBRIDGE1_STRUCT_graphcore$VariableIdWithDebugIds
1056
1057#ifndef CXXBRIDGE1_STRUCT_graphcore$VariableBytes
1058#define CXXBRIDGE1_STRUCT_graphcore$VariableBytes
1059struct VariableBytes final {
1060 ::std::uint64_t id;
1061 ::rust::String name;
1062 ::std::uint64_t bytes;
1063 ::rust::Vec<::std::uint64_t> bytes_worst_tiles;
1064
1065 using IsRelocatable = ::std::true_type;
1066};
1067#endif // CXXBRIDGE1_STRUCT_graphcore$VariableBytes
1068
1069#ifndef CXXBRIDGE1_STRUCT_graphcore$MemoryWWOGaps
1070#define CXXBRIDGE1_STRUCT_graphcore$MemoryWWOGaps
1071struct MemoryWWOGaps final {
1072 ::std::uint64_t excluding_gaps;
1073 ::std::uint64_t including_gaps;
1074
1075 using IsRelocatable = ::std::true_type;
1076};
1077#endif // CXXBRIDGE1_STRUCT_graphcore$MemoryWWOGaps
1078
1079#ifndef CXXBRIDGE1_STRUCT_graphcore$TileMemory
1080#define CXXBRIDGE1_STRUCT_graphcore$TileMemory
1081struct TileMemory final {
1082 ::graphcore::MemoryWWOGaps non_interleaved;
1083 ::graphcore::MemoryWWOGaps interleaved;
1084 ::graphcore::MemoryWWOGaps overflowed;
1085 ::graphcore::MemoryWWOGaps total;
1086
1087 using IsRelocatable = ::std::true_type;
1088};
1089#endif // CXXBRIDGE1_STRUCT_graphcore$TileMemory
1090
1091#ifndef CXXBRIDGE1_STRUCT_graphcore$VertexMemoryVec
1092#define CXXBRIDGE1_STRUCT_graphcore$VertexMemoryVec
1093struct VertexMemoryVec final {
1094 ::rust::Vec<::graphcore::VertexMemory> by_tile;
1095
1096 using IsRelocatable = ::std::true_type;
1097};
1098#endif // CXXBRIDGE1_STRUCT_graphcore$VertexMemoryVec
1099
1100#ifndef CXXBRIDGE1_STRUCT_graphcore$ComputeSetMemoryVec
1101#define CXXBRIDGE1_STRUCT_graphcore$ComputeSetMemoryVec
1102struct ComputeSetMemoryVec final {
1103 ::rust::Vec<::graphcore::ComputeSetMemory> by_tile;
1104
1105 using IsRelocatable = ::std::true_type;
1106};
1107#endif // CXXBRIDGE1_STRUCT_graphcore$ComputeSetMemoryVec
1108
1109#ifndef CXXBRIDGE1_STRUCT_graphcore$TileRange
1110#define CXXBRIDGE1_STRUCT_graphcore$TileRange
1111struct TileRange final {
1112 ::std::uint64_t start;
1113 ::std::uint64_t end;
1114
1115 using IsRelocatable = ::std::true_type;
1116};
1117#endif // CXXBRIDGE1_STRUCT_graphcore$TileRange
1118
1119#ifndef CXXBRIDGE1_STRUCT_graphcore$TileLiveBytes
1120#define CXXBRIDGE1_STRUCT_graphcore$TileLiveBytes
1121struct TileLiveBytes final {
1122 ::std::uint32_t always_live;
1123 ::std::uint32_t not_always_live_max;
1124
1125 using IsRelocatable = ::std::true_type;
1126};
1127#endif // CXXBRIDGE1_STRUCT_graphcore$TileLiveBytes
1128
1129#ifndef CXXBRIDGE1_STRUCT_graphcore$ProgramStep
1130#define CXXBRIDGE1_STRUCT_graphcore$ProgramStep
1131struct ProgramStep final {
1132 ::std::size_t program;
1133 ::rust::Vec<::std::size_t> children;
1134
1135 using IsRelocatable = ::std::true_type;
1136};
1137#endif // CXXBRIDGE1_STRUCT_graphcore$ProgramStep
1138
1139#ifndef CXXBRIDGE1_STRUCT_graphcore$LoweredVar
1140#define CXXBRIDGE1_STRUCT_graphcore$LoweredVar
1141struct LoweredVar final {
1142 ::std::uint32_t id;
1143 bool allocated;
1144 ::std::uint32_t tile;
1145 ::rust::String name;
1146 ::std::uint32_t bytes;
1147 ::std::uint32_t alignment;
1148 ::std::uint32_t offset;
1149 ::std::uint32_t category;
1150 bool constant;
1151 bool always_live;
1152 bool executable;
1153 bool vertex_code;
1154 bool lowest_256kbytes;
1155 bool start_section;
1156 bool in_interleaved_mem;
1157 ::std::uint32_t equivalence_class;
1158 ::rust::Vec<::std::uint32_t> element_constraints;
1159 ::rust::Vec<::std::uint32_t> region_constraints;
1160 ::std::uint32_t unlowered_var_id;
1161
1162 using IsRelocatable = ::std::true_type;
1163};
1164#endif // CXXBRIDGE1_STRUCT_graphcore$LoweredVar
1165
1166#ifndef CXXBRIDGE1_STRUCT_graphcore$VarCategory
1167#define CXXBRIDGE1_STRUCT_graphcore$VarCategory
1168struct VarCategory final {
1169 ::std::uint32_t id;
1170 ::rust::String name;
1171 ::rust::String description;
1172
1173 using IsRelocatable = ::std::true_type;
1174};
1175#endif // CXXBRIDGE1_STRUCT_graphcore$VarCategory
1176
1177#ifndef CXXBRIDGE1_STRUCT_graphcore$EquivalenceClass
1178#define CXXBRIDGE1_STRUCT_graphcore$EquivalenceClass
1179struct EquivalenceClass final {
1180 ::std::uint32_t id;
1181 ::rust::Vec<::std::uint32_t> interference_ids;
1182
1183 using IsRelocatable = ::std::true_type;
1184};
1185#endif // CXXBRIDGE1_STRUCT_graphcore$EquivalenceClass
1186
1187#ifndef CXXBRIDGE1_STRUCT_graphcore$AllocationOrder
1188#define CXXBRIDGE1_STRUCT_graphcore$AllocationOrder
1189struct AllocationOrder final {
1190 ::std::uint32_t tile;
1191 ::rust::Vec<::std::uint32_t> order;
1192
1193 using IsRelocatable = ::std::true_type;
1194};
1195#endif // CXXBRIDGE1_STRUCT_graphcore$AllocationOrder
1196
1197#ifndef CXXBRIDGE1_ENUM_graphcore$ProgramType
1198#define CXXBRIDGE1_ENUM_graphcore$ProgramType
1199enum class ProgramType : ::std::uint8_t {
1200 Unknown = 0,
1201 Sequence = 1,
1202 OnTileExecute = 2,
1203 Repeat = 3,
1204 RepeatWhile = 4,
1205 OnTileSwitch = 5,
1206 OnEveryTileSwitch = 6,
1207 IfElse = 7,
1208 DoExchange = 8,
1209 GlobalExchange = 9,
1210 StreamCopyBegin = 10,
1211 StreamCopyMid = 11,
1212 StreamCopyEnd = 12,
1213 WriteUndef = 13,
1214 Sync = 14,
1215 SetLocalConsensus = 15,
1216 SetLocalConsensusFromVar = 16,
1217 GetGlobalConsensus = 17,
1218 Sans = 18,
1219 Call = 19,
1220 SyncAns = 20,
1221};
1222#endif // CXXBRIDGE1_ENUM_graphcore$ProgramType
1223
1224#ifndef CXXBRIDGE1_STRUCT_graphcore$OnTileExecuteInfo
1225#define CXXBRIDGE1_STRUCT_graphcore$OnTileExecuteInfo
1226struct OnTileExecuteInfo final {
1227 ::std::size_t compute_set;
1228
1229 using IsRelocatable = ::std::true_type;
1230};
1231#endif // CXXBRIDGE1_STRUCT_graphcore$OnTileExecuteInfo
1232
1233#ifndef CXXBRIDGE1_STRUCT_graphcore$DoExchangeInfo
1234#define CXXBRIDGE1_STRUCT_graphcore$DoExchangeInfo
1235struct DoExchangeInfo final {
1236 ::std::size_t exchange_id;
1237 ::rust::Vec<::std::uint64_t> max_data_sent_and_received_by_ipu;
1238
1239 using IsRelocatable = ::std::true_type;
1240};
1241#endif // CXXBRIDGE1_STRUCT_graphcore$DoExchangeInfo
1242
1243#ifndef CXXBRIDGE1_STRUCT_graphcore$GlobalExchangeInfoAux
1244#define CXXBRIDGE1_STRUCT_graphcore$GlobalExchangeInfoAux
1245struct GlobalExchangeInfoAux final {
1246 ::std::size_t exchange_id;
1247 ::rust::Vec<::graphcore::InterIpuExchangeCycles> cycles_by_tile;
1248 ::std::size_t sync_type_index;
1249
1250 using IsRelocatable = ::std::true_type;
1251};
1252#endif // CXXBRIDGE1_STRUCT_graphcore$GlobalExchangeInfoAux
1253
1254#ifndef CXXBRIDGE1_STRUCT_graphcore$StreamCopyInfo
1255#define CXXBRIDGE1_STRUCT_graphcore$StreamCopyInfo
1256struct StreamCopyInfo final {
1257 ::std::size_t exchange_id;
1258
1259 using IsRelocatable = ::std::true_type;
1260};
1261#endif // CXXBRIDGE1_STRUCT_graphcore$StreamCopyInfo
1262
1263#ifndef CXXBRIDGE1_STRUCT_graphcore$SyncInfoAux
1264#define CXXBRIDGE1_STRUCT_graphcore$SyncInfoAux
1265struct SyncInfoAux final {
1266 ::std::size_t sync_type_index;
1267
1268 using IsRelocatable = ::std::true_type;
1269};
1270#endif // CXXBRIDGE1_STRUCT_graphcore$SyncInfoAux
1271
1272#ifndef CXXBRIDGE1_STRUCT_graphcore$SansInfo
1273#define CXXBRIDGE1_STRUCT_graphcore$SansInfo
1274struct SansInfo final {
1275 ::std::uint32_t num_tiles;
1276
1277 using IsRelocatable = ::std::true_type;
1278};
1279#endif // CXXBRIDGE1_STRUCT_graphcore$SansInfo
1280
1281#ifndef CXXBRIDGE1_STRUCT_graphcore$SyncAnsInfo
1282#define CXXBRIDGE1_STRUCT_graphcore$SyncAnsInfo
1283struct SyncAnsInfo final {
1284 ::std::uint32_t num_tiles;
1285
1286 using IsRelocatable = ::std::true_type;
1287};
1288#endif // CXXBRIDGE1_STRUCT_graphcore$SyncAnsInfo
1289
1290#ifndef CXXBRIDGE1_STRUCT_graphcore$CallInfo
1291#define CXXBRIDGE1_STRUCT_graphcore$CallInfo
1292struct CallInfo final {
1293 ::std::size_t target;
1294
1295 using IsRelocatable = ::std::true_type;
1296};
1297#endif // CXXBRIDGE1_STRUCT_graphcore$CallInfo
1298
1299#ifndef CXXBRIDGE1_STRUCT_graphcore$ProgramTypeInfo
1300#define CXXBRIDGE1_STRUCT_graphcore$ProgramTypeInfo
1301struct ProgramTypeInfo final {
1302 ::graphcore::OnTileExecuteInfo on_tile_execute;
1303 ::graphcore::DoExchangeInfo do_exchange;
1304 ::graphcore::GlobalExchangeInfoAux global_exchange;
1305 ::graphcore::StreamCopyInfo stream_copy;
1306 ::graphcore::SyncInfoAux sync;
1307 ::graphcore::SansInfo sans;
1308 ::graphcore::SyncAnsInfo sync_ans;
1309 ::graphcore::CallInfo call;
1310
1311 using IsRelocatable = ::std::true_type;
1312};
1313#endif // CXXBRIDGE1_STRUCT_graphcore$ProgramTypeInfo
1314
1315#ifndef CXXBRIDGE1_STRUCT_graphcore$Program
1316#define CXXBRIDGE1_STRUCT_graphcore$Program
1317struct Program final {
1318 ::rust::String name;
1319 ::rust::Vec<::std::size_t> children;
1320 ::graphcore::ProgramType program_type;
1321 ::graphcore::ProgramTypeInfo program_type_info;
1322 ::rust::Vec<::std::size_t> debug_id;
1323
1324 using IsRelocatable = ::std::true_type;
1325};
1326#endif // CXXBRIDGE1_STRUCT_graphcore$Program
1327
1328#ifndef CXXBRIDGE1_STRUCT_graphcore$InterIpuExchangeCycles
1329#define CXXBRIDGE1_STRUCT_graphcore$InterIpuExchangeCycles
1330struct InterIpuExchangeCycles final {
1331 ::std::uint64_t exchange;
1332 ::std::uint64_t sync;
1333
1334 using IsRelocatable = ::std::true_type;
1335};
1336#endif // CXXBRIDGE1_STRUCT_graphcore$InterIpuExchangeCycles
1337
1338#ifndef CXXBRIDGE1_STRUCT_graphcore$GlobalExchangeInfo
1339#define CXXBRIDGE1_STRUCT_graphcore$GlobalExchangeInfo
1340struct GlobalExchangeInfo final {
1341 ::std::size_t exchange_id;
1342 ::rust::Vec<::graphcore::InterIpuExchangeCycles> cycles_by_tile;
1343 ::graphcore::SyncType sync_type;
1344
1345 using IsRelocatable = ::std::true_type;
1346};
1347#endif // CXXBRIDGE1_STRUCT_graphcore$GlobalExchangeInfo
1348
1349#ifndef CXXBRIDGE1_STRUCT_graphcore$SyncInfo
1350#define CXXBRIDGE1_STRUCT_graphcore$SyncInfo
1351struct SyncInfo final {
1352 ::graphcore::SyncType sync_type;
1353
1354 using IsRelocatable = ::std::true_type;
1355};
1356#endif // CXXBRIDGE1_STRUCT_graphcore$SyncInfo
1357
1358#ifndef CXXBRIDGE1_ENUM_graphcore$SyncType
1359#define CXXBRIDGE1_ENUM_graphcore$SyncType
1360enum class SyncType : ::std::uint8_t {
1361 Internal = 0,
1362 GS1 = 1,
1363 GS2 = 2,
1364 GS3 = 3,
1365 GS4 = 4,
1366 Unknown = 5,
1367};
1368#endif // CXXBRIDGE1_ENUM_graphcore$SyncType
1369
1370#ifndef CXXBRIDGE1_ENUM_graphcore$TargetType
1371#define CXXBRIDGE1_ENUM_graphcore$TargetType
1372enum class TargetType : ::std::uint8_t {
1373 Ipu = 0,
1374 IpuModel = 1,
1375 Cpu = 2,
1376};
1377#endif // CXXBRIDGE1_ENUM_graphcore$TargetType
1378
1379#ifndef CXXBRIDGE1_ENUM_graphcore$IpuArch
1380#define CXXBRIDGE1_ENUM_graphcore$IpuArch
1381enum class IpuArch : ::std::uint8_t {
1382 Ipu1 = 0,
1383 Ipu2 = 1,
1384};
1385#endif // CXXBRIDGE1_ENUM_graphcore$IpuArch
1386
1387#ifndef CXXBRIDGE1_STRUCT_graphcore$PoplarVersion
1388#define CXXBRIDGE1_STRUCT_graphcore$PoplarVersion
1389struct PoplarVersion final {
1390 ::rust::String string;
1391 ::rust::String package_hash;
1392 ::std::uint32_t major;
1393 ::std::uint32_t minor;
1394 ::std::uint32_t point;
1395
1396 using IsRelocatable = ::std::true_type;
1397};
1398#endif // CXXBRIDGE1_STRUCT_graphcore$PoplarVersion
1399
1400#ifndef CXXBRIDGE1_STRUCT_graphcore$VersionInfo
1401#define CXXBRIDGE1_STRUCT_graphcore$VersionInfo
1402struct VersionInfo final {
1403 ::std::uint32_t major;
1404 ::std::uint32_t minor;
1405 ::std::uint32_t point;
1406 bool is_unstable_format;
1407
1408 using IsRelocatable = ::std::true_type;
1409};
1410#endif // CXXBRIDGE1_STRUCT_graphcore$VersionInfo
1411
1412#ifndef CXXBRIDGE1_STRUCT_graphcore$StreamCopy
1413#define CXXBRIDGE1_STRUCT_graphcore$StreamCopy
1414struct StreamCopy final {
1415 ::rust::String stream;
1416 ::rust::String regions;
1417 ::std::uint32_t regions_id;
1418 bool is_remote_buffer;
1419
1420 using IsRelocatable = ::std::true_type;
1421};
1422#endif // CXXBRIDGE1_STRUCT_graphcore$StreamCopy
1423
1424#ifndef CXXBRIDGE1_STRUCT_graphcore$InternalExchange
1425#define CXXBRIDGE1_STRUCT_graphcore$InternalExchange
1426struct InternalExchange final {
1427 ::rust::Vec<::std::uint32_t> bytes_received_by_tile;
1428 ::rust::Vec<::std::uint32_t> bytes_sent_by_tile;
1429 ::rust::Vec<::std::uint32_t> code_bytes_by_tile;
1430 ::rust::Vec<::std::uint64_t> estimated_cycles_by_tile;
1431 ::rust::String destination_vars;
1432 ::rust::String source_vars;
1433 ::std::uint32_t source_regions_id;
1434 ::std::uint32_t destination_regions_id;
1435
1436 using IsRelocatable = ::std::true_type;
1437};
1438#endif // CXXBRIDGE1_STRUCT_graphcore$InternalExchange
1439
1440#ifndef CXXBRIDGE1_STRUCT_graphcore$HostExchange
1441#define CXXBRIDGE1_STRUCT_graphcore$HostExchange
1442struct HostExchange final {
1443 ::rust::Vec<::std::uint32_t> bytes_received_by_tile;
1444 ::rust::Vec<::std::uint32_t> bytes_sent_by_tile;
1445 ::rust::Vec<::std::uint64_t> estimated_cycles_by_tile;
1446 ::rust::Vec<::graphcore::StreamCopy> to_ipu;
1447 ::rust::Vec<::graphcore::StreamCopy> from_ipu;
1448 ::rust::Vec<::graphcore::StreamCopy> from_host;
1449 ::rust::Vec<::graphcore::StreamCopy> to_host;
1450
1451 using IsRelocatable = ::std::true_type;
1452};
1453#endif // CXXBRIDGE1_STRUCT_graphcore$HostExchange
1454
1455#ifndef CXXBRIDGE1_STRUCT_graphcore$InterIpuExchange
1456#define CXXBRIDGE1_STRUCT_graphcore$InterIpuExchange
1457struct InterIpuExchange final {
1458 ::rust::Vec<::std::uint32_t> bytes_received_by_tile;
1459 ::rust::Vec<::std::uint32_t> bytes_sent_by_tile;
1460 ::rust::Vec<::std::uint64_t> estimated_cycles_by_tile;
1461 ::rust::String destination_vars;
1462 ::rust::String source_vars;
1463 ::std::uint32_t source_regions_id;
1464 ::std::uint32_t destination_regions_id;
1465
1466 using IsRelocatable = ::std::true_type;
1467};
1468#endif // CXXBRIDGE1_STRUCT_graphcore$InterIpuExchange
1469
1470#ifndef CXXBRIDGE1_STRUCT_graphcore$Region
1471#define CXXBRIDGE1_STRUCT_graphcore$Region
1472struct Region final {
1473 ::std::uint32_t var_id;
1474 ::rust::String var_name;
1475 ::rust::String regions;
1476
1477 using IsRelocatable = ::std::true_type;
1478};
1479#endif // CXXBRIDGE1_STRUCT_graphcore$Region
1480
1481#ifndef CXXBRIDGE1_STRUCT_graphcore$InstrumentationSettings
1482#define CXXBRIDGE1_STRUCT_graphcore$InstrumentationSettings
1483struct InstrumentationSettings final {
1484 ::graphcore::ComputeInstrumentationLevel compute;
1485 ::graphcore::ExternalExchangeInstrumentationLevel external_exchange;
1486
1487 using IsRelocatable = ::std::true_type;
1488};
1489#endif // CXXBRIDGE1_STRUCT_graphcore$InstrumentationSettings
1490
1491#ifndef CXXBRIDGE1_ENUM_graphcore$ComputeInstrumentationLevel
1492#define CXXBRIDGE1_ENUM_graphcore$ComputeInstrumentationLevel
1493enum class ComputeInstrumentationLevel : ::std::uint8_t {
1494 Off = 0,
1495 Vertex = 1,
1496 Tile = 2,
1497 Ipu = 3,
1498 Device = 4,
1499 Unknown = 5,
1500};
1501#endif // CXXBRIDGE1_ENUM_graphcore$ComputeInstrumentationLevel
1502
1503#ifndef CXXBRIDGE1_ENUM_graphcore$ExternalExchangeInstrumentationLevel
1504#define CXXBRIDGE1_ENUM_graphcore$ExternalExchangeInstrumentationLevel
1505enum class ExternalExchangeInstrumentationLevel : ::std::uint8_t {
1506 Off = 0,
1507 Tile = 1,
1508 Unknown = 2,
1509};
1510#endif // CXXBRIDGE1_ENUM_graphcore$ExternalExchangeInstrumentationLevel
1511
1512#ifndef CXXBRIDGE1_STRUCT_graphcore$VertexCycleEstimateEntry
1513#define CXXBRIDGE1_STRUCT_graphcore$VertexCycleEstimateEntry
1514struct VertexCycleEstimateEntry final {
1515 ::std::size_t vertex_type_id;
1516 ::std::uint64_t active_cycles;
1517
1518 using IsRelocatable = ::std::true_type;
1519};
1520#endif // CXXBRIDGE1_STRUCT_graphcore$VertexCycleEstimateEntry
1521
1522#ifndef CXXBRIDGE1_STRUCT_graphcore$OptimizationInfoEntry
1523#define CXXBRIDGE1_STRUCT_graphcore$OptimizationInfoEntry
1524struct OptimizationInfoEntry final {
1525 ::rust::String name;
1526 double value;
1527
1528 using IsRelocatable = ::std::true_type;
1529};
1530#endif // CXXBRIDGE1_STRUCT_graphcore$OptimizationInfoEntry
1531
1532#ifndef CXXBRIDGE1_STRUCT_graphcore$ComputeSetInfo
1533#define CXXBRIDGE1_STRUCT_graphcore$ComputeSetInfo
1534struct ComputeSetInfo final {
1535 ::rust::String name;
1536 ::rust::Vec<::graphcore::VertexCountsEntry> vertex_counts;
1537 ::rust::Vec<::graphcore::VertexCyclesEstimateEntry> vertex_estimated_active_cycles;
1538
1539 using IsRelocatable = ::std::true_type;
1540};
1541#endif // CXXBRIDGE1_STRUCT_graphcore$ComputeSetInfo
1542
1543#ifndef CXXBRIDGE1_STRUCT_graphcore$VertexCountsEntry
1544#define CXXBRIDGE1_STRUCT_graphcore$VertexCountsEntry
1545struct VertexCountsEntry final {
1546 ::std::size_t vertex_type_id;
1547 ::std::uint32_t count;
1548
1549 using IsRelocatable = ::std::true_type;
1550};
1551#endif // CXXBRIDGE1_STRUCT_graphcore$VertexCountsEntry
1552
1553#ifndef CXXBRIDGE1_STRUCT_graphcore$VertexCyclesEstimateEntry
1554#define CXXBRIDGE1_STRUCT_graphcore$VertexCyclesEstimateEntry
1555struct VertexCyclesEstimateEntry final {
1556 ::std::size_t vertex_type_id;
1557 ::std::uint64_t estimated_cycles;
1558
1559 using IsRelocatable = ::std::true_type;
1560};
1561#endif // CXXBRIDGE1_STRUCT_graphcore$VertexCyclesEstimateEntry
1562
1563#ifndef CXXBRIDGE1_STRUCT_graphcore$TileCycleTotals
1564#define CXXBRIDGE1_STRUCT_graphcore$TileCycleTotals
1565struct TileCycleTotals final {
1566 ::std::uint64_t active_compute;
1567 ::std::uint64_t compute;
1568 ::std::uint64_t inter_ipu_exchange;
1569 ::std::uint64_t stream_copy_begin;
1570 ::std::uint64_t stream_copy;
1571 ::std::uint64_t stream_copy_end;
1572 ::std::uint64_t internal_exchange;
1573 ::std::uint64_t sync;
1574 ::std::uint64_t total;
1575
1576 using IsRelocatable = ::std::true_type;
1577};
1578#endif // CXXBRIDGE1_STRUCT_graphcore$TileCycleTotals
1579
1580#ifndef CXXBRIDGE1_STRUCT_graphcore$VertexInfo
1581#define CXXBRIDGE1_STRUCT_graphcore$VertexInfo
1582struct VertexInfo final {
1583 ::std::uint64_t vertex_type;
1584 ::std::uint64_t cycles;
1585
1586 using IsRelocatable = ::std::true_type;
1587};
1588#endif // CXXBRIDGE1_STRUCT_graphcore$VertexInfo
1589
1590#ifndef CXXBRIDGE1_STRUCT_graphcore$Period
1591#define CXXBRIDGE1_STRUCT_graphcore$Period
1592struct Period final {
1593 ::std::uint64_t start;
1594 ::std::uint64_t end;
1595
1596 using IsRelocatable = ::std::true_type;
1597};
1598#endif // CXXBRIDGE1_STRUCT_graphcore$Period
1599
1600#ifndef CXXBRIDGE1_STRUCT_graphcore$Run
1601#define CXXBRIDGE1_STRUCT_graphcore$Run
1602struct Run final {
1603 ::rust::String name;
1604 ::std::uint32_t num_programs;
1605 ::std::uint32_t first_step;
1606 ::std::uint32_t num_steps;
1607 ::graphcore::Period time_microseconds;
1608 ::rust::Vec<::graphcore::Period> cycles_by_ipu;
1609
1610 using IsRelocatable = ::std::true_type;
1611};
1612#endif // CXXBRIDGE1_STRUCT_graphcore$Run
1613
1614#ifndef CXXBRIDGE1_STRUCT_graphcore$StepRange
1615#define CXXBRIDGE1_STRUCT_graphcore$StepRange
1616struct StepRange final {
1617 ::std::uint64_t start;
1618 ::std::uint64_t end;
1619
1620 using IsRelocatable = ::std::true_type;
1621};
1622#endif // CXXBRIDGE1_STRUCT_graphcore$StepRange
1623
1624#ifndef CXXBRIDGE1_STRUCT_graphcore$ProgramRange
1625#define CXXBRIDGE1_STRUCT_graphcore$ProgramRange
1626struct ProgramRange final {
1627 ::std::uint64_t start;
1628 ::std::uint64_t end;
1629
1630 using IsRelocatable = ::std::true_type;
1631};
1632#endif // CXXBRIDGE1_STRUCT_graphcore$ProgramRange
1633
1634#ifndef CXXBRIDGE1_STRUCT_graphcore$CyclesInfo
1635#define CXXBRIDGE1_STRUCT_graphcore$CyclesInfo
1636struct CyclesInfo final {
1637 ::std::uint64_t min;
1638 ::std::uint64_t mean;
1639 ::std::uint64_t max;
1640
1641 using IsRelocatable = ::std::true_type;
1642};
1643#endif // CXXBRIDGE1_STRUCT_graphcore$CyclesInfo
1644
1645#ifndef CXXBRIDGE1_STRUCT_graphcore$CyclesRange
1646#define CXXBRIDGE1_STRUCT_graphcore$CyclesRange
1647struct CyclesRange final {
1648 ::graphcore::CyclesInfo from;
1649 ::graphcore::CyclesInfo to;
1650
1651 using IsRelocatable = ::std::true_type;
1652};
1653#endif // CXXBRIDGE1_STRUCT_graphcore$CyclesRange
1654
1655#ifndef CXXBRIDGE1_STRUCT_graphcore$Step
1656#define CXXBRIDGE1_STRUCT_graphcore$Step
1657struct Step final {
1658 ::rust::String name;
1659 ::rust::Vec<::std::uint64_t> program;
1660 ::rust::Vec<::graphcore::CyclesRange> active_cycles_by_ipu;
1661 ::rust::Vec<::graphcore::CyclesRange> all_cycles_by_ipu;
1662 ::rust::Vec<::std::uint64_t> cycles_by_ipu;
1663 ::rust::Vec<::std::uint64_t> active_tiles_by_ipu;
1664 ::rust::Vec<float> thread_balance_by_ipu;
1665 ::rust::Vec<float> tile_balance_by_ipu;
1666 ::rust::Vec<float> active_tile_balance_by_ipu;
1667 ::rust::Vec<::std::uint64_t> data_out_by_ipu;
1668 ::rust::Vec<::std::uint64_t> data_in_by_ipu;
1669 ::rust::Vec<float> data_balance_by_ipu;
1670
1671 using IsRelocatable = ::std::true_type;
1672};
1673#endif // CXXBRIDGE1_STRUCT_graphcore$Step
1674
1675#ifndef CXXBRIDGE1_STRUCT_graphcore$TileCycles
1676#define CXXBRIDGE1_STRUCT_graphcore$TileCycles
1677struct TileCycles final {
1678 ::rust::Vec<::std::uint64_t> cycles;
1679
1680 using IsRelocatable = ::std::true_type;
1681};
1682#endif // CXXBRIDGE1_STRUCT_graphcore$TileCycles
1683
1684#ifndef CXXBRIDGE1_STRUCT_graphcore$IpuRange
1685#define CXXBRIDGE1_STRUCT_graphcore$IpuRange
1686struct IpuRange final {
1687 ::std::uint64_t start;
1688 ::std::uint64_t end;
1689
1690 using IsRelocatable = ::std::true_type;
1691};
1692#endif // CXXBRIDGE1_STRUCT_graphcore$IpuRange
1693
1694#ifndef CXXBRIDGE1_STRUCT_graphcore$EngineOption
1695#define CXXBRIDGE1_STRUCT_graphcore$EngineOption
1696struct EngineOption final {
1697 ::rust::String name;
1698 ::rust::String value;
1699 bool is_default;
1700
1701 using IsRelocatable = ::std::true_type;
1702};
1703#endif // CXXBRIDGE1_STRUCT_graphcore$EngineOption
1704
1705#ifndef CXXBRIDGE1_STRUCT_graphcore$DebugContextLocation
1706#define CXXBRIDGE1_STRUCT_graphcore$DebugContextLocation
1707struct DebugContextLocation final {
1708 ::rust::String file;
1709 ::std::uint32_t line;
1710 ::rust::String func;
1711
1712 using IsRelocatable = ::std::true_type;
1713};
1714#endif // CXXBRIDGE1_STRUCT_graphcore$DebugContextLocation
1715
1716#ifndef CXXBRIDGE1_STRUCT_graphcore$DebugContext
1717#define CXXBRIDGE1_STRUCT_graphcore$DebugContext
1718struct DebugContext final {
1719 ::std::uint64_t id;
1720 ::rust::String name;
1721 ::rust::String layer;
1722 ::rust::Vec<::graphcore::DebugContextLocation> location;
1723 ::rust::Vec<::std::uint64_t> parent;
1724 ::rust::Vec<::std::uint64_t> children;
1725
1726 using IsRelocatable = ::std::true_type;
1727};
1728#endif // CXXBRIDGE1_STRUCT_graphcore$DebugContext
1729
1730#ifndef CXXBRIDGE1_STRUCT_graphcore$DynProfileAccess
1731#define CXXBRIDGE1_STRUCT_graphcore$DynProfileAccess
1732struct DynProfileAccess final : public ::rust::Opaque {
1733 ~DynProfileAccess() = delete;
1734
1735private:
1736 friend ::rust::layout;
1737 struct layout {
1738 static ::std::size_t size() noexcept;
1739 static ::std::size_t align() noexcept;
1740 };
1741};
1742#endif // CXXBRIDGE1_STRUCT_graphcore$DynProfileAccess
1743
1744#ifndef CXXBRIDGE1_STRUCT_graphcore$DynDebugAccess
1745#define CXXBRIDGE1_STRUCT_graphcore$DynDebugAccess
1746struct DynDebugAccess final : public ::rust::Opaque {
1747 ~DynDebugAccess() = delete;
1748
1749private:
1750 friend ::rust::layout;
1751 struct layout {
1752 static ::std::size_t size() noexcept;
1753 static ::std::size_t align() noexcept;
1754 };
1755};
1756#endif // CXXBRIDGE1_STRUCT_graphcore$DynDebugAccess
1757
1758::rust::Box<::graphcore::DynProfileAccess> read_profile_any(const ::rust::String &profile);
1759
1760::rust::Vec<::graphcore::VertexMemory> get_memory_single_vertex_type(const ::graphcore::DynProfileAccess &p, ::std::uint32_t vertex_type);
1761
1762::rust::Vec<::graphcore::CategoryMemory> get_memory_single_category(const ::graphcore::DynProfileAccess &p, ::rust::Str category);
1763
1764::rust::Vec<::rust::String> memory_categories(const ::graphcore::DynProfileAccess &p);
1765
1766::rust::Vec<::graphcore::CategoryMemory> get_memory_single_category_tiles(const ::graphcore::DynProfileAccess &p, ::rust::Str category, ::graphcore::TileRange tile_range);
1767
1768::rust::Vec<::graphcore::ComputeSetMemoryVec> get_memory_all_compute_sets(const ::graphcore::DynProfileAccess &p);
1769
1770::rust::Vec<::graphcore::VertexMemoryVec> get_memory_all_vertex_types(const ::graphcore::DynProfileAccess &p);
1771
1772::rust::Vec<::graphcore::VertexMemoryVec> get_memory_all_vertex_types_tiles(const ::graphcore::DynProfileAccess &p, ::graphcore::TileRange tile_range);
1773
1774::rust::Vec<::graphcore::TileLiveBytes> get_liveness_bytes_by_tile(const ::graphcore::DynProfileAccess &p);
1775
1776::rust::Vec<::graphcore::TileMemory> get_tile_memory(const ::graphcore::DynProfileAccess &p);
1777
1778::rust::Vec<::graphcore::TileMemory> get_tile_range_memory(const ::graphcore::DynProfileAccess &p, ::graphcore::TileRange tile_range);
1779
1780::rust::Vec<::graphcore::VertexType> get_vertex_types(const ::graphcore::DynProfileAccess &p);
1781
1782::rust::Vec<::graphcore::VariableBytes> get_liveness_always_live_variables_bytes(const ::graphcore::DynProfileAccess &p);
1783
1784::rust::Vec<::graphcore::ProgramStep> get_liveness_program_steps(const ::graphcore::DynProfileAccess &p);
1785
1786::std::uint64_t get_liveness_not_always_live_bytes_for_program_step(const ::graphcore::DynProfileAccess &p, ::std::size_t step);
1787
1788::rust::Vec<::graphcore::VariableBytes> get_liveness_not_always_live_variables_for_program_step(const ::graphcore::DynProfileAccess &p, ::std::size_t step);
1789
1790::rust::Vec<::graphcore::VariableBytes> get_liveness_not_always_live_variables_for_program_step_and_tile(const ::graphcore::DynProfileAccess &p, ::std::size_t step, ::std::size_t tile);
1791
1792::rust::Vec<::graphcore::VariableBytes> get_liveness_not_always_live_variables_for_program_step_and_ipu(const ::graphcore::DynProfileAccess &p, ::std::size_t step, ::std::size_t ipu);
1793
1794::std::uint64_t get_liveness_not_always_live_bytes_worst_tiles_for_program_step(const ::graphcore::DynProfileAccess &p, ::std::size_t step, ::std::size_t tile);
1795
1796::rust::Vec<::std::uint64_t> get_liveness_not_always_live_bytes_by_program_step(const ::graphcore::DynProfileAccess &p);
1797
1798::rust::Vec<::std::uint64_t> get_liveness_not_always_live_bytes_for_ipu_by_program_step(const ::graphcore::DynProfileAccess &p, ::std::size_t ipu);
1799
1800::rust::Vec<::std::uint64_t> get_liveness_not_always_live_bytes_for_tile_by_program_step(const ::graphcore::DynProfileAccess &p, ::std::size_t tile);
1801
1802::rust::Vec<::std::uint64_t> get_liveness_not_always_live_bytes_for_var_id_by_program_step(const ::graphcore::DynProfileAccess &p, ::std::size_t var_id);
1803
1804::rust::Vec<::std::uint64_t> get_liveness_not_always_live_bytes_for_var_name_by_program_step(const ::graphcore::DynProfileAccess &p, ::rust::String var_name);
1805
1806::rust::Vec<::graphcore::Variable> variables(const ::graphcore::DynProfileAccess &p);
1807
1808::rust::Vec<::graphcore::Program> programs(const ::graphcore::DynProfileAccess &p);
1809
1810::rust::Vec<::graphcore::Program> programs_by_range(const ::graphcore::DynProfileAccess &p, ::graphcore::ProgramRange range);
1811
1812::graphcore::Program get_program(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1813
1814::rust::Vec<::std::size_t> control_programs(const ::graphcore::DynProfileAccess &p);
1815
1816::rust::Vec<::std::size_t> function_programs(const ::graphcore::DynProfileAccess &p);
1817
1818::graphcore::CallInfo get_call_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1819
1820::graphcore::OnTileExecuteInfo get_on_tile_execute_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1821
1822::graphcore::DoExchangeInfo get_do_exchange_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1823
1824::graphcore::GlobalExchangeInfo get_global_exchange_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1825
1826::graphcore::StreamCopyInfo get_stream_copy_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1827
1828::graphcore::SyncInfo get_sync_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1829
1830::graphcore::SansInfo get_sans_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1831
1832::graphcore::SyncAnsInfo get_sync_ans_info(const ::graphcore::DynProfileAccess &p, ::std::size_t prog);
1833
1834::std::uint64_t num_ipus(const ::graphcore::DynProfileAccess &p);
1835
1836::std::uint64_t tiles_per_ipu(const ::graphcore::DynProfileAccess &p);
1837
1838::std::uint64_t num_tiles(const ::graphcore::DynProfileAccess &p);
1839
1840::std::uint64_t bytes_per_tile(const ::graphcore::DynProfileAccess &p);
1841
1842::std::uint64_t total_memory(const ::graphcore::DynProfileAccess &p);
1843
1844double clock_frequency(const ::graphcore::DynProfileAccess &p);
1845
1846::std::uint64_t num_replicas(const ::graphcore::DynProfileAccess &p);
1847
1848::std::uint64_t ipus_per_replica(const ::graphcore::DynProfileAccess &p);
1849
1850::std::uint64_t tiles_per_replica(const ::graphcore::DynProfileAccess &p);
1851
1852::std::uint64_t memory_per_replica(const ::graphcore::DynProfileAccess &p);
1853
1854::std::uint64_t num_vertices(const ::graphcore::DynProfileAccess &p);
1855
1856::std::uint64_t num_edges(const ::graphcore::DynProfileAccess &p);
1857
1858::std::uint64_t num_vars(const ::graphcore::DynProfileAccess &p);
1859
1860::std::uint64_t num_compute_sets(const ::graphcore::DynProfileAccess &p);
1861
1862::std::uint64_t bytes_per_ipu(const ::graphcore::DynProfileAccess &p);
1863
1864::graphcore::TargetType target_type(const ::graphcore::DynProfileAccess &p);
1865
1866::graphcore::IpuArch architecture(const ::graphcore::DynProfileAccess &p);
1867
1868::std::uint64_t min_sync_delay(const ::graphcore::DynProfileAccess &p);
1869
1870::rust::Vec<::std::uint64_t> relative_sync_delay_by_tile(const ::graphcore::DynProfileAccess &p);
1871
1872::graphcore::PoplarVersion poplar_version(const ::graphcore::DynProfileAccess &p);
1873
1874::rust::String date_time(const ::graphcore::DynProfileAccess &p);
1875
1876::graphcore::VersionInfo version(const ::graphcore::DynProfileAccess &p);
1877
1878::rust::Vec<::std::size_t> get_liveness_recorded_tiles(const ::graphcore::DynProfileAccess &p);
1879
1880::graphcore::InstrumentationSettings instrumentation_settings(const ::graphcore::DynProfileAccess &p);
1881
1882::rust::Vec<::rust::String> compute_set_names(const ::graphcore::DynProfileAccess &p);
1883
1884::graphcore::HostExchange host_exchange(const ::graphcore::DynProfileAccess &p, ::std::size_t exchange);
1885
1886::rust::Vec<::graphcore::OptimizationInfoEntry> optimization_info(const ::graphcore::DynProfileAccess &p);
1887
1888::rust::Vec<::graphcore::ComputeSetInfo> compute_set_infos(const ::graphcore::DynProfileAccess &p);
1889
1890::graphcore::InternalExchange internal_exchange(const ::graphcore::DynProfileAccess &p, ::std::size_t exchange);
1891
1892::graphcore::InterIpuExchange inter_ipu_exchange(const ::graphcore::DynProfileAccess &p, ::std::size_t exchange);
1893
1894::std::uint64_t step_count(const ::graphcore::DynProfileAccess &p);
1895
1896::std::uint64_t run_count(const ::graphcore::DynProfileAccess &p);
1897
1898::rust::Vec<::graphcore::Run> runs(const ::graphcore::DynProfileAccess &p);
1899
1900::rust::Vec<::graphcore::Step> get_steps(const ::graphcore::DynProfileAccess &p, ::graphcore::StepRange step_range);
1901
1902bool lowered_vars_presence(const ::graphcore::DynProfileAccess &p);
1903
1904::rust::Vec<::graphcore::Region> regions(const ::graphcore::DynProfileAccess &p, ::std::size_t regions_id);
1905
1906::rust::Vec<::graphcore::TileCycles> get_all_tile_cycles_for_steps(const ::graphcore::DynProfileAccess &p, ::graphcore::StepRange step_range);
1907
1908::graphcore::IpuRange profiled_ipus(const ::graphcore::DynProfileAccess &p);
1909
1910::rust::Vec<::graphcore::EngineOption> execution_options(const ::graphcore::DynProfileAccess &p);
1911
1912::rust::Vec<::graphcore::EngineOption> compilation_options(const ::graphcore::DynProfileAccess &p);
1913
1914::rust::Vec<::graphcore::EngineOption> target_options(const ::graphcore::DynProfileAccess &p);
1915
1916::rust::Vec<::std::uint64_t> estimated_cycles_by_tile(const ::graphcore::DynProfileAccess &p, ::std::size_t compute_set);
1917
1918::graphcore::TileCycleTotals tile_cycle_totals(const ::graphcore::DynProfileAccess &p);
1919
1920::rust::Vec<::std::uint64_t> cycles_by_tile(const ::graphcore::DynProfileAccess &p, ::std::size_t compute_set);
1921
1922::rust::Vec<::std::uint64_t> cycles_by_ipu(const ::graphcore::DynProfileAccess &p, ::std::size_t compute_set);
1923
1924::std::uint64_t cycles(const ::graphcore::DynProfileAccess &p, ::std::size_t compute_set);
1925
1926::rust::Vec<::graphcore::VertexInfo> vertices(const ::graphcore::DynProfileAccess &p);
1927
1928::rust::Vec<::graphcore::LoweredVar> lowered_vars_for_tile(const ::graphcore::DynProfileAccess &p, ::std::size_t tile);
1929
1930::rust::Vec<::graphcore::LoweredVar> lowered_vars_for_var(const ::graphcore::DynProfileAccess &p, ::std::size_t var_id);
1931
1932::rust::Vec<::graphcore::VarCategory> var_categories(const ::graphcore::DynProfileAccess &p);
1933
1934::rust::Vec<::graphcore::EquivalenceClass> equivalence_classes(const ::graphcore::DynProfileAccess &p);
1935
1936::rust::Vec<::graphcore::AllocationOrder> allocation_order_by_tile(const ::graphcore::DynProfileAccess &p);
1937
1938::std::uint64_t supervisor_instr_fetch_delay(const ::graphcore::DynProfileAccess &p);
1939
1940::std::uint64_t interleaved_memory_start(const ::graphcore::DynProfileAccess &p);
1941
1942::rust::Vec<::std::uint64_t> memory_element_offsets(const ::graphcore::DynProfileAccess &p);
1943
1944::rust::Box<::graphcore::DynDebugAccess> read_debug_any(const ::rust::String &profile);
1945
1946::rust::Vec<::std::uint64_t> debug_context_ids(const ::graphcore::DynDebugAccess &d, ::rust::String layer);
1947
1948::rust::Vec<::std::uint64_t> first_level_debug_context_ids(const ::graphcore::DynDebugAccess &d);
1949
1950::graphcore::DebugContext debug_context(const ::graphcore::DynDebugAccess &d, ::std::size_t debug_id);
1951
1952::rust::String full_path(const ::graphcore::DynDebugAccess &d, ::std::size_t debug_id);
1953
1954::rust::Vec<::std::size_t> program_ids_for_debug_ids(const ::graphcore::DynProfileAccess &p, ::rust::Vec<::std::size_t> debug_ids);
1955
1956::rust::Vec<::graphcore::VariableIdWithDebugIds> var_ids_with_debug_ids(const ::graphcore::DynProfileAccess &p);
1957} // namespace graphcore
IPU intrinsic functions.
Definition: ipu_intrinsics:30
half2 max(half2 src0, half2 src1)
Targets the f16v2max instruction.
Definition: ipu_intrinsics:333
half2 min(half2 src0, half2 src1)
Targets the f16v2min instruction.
Definition: ipu_intrinsics:384
SyncType
An enumeration used to state what type of synchronisation a Sync program represents.
Definition: SyncType.hpp:13
TargetType
Enum to represent the type of a device capable of running a graph.
Definition: TargetType.hpp:10