Skip to content

Instantly share code, notes, and snippets.

Dahua Lin lindahua

Block or report user

Report or block lindahua

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lindahua / regop.cpp
Created Oct 3, 2016
Simplified way to register operations (proof of concept)
View regop.cpp
// A proof-of-concept demonstration of Operation definition & registration
#include <functional>
#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <tuple>
#include <cassert>
#include <cmath>
lindahua / ju_sum.jl
Created Dec 16, 2013
A fast & accurate implementation of sum
View ju_sum.jl
# cascade sum
mid(i0::Integer, i1::Integer) = i0 + ((i1 - i0) >> 1)
function ssum{T}(a::AbstractArray{T}, ifirst::Int, ilast::Int)
n = ilast - ifirst + 1
if n < 4
s = zero(T)
i = ifirst
while i <= ilast
You can’t perform that action at this time.