Skip to content

Instantly share code, notes, and snippets.

/c/Users/Diggory/Projects/rust/x86_64-pc-windows-gnu/llvm/Release+Asserts/bin/llvm-tblgen.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
/c/Users/Diggory/Projects/rust/src/llvm/Makefile.rules:1645: recipe for target '/c/Users/Diggory/Projects/rust/x86_64-pc-windows-gnu/llvm/lib/Target/Mips/Release+Asserts/MipsGenRegisterInfo.inc.tmp' failed
make[4]: *** [/c/Users/Diggory/Projects/rust/x86_64-pc-windows-gnu/llvm/lib/Target/Mips/Release+Asserts/MipsGenRegisterInfo.inc.tmp] Error 127
make[4]: Leaving directory '/c/Users/Diggory/Projects/rust/x86_64-pc-windows-gnu/llvm/lib/Target/Mips'
/c/Users/Diggory/Projects/rust/src/llvm/Makefile.rules:932: recipe for target 'Mips/.makeall' failed
make[3]: *** [Mips/.makeall] Error 2
make[3]: Leaving directory '/c/Users/Diggory/Projects/rust/x86_64-pc-windows-gnu/llvm/lib/Target'
/c/Users/Diggory/Projects/rust/src/llvm/Makefile.rules:932: recipe for target 'Target/.makeall' failed
make[2]: *** [Target/.makeall] Error 2
let external = match n.nodes {
[[Node { contents: External(ref mut q @ Some(_)), .. }, Node { contents: External(None), .. }], [Node { contents: External(None), .. }, Node { contents: External(None), .. }]] |
[[Node { contents: External(None), .. }, Node { contents: External(ref mut q @ Some(_)), .. }], [Node { contents: External(None), .. }, Node { contents: External(None), .. }]] |
[[Node { contents: External(None), .. }, Node { contents: External(None), .. }], [Node { contents: External(ref mut q @ Some(_)), .. }, Node { contents: External(None), .. }]] |
[[Node { contents: External(None), .. }, Node { contents: External(None), .. }], [Node { contents: External(None), .. }, Node { contents: External(ref mut q @ Some(_)), .. }]] => {
mem::replace(q, None)
},
_ => None
};
[package]
name = "test"
version = "0.0.1"
authors = [ "[email protected]" ]
[lib]
name = "test"
crate-type = ["staticlib"]
@Diggsey
Diggsey / gist:715f264f6cb69b3132d6
Created May 7, 2015 17:49
Zero-allocation panic handler example
use std::any::Any;
use std::cell::Cell;
use std::marker::PhantomData;
// Built in panic handlers
fn default_panic_handler(msg: &(Any + Send), file: &'static str, line: u32) {
println!("{}:{} - {:?}", file, line, msg);
}
fn silent_panic_handler(_: &(Any + Send), _: &'static str, _: u32) { }
-unwind.rs ... ok
test [run-pass] run-pass/sepcomp-lib.rs ... ok
test [run-pass] run-pass/seq-compare.rs ... ok
test [run-pass] run-pass/shebang.rs ... ok
test [run-pass] run-pass/shadow.rs ... ok
test [run-pass] run-pass/shift-various-types.rs ... ok
test [run-pass] run-pass/shift.rs ... ok
test [run-pass] run-pass/signal-exit-status.rs ... ignored
test [run-pass] run-pass/sepcomp-lib-lto.rs ... ok
test [run-pass] run-pass/shift-near-oflo.rs ... ok
#![feature(no_std)]
#![no_std]
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
float acc[N];
acc[0] = S::identity();
for (int i = 0; i < (N-1); ++i) {
acc[i + 1] = S::op(acc[i], x[i]);
}
float dacc0[N];
dacc0[N - 1] = 1.0f;
for (int i = (N - 1); i > 0; --i) {
dacc0[i - 1] = S::dop0(acc[i], x[i]);
@Diggsey
Diggsey / gist:8b374bc5a3773d2d7103
Created May 24, 2015 04:46
Not your father's C++
// AmpTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/enum.hpp>
#include <boost/preprocessor/enum_params.hpp>
#include <boost/range/counting_range.hpp>
#include <boost/range/adaptor/reversed.hpp>
// AmpTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/enum.hpp>
#include <boost/preprocessor/enum_params.hpp>
#include <boost/range/counting_range.hpp>
#include <boost/range/adaptor/reversed.hpp>
// AmpBug.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <amp.h>
#include <iostream>
#include <iomanip>
using namespace concurrency;