Skip to content

Instantly share code, notes, and snippets.

#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 {
@fjnl
fjnl / mpi_extractor.cpp
Created October 19, 2011 10:37
Extract functions related to MPI from mpi.h
#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>
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 / nvcc.jam
Created February 5, 2012 17:30
add -code and -arch support to 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 ;
@fjnl
fjnl / client.cpp
Last active December 30, 2015 16:28
C++ Advent Calendar 2013 9日目の記事のサンプルコードです。 http://d.hatena.ne.jp/fjnl/ C++ Advent Calendar: http://partake.in/events/91328710-3c7b-436e-bd4e-4d98d88333f9
#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;