Skip to content

Category Archives: 程序园

Programming Collective Intelligence 读书总结

Making Recommendations (Collaborative Filtering) User-based Finding similar users User as vector based on item score Euclidean distance Pearson correlation Reverse users and items, we can find similar items to a given item Sort and recommend items based on sum(user similarity * user’s item score) for each other user Item-based Find item similarities These results can […]

《背包问题九讲》2.0 RC1



(本文是 的阅读笔记,前作为《LLVM笔记(2):LLVM的语言(中)》。) Instruction Reference terminator instruction indicates which block should be executed after the current block is finished yields ‘void’ value, ret (return) ret <type> <value> ret void branch br i1 <cond>, label <iftrue>, label <iffalse> br label <dest> ; Unconditional branch switch <intty> <value>, label <defaultdest> [ <intty> <val>, label <dest> ... ] indirectbr <somety>* […]


(本文是 的阅读笔记,前作为《LLVM笔记(1):LLVM的语言(上)》。) Type System Type Classifications integer: i1, i2, i3, … i8, … i16, … i32, … i64 floating point: float, double, x86_fp80, fp128, ppc_fp128 first class: integer, floating point, pointer, vector, structure, array, label, metadata. primitive: label, void, integer, floating point, x86mmx, metadata. derived: array, function, pointer, structure, packed structure, vector, opaque. Array type [<# elements> x <elementtype>] Function […]


(本文是 的阅读笔记,前作为《LLVM笔记(0):在一切开始之前》。) 一句话总结: LLVM is a Static Single Assignment (SSA) based representation that provides type safety, low-level operations, flexibility, and the capability of representing ‘all’ high-level languages cleanly. It is the common code representation used throughout all phases of the LLVM compilation strategy. LLVM语言有三种形式:in-memory compiler IR, on-disk bitcode representation, human readable assembly language representation。三种表现形式是等价的。 LLVM语言的目标是:一方面 light-weight and […]