This file contains 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 "airfoil.h" | |
#include <math.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
float gam, gm1, cfl, eps, mach, alpha, air_const, qinf[4]; | |
void initialise_flow_field(int ncells, float *q, float *res) | |
{ |
This file contains 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
/********************************* Primitives ********************************/ | |
// aos(dim, length, remote, idx, iidx) | |
// soa(dim, length, remote, idx, iidx) |
This file contains 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
Thread 9 (Thread 0x7ffff03ff700 (LWP 11431)): | |
#0 syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 | |
No locals. | |
#1 0x00007ffff3dcf5da in uv__epoll_wait (epfd=<optimized out>, | |
events=events@entry=0x7ffff03fbb70, nevents=nevents@entry=1024, | |
timeout=timeout@entry=-1) | |
at ../../../../src/libuv/src/unix/linux-syscalls.c:282 | |
No locals. | |
#2 0x00007ffff3dcdf33 in uv__io_poll (loop=loop@entry=0x7ffff2038300, | |
timeout=-1) at ../../../../src/libuv/src/unix/linux-core.c:166 |
This file contains 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
% RUST_LOG=rustpkg::util rustpkg build | |
WARNING: The Rust package manager is experimental and may be unstable | |
compile_crate: crate=/home/mpiechotka/Projects/xml-rs/lib.rs, workspace=/home/mpiechotka/Projects/xml-rs/.rust | |
compile_crate: short_name = xml-rs-0.0, flags =... | |
compile_input: /home/mpiechotka/Projects/xml-rs/lib.rs / Lib | |
flags: | |
cfgs: | |
compile_input's sysroot = /usr | |
rustc flags: extra::getopts::Matches{opts: ~[extra::getopts::Opt{name: Short('c'), hasarg: No, occur: Optional, aliases: ~[]}, extra::getopts::Opt{name: Long(~"cfg"), hasarg: Yes, occur: Multi, aliases: ~[]}, extra::getopts::Opt{name: Long(~"emit-llvm"), hasarg: No, occur: Optional, aliases: ~[]}, extra::getopts::Opt{name: Long(~"help"), hasarg: No, occur: Optional, aliases: ~[extra::getopts::Opt{name: Short('h'), hasarg: No, occur: Optional, aliases: ~[]}]}, extra::getopts::Opt{name: Short('L'), hasarg: Yes, occur: Multi, aliases: ~[]}, extra::getopts::Opt{name: Long(~"bin"), hasarg: No, occur: Optional, aliases: ~[]}, extra::getopts::Op |
This file contains 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
/* | |
* Copyright (C) 2014 Maciej Piechotka | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains 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 get_str() -> ~str { | |
return ~"test"; | |
} | |
pub fn test(st : &str) { | |
let s = get_str(); | |
let s2 : &str = s; | |
assert_eq!(st, s2); | |
} |
This file contains 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
struct Test<'t> { | |
i: &'t int | |
} | |
unsafe fn cast<'t>(test: &'t *mut std::libc::c_void) -> &'t mut Test<'t> { | |
&*(test.clone() as *mut Test<'t>) | |
} | |
pub fn main() { | |
unsafe { |
This file contains 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
#[feature(macro_registrar)] | |
extern mod syntax; | |
use syntax::ast::{Name}; | |
use syntax::ext::base::{SyntaxExtension}; | |
#[macro_registrar] | |
fn macro_registrar(register: |Name, SyntaxExtension|) { | |
use syntax::ext::base::{SyntaxExpanderTTExpanderWithoutContext,NormalTT}; |
This file contains 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
extern crate actix; | |
extern crate actix_web; | |
extern crate tokio; | |
use actix::*; | |
use actix_web::*; | |
use std::cell::RefCell; | |
use std::rc::Rc; | |
use std::time::Duration; |