Skip to content

Instantly share code, notes, and snippets.

@fjnl
fjnl / client.cpp
Last active Dec 30, 2015
C++ Advent Calendar 2013 9日目の記事のサンプルコードです。 http://d.hatena.ne.jp/fjnl/ C++ Advent Calendar: http://partake.in/events/91328710-3c7b-436e-bd4e-4d98d88333f9
View client.cpp
#include <iostream>
#include <thread>
#include <future>
#include <string>
#include <vector>
#include <algorithm>
#include <boost/asio.hpp>
#include <boost/exception/all.hpp>
namespace asio = boost::asio;
@fjnl
fjnl / nvcc.jam
Created Feb 5, 2012
add -code and -arch support to nvcc.jam.
View nvcc.jam
# nvcc.jam Boost.Build Jam file for extended toolset.
# Copyright (c) 2010 - 2011 Kohei Takahashi (Flast).
# Distributed under the MIT license. for more detail see COPYING.
import "class" : new ;
import common ;
import feature : feature ;
import generators ;
import modules ;
View ariel.js
function ariel_eval(src_ari, reader, writer) {
var src =
'(function(reader, writer) {' +
' var stack = [];' +
' var sp = 0;';
var INSNS = [
{ re: /^\s*あり\s*あり\s*あり/,
js: '++sp;' },
{ re: /^\s*あり\s*あり\s*える/,
@fjnl
fjnl / mpi_extractor.cpp
Created Oct 19, 2011
Extract functions related to MPI from mpi.h
View mpi_extractor.cpp
#include <llvm/Support/Host.h>
#include <clang/AST/ASTConsumer.h>
#include <clang/AST/Decl.h>
#include <clang/AST/DeclGroup.h>
#include <clang/Basic/TargetInfo.h>
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/CompilerInvocation.h>
#include <clang/Parse/ParseAST.h>
#include <boost/algorithm/string.hpp>
View maintype.cpp
#include <llvm/Support/Host.h>
#include <clang/AST/ASTConsumer.h>
#include <clang/AST/Decl.h>
#include <clang/AST/DeclGroup.h>
#include <clang/Basic/TargetInfo.h>
#include <clang/Frontend/CompilerInstance.h>
#include <clang/Frontend/CompilerInvocation.h>
#include <clang/Parse/ParseAST.h>
struct ast_consumer : clang::ASTConsumer {