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 crossbeam_epoch; | |
extern crate test; | |
#[cfg(test)] | |
mod bench { | |
use crossbeam_epoch::{Owned, Scope, pin}; | |
use std::thread; | |
use test::{Bencher, black_box}; |
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
void DataParser::parseGLSL(std::vector<std::string> const& source, ShaderSource& parseTo) { | |
std::vector<size_t> preprocLines; | |
std::regex const map_rgx("\\s*#map\\s+\\w+(?=\\s*\\n)"); | |
std::regex const unif_rgx("uniform\\s+\\w+\\s+\\w+(?=\\s*;)"); | |
std::regex const block_rgx("uniform\\s+\\w+(?=\\s*(\\{|\\n))"); | |
for (size_t i_line = 0; i_line < source.size() - 1; ++i_line) { | |
std::string line = source[i_line]; | |
std::string lineBelow = source[i_line + 1]; |