Comprehensive Rust(Español) 202412. . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.2 Código de ejemplo en esta formación . . . . . . . . . . . . . . . . . . . . . . 20 2.3 Ejecutar código de forma local con Cargo . . . Ejercicio: Fibonacci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.6.1 Solución . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 6 Básicos de Control de Flujo Ejercicio: secuencia de Collatz . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.7.1 Solución . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 II Día 1: Tarde 42 7 Te damos0 码力 | 389 页 | 1.04 MB | 10 月前3
Data Is All You Need for FusionData is all you need for fusion N 1int x = 4; callee(x); // do work } #include#include #include "benchmark.h" #include "matrix_lib.h" int main(..){ std::vector a; a.reserve(100); #define macro_n4 {\ b_pref = b_ptr + 4 * K;\ __asm__ __volatile__(\ "movq %7,%%r15; movq %1,%%r14; movq %6,%%r11; salq £4,%%r11;"\ "cmpq £24,%%r15; jb 3243431f;"\ "3243430:\n\t"\ COMPUTE_m24n4 "subq £24 "3243431:\n\t"\ "cmpq £8,%%r15; jb 3243433f;"\ "3243432:\n\t"\ COMPUTE_m8n4 "subq £8,%%r15; cmpq £8,%%r15; jnb 3243432b;"\ "3243433:\n\t"\ "cmpq £2,%%r15; jb 3243435f;"\ "3243434:\n\t"\ COMPUTE_m2n4 "subq 0 码力 | 151 页 | 9.90 MB | 6 月前3
Comprehensive Rust(Português do Brasil) 202412disponíveis. O curso também está disponível como PDF. O objetivo do curso é ensinar Rust a você. Nós assumimos que você não saiba nada sobre Rust e esperamos: • Dar a você uma compreensão abrangente da linguagem existentes e escreva novos programas em Rust. • Demonstrar expressões idiomáticas comuns de Rust. Nós chamamos os quatro primeiros dias do curso de Fundamentos do Rust. Em seguida, você está convidado(a) de aplicação são cobertos. • Concorrência: uma aula de um dia inteiro sobre concorrência em Rust. Nós cobrimos tanto concorrência clássica (escalonamento preemptivo utilizando threads e mutexes) quanto0 码力 | 389 页 | 1.05 MB | 10 月前3
Algorithmic Complexity(hopefully) know that O(n) is better than O(n2) 4Algorithmic Complexity @ CppCon 2021 Performance is the name of the game You all (hopefully) know that O(n) is better than O(n2) But there is still important 2021 Why this talk? Performance is the name of the game You all (hopefully) know that O(n) is better than O(n2) But there is still important stuff that might be overlooked And… 6Algorithmic Complexity 2021 Why this talk? Performance is the name of the game You all (hopefully) know that O(n) is better than O(n2) But there is still important stuff that might be overlooked And… the academic answer isn’t0 码力 | 52 页 | 1.01 MB | 6 月前3
Back To Basics Lifetime Management<< "\n";struct Gadget { int i; }; Gadget gadget; -2132860828 std::cout << gadget.i << "\n";struct Gadget { int i; Gadget() : i(0) {} }; Gadget gadget; 0 std::cout << gadget.i << "\n"; default 0 std::cout << gadget.i << "\n"; default member initializerstruct Gadget { int i; Gadget(int i) : i(i) {} }; Gadget gadget(42); 42 std::cout << gadget.i << "\n"; custom constructorstruct Gadget ^~~~~~ std::cout << gadget.i << "\n";struct Gadget { int i = 0; Gadget() {} Gadget(int i) : i(i) {} }; Gadget gadget; 0 std::cout << gadget.i << "\n"; explicitly implemented default constructorstruct0 码力 | 66 页 | 8.43 MB | 6 月前3
Linear Algebra Coming to Standard C++library extern “C” void dgemm_( const char* TRANSA, const char* TRANSB, const int* m, const int* n, const int* k, const double* alpha, const double A[], const int* LDA, const double* beta, const LDB, double C[], const int* LDC); int m = C.extent(0); // C^T is n x m int n = C.extent(1); int k = B.extent(1); // B^T is n x k int LDA = A.stride(0); // layout_right int LDB = B.stride(0); // // layout_right int LDC = C.stride(0); // layout_right dgemm_(“T”, “N”, &n, &m, &k, &alpha, B.data_handle(), &LDB, A.data_handle(), &LDA, &beta, C.data_handle(), &LDC); // AFTER: Use std::linalg0 码力 | 46 页 | 2.95 MB | 6 月前3
Hello 算法 1.2.0 简体中文 C语言 版292 13.3 子集和问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 13.4 n 皇后问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 13.5 小结 . . 自动生成的顺序):krahets、coderonion、Gonglja、nuomi1、Reanon、justin‑tse、hpstory、 danielsss、curtishd、night‑cruise、S‑N‑O‑R‑L‑A‑X、msk397、gvenusleo、khoaxuantu、RiverTwilight、 rongyi、gyt95、zhuoqinyue、K3v123、Zuoxun、mingXta 1 : // === File: iteration.c === /* for 循环 */ int forLoop(int n) { int res = 0; // 循环求和 1, 2, ..., n-1, n for (int i = 1; i <= n; i++) { res += i; } return res; } 第 2 章 复杂度分析 www.hello‑algo0 码力 | 392 页 | 18.52 MB | 10 月前3
Hello 算法 1.2.0 简体中文 Ruby 版277 13.3 子集和问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 13.4 n 皇后问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289 13.5 小结 . . 自动生成的顺序):krahets、coderonion、Gonglja、nuomi1、Reanon、justin‑tse、hpstory、 danielsss、curtishd、night‑cruise、S‑N‑O‑R‑L‑A‑X、msk397、gvenusleo、khoaxuantu、RiverTwilight、 rongyi、gyt95、zhuoqinyue、K3v123、Zuoxun、mingXta 1, … , ? − 1 : # === File: iteration.rb === ### for 循环 ### def for_loop(n) res = 0 # 循环求和 1, 2, ..., n-1, n for i in 1..n res += i end 第 2 章 复杂度分析 www.hello‑algo.com 20 res end 图 2‑1 是该求和函数的流程框图。0 码力 | 372 页 | 18.44 MB | 10 月前3
Hello 算法 1.2.0 简体中文 Kotlin 版284 13.3 子集和问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290 13.4 n 皇后问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 13.5 小结 . . 自动生成的顺序):krahets、coderonion、Gonglja、nuomi1、Reanon、justin‑tse、hpstory、 danielsss、curtishd、night‑cruise、S‑N‑O‑R‑L‑A‑X、msk397、gvenusleo、khoaxuantu、RiverTwilight、 rongyi、gyt95、zhuoqinyue、K3v123、Zuoxun、mingXta − 1 : // === File: iteration.kt === /* for 循环 */ fun forLoop(n: Int): Int { var res = 0 // 循环求和 1, 2, ..., n-1, n for (i in 1..n) { res += i } return res } 第 2 章 复杂度分析 www.hello‑algo.com 200 码力 | 382 页 | 18.48 MB | 10 月前3
Hello 算法 1.2.0 简体中文 JavaScript 版282 13.3 子集和问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 13.4 n 皇后问题 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 13.5 小结 . . 自动生成的顺序):krahets、coderonion、Gonglja、nuomi1、Reanon、justin‑tse、hpstory、 danielsss、curtishd、night‑cruise、S‑N‑O‑R‑L‑A‑X、msk397、gvenusleo、khoaxuantu、RiverTwilight、 rongyi、gyt95、zhuoqinyue、K3v123、Zuoxun、mingXta : // === File: iteration.js === /* for 循环 */ function forLoop(n) { let res = 0; // 循环求和 1, 2, ..., n-1, n for (let i = 1; i <= n; i++) { res += i; } return res; } 第 2 章 复杂度分析 www.hello‑algo0 码力 | 379 页 | 18.47 MB | 10 月前3
共 456 条
- 1
- 2
- 3
- 4
- 5
- 6
- 46













