Skip to content

Instantly share code, notes, and snippets.

View JayKickliter's full-sized avatar
💭
Cache Rules Everything Around Me

Jay Kickliter JayKickliter

💭
Cache Rules Everything Around Me
View GitHub Profile
import IPPDSP
function polyize{T}( h::Vector{T}, interpolation )
hLen = length( h )
tapsPerPhase = int( ceil( hLen/interpolation ))
pfbSize = tapsPerPhase * interpolation
# check that the vector is an integer multiple of interpolation
if hLen != pfbSize
hExtended = similar( h, pfbSize )
hExtended[1:hLen] = h
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
a = Array(Float64, 7200000)
# populate array with some data
for i = 1:length(a)
n = i * 0.99999
if n>100
n-=(n-n/100.0)
end
a[i]= n*n*n
end
if(JULIA_FOUND)
return()
endif()
# Find julia executable
find_program(JULIA_EXECUTABLE julia DOC "Julia executable")
if(NOT JULIA_EXECUTABLE)
return()
endif()
#!/usr/bin/env bash
while getopts r:n:d: FLAG; do
case $FLAG in
r) # Reference binary
BIN_REF=$OPTARG
;;
n) # New binary
BIN_NEW=$OPTARG
;;
#![feature(augmented_assignments)]
#![feature(op_assign_traits)]
#![feature(zero_one)]
extern crate libc;
use libc::{c_long, c_ulong};
use std::cmp;
use std::ops::{Mul,Add,AddAssign};
@JayKickliter
JayKickliter / enum_macro.rs
Last active August 30, 2016 17:14
Create enum from macro
macro_rules! make_event {
( $name:ident, {$( $variant:ident ),*} ) => {
enum $name {
$($variant,)+
}
}
}
make_event!(Cat, {Izzy,Colonel});
@JayKickliter
JayKickliter / emacs-gfm.md
Last active November 13, 2022 18:38
Render github-flavored markdown (GFM) in emacs using `pandoc`

Command line usage

pandoc pandoc --quiet -f gfm -s somefile.md

What the options mean:

  1. --quiet: supress "[WARNING] This document format requires a nonempty <title> element."
  2. -f gfm: input format is Github Flavored Markdown
@JayKickliter
JayKickliter / tock_bringup_notes.md
Last active April 4, 2017 21:52
Notes on bringing up tock on a custom board

Q. Why are base interrupts separated from peripheral interrupts?

A. Because the linker keeps 'em separated:

/* Place vector table at the beginning of ROM.
 *
 * The first 16 entries in the ARM vector table are defined by ARM and
 * are common among all ARM chips. The remaining entries are
 * chip-specific, which Tock defines in a separate .irqs section