- Poor locality of memory access
- Very little work per vertex
- Changing degree of parallelism over the course of execution
MapReduce
//clear the whole terminal screen | |
printf("\033[2J\033[1;1H"); | |
//only clear the portion for current portion of its | |
fputs("\033[A\033[2K\033[A\033[2K",stdout); | |
rewind(stdout); | |
ftruncate(1,0); |
#!/bin/bash | |
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm-latest | |
cd llvm-latest/tools | |
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang | |
cd clang/tools | |
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra | |
cd ../../../.. #go back to top directory | |
cd llvm-latest/projects | |
svn co http://llvm.org/svn/llvm-project/compiler-rt/trunk compiler-rt |
#!/usr/bin/env python | |
# Import the disassembly library (libopcodes) | |
from pybfd.opcodes import Opcodes, OpcodesException | |
from pybfd.bfd import Bfd, BfdException | |
from sys import argv, exit | |
from subprocess import Popen, PIPE | |
#include "llvm/ADT/SetVector.h" | |
#include "llvm/ADT/APSInt.h" | |
#include "clang/Driver/Options.h" | |
#include "clang/AST/AST.h" | |
#include "clang/AST/ASTContext.h" | |
#include "clang/AST/ASTConsumer.h" | |
#include "clang/AST/Expr.h" | |
#include "clang/AST/OperationKinds.h" | |
#include "clang/AST/RecursiveASTVisitor.h" | |
#include "clang/Frontend/ASTConsumers.h" |
//This panel will get focus as the original .NET panel always tries to get away from focus | |
public class FocusablePanel : Panel | |
{ | |
public FocusablePanel() | |
{ | |
this.SetStyle(ControlStyles.Selectable, true); | |
this.TabStop = true; | |
} | |
//Combobox will handle mouse wheel event, but if you want to combobox which won't handle mouse wheel | |
//event, rather pass to the parent, use this class | |
public class UnscrollableComboBox : ComboBox | |
{ | |
protected override void WndProc(ref Message m) | |
{ | |
if (m.Msg == 0x20a && this.Parent != null) | |
{ | |
PostMessage(this.Parent.Handle, m.Msg, m.WParam, m.LParam); | |
} |
using System.Collections.Generic; | |
using System.Drawing; | |
namespace PatternRecognition | |
{ | |
public class ConnectedComponentLabeling | |
{ | |
readonly int[,] board; | |
readonly int w; | |
readonly int h; |