目前分類:C and C++ (177)

瀏覽方式: 標題列表 簡短摘要

#include <iostream>
#include <vector>

hedgezzz 發表在 痞客邦 留言(0) 人氣()

void funcclose(FILE* f)
{

hedgezzz 發表在 痞客邦 留言(0) 人氣()

//http://scrupulousabstractions.tumblr.com/post/37576903218/cpp11style-no-new-delete
#include <thread>

hedgezzz 發表在 痞客邦 留言(0) 人氣()

三個地方在 c++0x 而不是 c++11 時必須修改 :

1.  using LargeArray= array<int,10000>; 改成 typedef array<int,10000>  LargeArray  ;

hedgezzz 發表在 痞客邦 留言(0) 人氣()

//http://scrupulousabstractions.tumblr.com/post/37576903218/cpp11style-no-new-delete
/* stephantl_make_unique.h

hedgezzz 發表在 痞客邦 留言(0) 人氣()

http://da-data.blogspot.tw/2013/03/optimistic-cuckoo-hashing-for.html#!/2013/03/optimistic-cuckoo-hashing-for.html

https://github.com/efficient/libcuckoo

hedgezzz 發表在 痞客邦 留言(0) 人氣()

http://codecapsule.com/2013/05/13/implementing-a-key-value-store-part-5-hash-table-implementations/
http://preshing.com/20110603/hash-table-performance-tests/

hedgezzz 發表在 痞客邦 留言(0) 人氣()

因為 clients 超過 1000 個,所以使用 event 方式而不產生 threads, 每個 client 都將自己

想要看的股票代碼傳進來 , 此時使用 lockfreequeue 把 client 欲刪除/增加 的股票代碼 傳進去每個

hedgezzz 發表在 痞客邦 留言(0) 人氣()

class People
{

hedgezzz 發表在 痞客邦 留言(0) 人氣()

"Elements of programming interface"  裡面有一個 sample , 關於  priority queue ,

以下是該範例 :

hedgezzz 發表在 痞客邦 留言(0) 人氣()

之前的程式,都是一個 connect 一個 thread , 在連線不多情況下還 ok , 但是萬一

需要處理上千個 connection ?  例如 , clients 透過 socket 來取得 行情 ,  此時, 你的

hedgezzz 發表在 痞客邦 留言(0) 人氣()

https://gist.github.com/matteobertozzi/2758693
http://www.cs.rochester.edu/research/synchronization/pseudocode/queues.html

hedgezzz 發表在 痞客邦 留言(0) 人氣()

http://stackoverflow.com/questions/20113375/implement-double-word-cas-by-assambly

 

hedgezzz 發表在 痞客邦 留言(0) 人氣()

https://code.google.com/p/hardysimpson-zlog/downloads/list

照著文件 install ... 然後開始寫測試程式 !!

hedgezzz 發表在 痞客邦 留言(0) 人氣()

我有一個 structure 

struct data_

hedgezzz 發表在 痞客邦 留言(0) 人氣()

#include <stdio.h>
#include <glib.h>

hedgezzz 發表在 痞客邦 留言(0) 人氣()

$ ./bootstrap.sh 

hedgezzz 發表在 痞客邦 留言(0) 人氣()

//https://gist.github.com/2930467
#include <stdio.h>

hedgezzz 發表在 痞客邦 留言(0) 人氣()

volatile int m = 0 ;
#define HELD_VALUE 1

hedgezzz 發表在 痞客邦 留言(0) 人氣()

#include <stdio.h>
#include <stdlib.h>

hedgezzz 發表在 痞客邦 留言(0) 人氣()