This file contains hidden or 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
//////////////////////////////////////////////////////////////////////////////// | |
/* | |
Copyright (c) 2014 Sam Yuen | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, |
This file contains hidden or 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 <stdlib.h> | |
#include <stdint.h> | |
/* | |
//////////////////////////////////////////////////////////////////////////////// | |
== [[bet]] binary expression tree | |
A 'bet' is a binary expression tree, which could be any type as below: | |
- An indicator, e.g. dpa, dpb |
This file contains hidden or 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
// It's a CPU-bound program for testing | |
#include <stdio.h> | |
#include <pthread.h> | |
#include <unistd.h> | |
static size_t num_slices; | |
static size_t num_cpus; | |
static pthread_mutex_t pi_lock; | |
static double pi; |
This file contains hidden or 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
#!/usr/bin/perl -w | |
# Sync the information between BibTeX and PDF XMP. | |
# [email protected] | |
use strict; | |
use warnings; | |
use POSIX; | |
use Getopt::Std; |