-
**Halide is a programming language designed to make it easier to write high-performance image and array processing code on modern machines. ** halide有两个特性比较吸引人。一个是对于各种平台架构的支持。 * CPU architectures: X86, ARM, MIPS, Hexagon, PowerPC * Operating systems: Linux, Windows, macOS, Android, iOS, Qualcomm QuRT * GPU …
Read More -
迫于生计,最近要学习halide 先去学习/复习一下常见的编译优化技巧。 loop unrolling,也就是循环展开,顾名思义,就是把循环展开来写。 normal loop: int x; for (x = 0; x < 100; x++) { delete(x); } after loop unrolling: int x; for (x = 0; x < 100; x += 5 ) { delete(x); delete(x + 1); delete(x + 2); delete(x + 3); delete(x + 4); } 循环展开是一种优化,可以手动实现也可以编译器自动实现。 为什么要将循环展开? * …
Read More