Harbor Deep Dive - Open source trusted cloud native registryHarbor Deep Dive Open source trusted cloud native registry Henry Zhang, Chief Architect, VMware R&D China Steven Zou, Staff Engineer, VMware R&D China Nov. 2018 goharbor.io Initiated by VMware https://github.com/go harbor/harbor/ Apache 2.0 license An open source trusted cloud native registry project HARBOR More integrations in future Harbor Project History Harbor Community Harbor Users and Partners (selected) x x Main Features 6 Web Portal • Based on open source Clarity • Image operation full capabilities • Batch operations Restful API • Complete API for integration • Swagger0 码力 | 15 页 | 8.40 MB | 1 年前3
C++20's << "\n"; } Output: 2021-10-28 Nov/Thu[4] 2020/Feb/last 29 2021/Feb/last 2814 Some examples: operator/ with new chrono literals #include#include using namespace std::chrono; all? Couldn’t we just use unsigned int for each? Consider our year_month_day example using operator/: year_month_day ymd1{October/28d/ 2021y}; year_month_day ymd2{2021y/October/ 28d}; leap second story in MSVC…how we implement it • We read post-2018 leap seconds from a Windows registry • SYSTEM\CurrentControlSet\Control\LeapSecondInformation • For pre-2018 leap seconds, we maintain 0 码力 | 55 页 | 8.67 MB | 6 月前3
应用 waPC (rust) 做软件测试工具第三届中国 Rust 开发者大会 应用 waPC (rust) 做软件测试工具 Alan poon 潘泳权 大家好! @rustropy_gaming ruito_89 PhoTto / image / chart Webassembly Procedures Call waPC 协议标准化了本机代码调用 WebAssembly 和 WebAssembly 调用本机代码的通信 (messaging) &[u8]) -> CallResult { Ok(msg.to_vec()) } #[no_mangle] pub extern "C" fn _start() { let mut reg = REGISTRY.lock().unwrap(); reg.insert(“\/v2\/matches\/.*\/info_modify_req”.into(),echo_req_js on); }; handle_ws_res(&tcp_payload,c) } #[no_mangle] pub extern "C" fn _start() { let mut reg = REGISTRY.lock().unwrap(); reg.insert(“3335-:3334_modify_req”.into(),_req); reg.insert(“3335-:3334_modify_res”0 码力 | 30 页 | 2.50 MB | 1 年前3
Автоматизация управления ClickHouse-кластерами в Kubernetesсисадмина. ClickHouse operator? Что это? Программа, управляющая кластером ClickHouse в Kubernetes. Кодифицированные шаблоны. Кодифицированные best practices. ClickHouse operator? Зачем это? • Позволяет именно ClickHouse кластеризуется. • Позволяет легко автоматизировать типовые задачи. ClickHouse operator? Кому это надо? • Тем, кто находится в начале пути. • Тем, у кого есть типовая инсталляция. • автоматизация. ClickHouse operator – управление кластером как ОДНИМ РЕСУРСОМ ClickHouse Operator ClickHouseInstallation YAML file Лицензия: Apache 2.0, Распространяется как Docker image ClickHouse cluster0 码力 | 44 页 | 2.24 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 08 CUDA 开启的 GPU 编程不可以是 Func const & ,那样会 变成一个指向 CPU 内存地址的指针,从而出 错。所以 CPU 向 GPU 的传参必须按值传。 2. 做参数的这个函数必须是一个有着成员函数 operator() 的类型,即 functor 类。而不能是 独立的函数,否则报错。 3. 这个函数必须标记为 __device__ ,即 GPU 上的函数,否则会变成 CPU 上的函数。 进一步:函子可以是 顺便一提,英伟达的 warp 大小是 32 ,而 AMD 的显卡则是 64 ,其他概念如共享内存基本类似 。 第 10 章:插桩操作实战 读写图像 • 首先是读写图像的函数,利用了 stb_image 这个单头文件库。 X 方向模糊 • 然后看实现径向模糊的核函数。 Y 方向模糊 • Y 方向同理。 经典案例: jacobi 迭代 • 相比第七课 CPU 的 ghost cell 处理方式0 码力 | 142 页 | 13.52 MB | 1 年前3
C++23: An Overview of Almost All New and Updated FeaturesC++23 Core Language Explicit Object Parameters if consteval Multidimensional Subscript Operator Attributes on Lambda-Expressions Literal Suffix for size_t auto(x): decay-copy in The Language C++23 Core Language Explicit Object Parameters if consteval Multidimensional Subscript Operator Attributes on Lambda-Expressions Literal Suffix for size_t auto(x): decay-copy in The Language C++23 Core Language Explicit Object Parameters if consteval Multidimensional Subscript Operator Attributes on Lambda-Expressions Literal Suffix for size_t auto(x): decay-copy in The Language0 码力 | 105 页 | 759.96 KB | 6 月前3
C++20: An (Almost) Complete Overviewatomic waiting, latches, and barriers std::atomic_ref Designated Initializers Spaceship Operator <=> Range-based for Loop Initializer Non-Type Template Parameters [[likely]] and [[unlikely]] std::string aString; }; Data d { .aString = "Hello" };48 Spaceship Operator <=> Official name: three-way comparison operator Three-way: comparing 2 objects and then comparing result with 0 Similar to C-style strcmp() returning neg. value, 0, or pos. value49 Spaceship Operator <=> Common case: auto X::operator<=>(const Y&) const = default; Compiler generates all 6 comparison operators0 码力 | 85 页 | 512.18 KB | 6 月前3
C++高性能并行编程与优化 - 课件 - 13 C++ STL 容器全解之 vectornoexcept; vector 容器: operator[] • 要访问 vector 里的元素,只需用 [] 运算符 : • 例如 a[0] 访问第 0 个元素(人类的第一 个) • 例如 a[1] 访问第 1 个元素(人类的第二 个) • int &operator[](size_t i) noexcept; • int const &operator[](size_t i) const vector 容器: operator[] • 值得注意的是, [] 运算符在索引超出数组大 小时并不会直接报错,这是为了性能的考虑。 • 如果你不小心用 [] 访问了越界的索引,可能 会覆盖掉别的变量导致程序行为异常,或是访 问到操作系统未映射的区域导致奔溃。 • int &operator[](size_t i) noexcept; • int const &operator[](size_t const; vector 容器: operator[] 和 at • [] 和 at 除了可以读取元素,还可以写入。 • 这是因为他们返回的是元素的引用 int& 。 • 例如给第 i 个元素赋值 val : • a[i] = val; • 读取第 i 个元素并打印: • cout << a[i] << endl; • int &operator[](size_t i) noexcept;0 码力 | 90 页 | 4.93 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 15 C++ 系列课:字符与字符串还得套一层壳 string(“hello”) 才能变成安全封装的类型,才能用他 的成员函数。 • 因此, C++14 引入了一项缓解“键盘压力”的新特性: • 写 “ hello”_s 就相当于写 operator“”_s(“hello”, 5) ,就相当于 string(“hello”, 5) 了。 • 为什么还需要指定长度 5 ?其实不指定也可以,就是 “ hello\0world” 会退化 这个特殊的名字空间里包含了所有的 operator“” 函数。 小彭老师锐评:何谓“键盘压力” • 高情商:键盘压力,指的是程序员敲击键盘时产生的心理压力。 • 低情商:键盘压力,指的是 rust 键盘侠对 cpp 标准委员会的压力。 • rust 键盘侠曰:我们有 233_i32 , cpp 做得到吗? • cpp 标准委员会:谢邀,人在 cpp14 ,已经在 operator“”_i32 了。 • allocator 不必占据额外的空间。 • 问题:既然 allocator 往往都是个空类( std::allocator默认就是空类,只有几个 成员函数负责调用 operator new 和 operator delete ),为什么还要把 allocator 对 象存到 string 对象里,最后还要搞什么空基类优化防止他浪费空间,多此一举? • 因为最近开始流行“有状态分配器”了,侯杰老师显然不知道这一点,在他的 0 码力 | 162 页 | 40.20 MB | 1 年前3
C++高性能并行编程与优化 - 课件 - 10 从稀疏数据结构到量化数据类型个 bit 用 map 来存储 读取:如果不存在,则读到 0 写入:如果不存在,则创建该表项 用 unordered_map 来存储 map 基于红黑树,会按照键值排序,需要键值具有 operator< 重载,复杂度 O(logn) C++11 新增的 unordered_map 基于哈希表,不保证顺序但更高效,需要键值能被哈希,复杂度 O(1) 用 unordered_map 按 16x16 • 不过效率比我们手写的低很多…… 不推荐使用 std::vector• 不建议使用 vector 的原因:他返回的不是真正的引用,而是一个重载了 operator= 和 operator bool 的 std::_Bit_reference 对象,而且效率很低。 • 如果配合用 decltype 和 auto 的话,他们不会正确推导出 bool ,影响我们正常使用模板元编 0 码力 | 102 页 | 9.50 MB | 1 年前3
共 25 条
- 1
- 2
- 3













