This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In no particular order: | |
Space Master - I Need You (Master Mix) https://www.youtube.com/watch?v=Qg0VjVXVoXk | |
Afrika Bambaataa - Feeling Irie https://www.youtube.com/watch?v=z2VdfIA7N7o | |
House Pimps - Zulu Nation https://www.youtube.com/watch?v=zrXnzJ0Mn0E | |
The Badman Presents N.D.X. - Come With Me https://www.youtube.com/watch?v=EUDW_LWbtQM | |
Tainted Two - The Megablast https://www.youtube.com/watch?v=oHd8Sk-7WIU | |
Digital Domain - I Need Relief https://www.youtube.com/watch?v=zrXnzJ0Mn0E | |
Problem house - Party people https://www.youtube.com/watch?v=MNQitcvJKlw | |
DJ Hype - Shot in The Dark (Q Bass Remix) https://www.youtube.com/watch?v=0O40o6RvoH8 | |
Mig-29 - Mig-29 (Love Mix) https://www.youtube.com/watch?v=4oqqMbmIhkQ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use proc_macro2::{Span, TokenStream}; | |
use quote::quote; | |
use syn::{ | |
fold::Fold, | |
parse::{Parse, ParseStream, Result}, | |
parse_quote, | |
punctuated::Punctuated, | |
Expr, ExprLit, FieldValue, Ident, ItemFn, LitStr, Local, Member, Pat, Stmt, Token, | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[cfg_attr(feature = "capture", derive(Serialize))] | |
#[cfg_attr(feature = "replay", derive(Deserialize))] | |
#[derive(Debug, Clone, Eq, PartialEq, Hash)] | |
pub struct ImageKey { | |
pub common: PrimKeyCommonData, | |
pub key: ApiImageKey, | |
pub stretch_size: SizeKey, | |
pub tile_spacing: SizeKey, | |
pub color: ColorU, | |
pub sub_rect: Option<DeviceIntRect>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Type your code here, or load an example. | |
#[cfg(target_arch = "x86")] | |
use std::arch::x86::__m128; | |
#[cfg(target_arch = "x86_64")] | |
use std::arch::x86_64::__m128; | |
#[cfg(all(any(target_arch = "x86", target_arch = "x86_64"), target_feature = "sse2"))] | |
pub struct Ray { | |
pub pt: __m128, | |
pub dir: __m128, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub fn hit_zip(aabb: &Aabb, r: &Ray, t_min: f32, t_max: f32) -> bool { | |
r.direction | |
.iter() | |
.zip( | |
r.point | |
.iter() | |
.zip(aabb.min.iter().zip(aabb.max.iter())), | |
).all(|(d, (p, (min, max)))| { | |
let inv_d = 1. / d; | |
let t0 = (min - p) * inv_d; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Vtop.h> | |
extern "C" { | |
// CONSTRUCTORS | |
Vtop* | |
top_new() { | |
return new Vtop(); | |
} | |
void |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type ServerInfoCB = FnMut(&ContextRef, Option<&ServerInfoRef>) + Send + Sync + 'static; | |
pub fn get_server_info<CB>(&self, cb: CB) -> Result<Operation> | |
where | |
CB: FnMut(&ContextRef, Option<&SourceInfo>) + Send + Sync + 'static, | |
{ | |
let userdata = Box::into_raw(Box::new(cb)) as *mut c_void; | |
let cb: ffi::pa_server_info_cb_t = Some(c_get_server_info_cb); | |
op_or_err!( | |
self, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Samples are delta-encoded | |
pub fn unpack_sample<T: Default + ops::AddAssign + Clone>(input: &[u8]) | |
-> Result<Vec<T>, &'static str> { | |
if input.len() % mem::size_of::<T>() != 0 { | |
return Err("packed sample data is not aligned"); | |
} | |
let packed_sample: &[T] = unsafe { | |
slice::from_raw_parts(input.as_ptr() as *const T, | |
input.len() / mem::size_of::<T>()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open_server_stream().ok() | |
.and_then(|stream| UnixStream::from_stream(stream, &handle).ok()) | |
.and_then(|stream| bind_and_send_client(stream, &handle, &tx_rpc)) | |
.ok_or_else(|| io::Error::new( | |
io::ErrorKind::Other, | |
"Failed to open stream and create rpc." | |
)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Square by Pulse does this trick of adding two 8.8 fixed numbers in | |
"one 40-bit register" in the inner loop of it's pin-mapping routine. I | |
wonder if this is a known bit-twiddling trick documented some where? | |
(It feels like Lamport's 1976 paper where u is a 23 bit number) | |
Say we have u and v in 8.8 fixed point format and we want to increment | |
those by some signed deltas du and dv also in 8.8 fixed point. | |
I'll only consider a negative du because that seems to be an | |
interesting case in the code. Eg. let u = v = 64 = 64.00 = 0x4000 and |