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(test)] extern crate test; | |
fn main() { | |
} | |
fn manual_min(a: usize, b: usize) -> usize { | |
if a < b { | |
a | |
} else { | |
b |
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
use std::alloc::{System, GlobalAlloc, Layout}; | |
use std::sync::atomic::{AtomicUsize, Ordering::SeqCst, AtomicBool}; | |
use std::sync::{Arc, Condvar, Mutex}; | |
use std::thread; | |
use crossbeam_channel::bounded; | |
struct Allocator; | |
static ALLOCATIONS: AtomicUsize = AtomicUsize::new(0); |
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
[INFO][gfx_backend_vulkan] | |
GENERAL [Loader Message (0)] : Device Extension: VK_NVX_multiview_per_view_attributes (libGLX_nvidia.so.0) version 0.0.1 | |
object info: (type: INSTANCE, hndl: 93960781290048) | |
[ERROR][gfx_backend_vulkan] | |
VALIDATION [NVIDIA (1)] : vkBindImageMemory: memoryOffset 2a00 is not aligned to 400 | |
object info: (type: IMAGE, hndl: 140345841030128) | |
thread '<unnamed>' panicked at 'internal error: entered unreachable code', /home/crs/.cargo/registry/src/github.com-1ecc6299db9ec823/gfx-backend-vulkan-0.2.3/src/device.rs:1311:18 | |
stack backtrace: |
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
use amethyst::utils::application_root_dir; | |
use amethyst::SimpleState; | |
use amethyst::GameDataBuilder; | |
use amethyst::Application; | |
use amethyst::renderer::{ | |
plugins::{RenderPbr3D, RenderToWindow}, | |
types::DefaultBackend, | |
RenderingBundle, | |
}; | |
use amethyst::window::DisplayConfig; |
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
use std::path::Path; | |
use std::f64::consts::PI; | |
use criterion_plot::prelude::*; | |
mod test_signals; | |
struct SignalPlot { | |
name: String, | |
color: Color, |
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
running 127 tests | |
test linalg::cholesky::cholesky_100x100_na ... bench: 49,795 ns/iter (+/- 1,070) | |
test linalg::cholesky::cholesky_100x100_rulinalg ... bench: 55,543 ns/iter (+/- 1,929) | |
test linalg::cholesky::cholesky_200x200_na ... bench: 359,510 ns/iter (+/- 8,270) | |
test linalg::cholesky::cholesky_200x200_rulinalg ... bench: 363,149 ns/iter (+/- 7,833) | |
test linalg::cholesky::cholesky_500x500_na ... bench: 5,697,617 ns/iter (+/- 21,306,798) | |
test linalg::cholesky::cholesky_500x500_rulinalg ... bench: 5,061,037 ns/iter (+/- 89,224) | |
test linalg::cholesky::cholesky_unpack_100x100_na ... bench: 50,275 ns/iter (+/- 1,445) | |
test linalg::cholesky::cholesky_unpack_100x100_rulinalg ... bench: 58,819 ns/iter (+/- 2,515) | |
test linalg::cholesky::cholesky_unpack_200x200_na ... bench: 361,116 ns/iter (+/- |
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
use std::sync::Arc; | |
use std::sync::atomic::{AtomicUsize, Ordering}; | |
//////////////////////////////////////////////////////////////////////////////////////////////////// | |
trait WindowImpl { | |
fn new() -> PlatformWindow where Self: Sized; | |
fn set_callback(&mut self, event_handler: Box<FnMut()>); | |
fn call_callback(&mut self); | |
} |
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
use std::sync::Arc; | |
use std::sync::atomic::{AtomicUsize, Ordering}; | |
//////////////////////////////////////////////////////////////////////////////////////////////////// | |
trait WindowImpl { | |
fn new() -> PlatformWindow where Self: Sized; | |
fn set_callback(&mut self, events: Box<dyn EventHandler>); | |
fn call_callback(&mut self); | |
} |
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
Compiling rtb-rs-tester v0.1.0 (/home/crs/git/rtb-rs/rtb-rs-tester) | |
error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements | |
--> src/editor.rs:58:13 | |
| | |
58 | handler | |
| ^^^^^^^ | |
| |
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 <iostream> | |
#include <functional> | |
using namespace std::placeholders; | |
bool ReplaceNumber(int a, int mod, std::string replacement) { | |
if (a%mod == 0) { | |
std::cout << replacement; | |
return true; | |
} |
NewerOlder