2011年8月2日 星期二

We love varnish

[PDF] Varnish 

[PDF] Varnish http accelerator

[PDF] Using Varnish VCL for webmasters


Inline C-code
Can be added between, and in functions.
Requires C-clue.
Can do almost anything.

C{
    printf(”Hello World\n”);
}C

All information from phk@freebsd.org

2011年7月18日 星期一

Varnish and Multiple Backend


Multiple Backends

backend default {
  .host = "127.0.0.1";
  .port = "8080";
}
 
backend stylesheets {
  .host = "10.0.0.10";
  .port = "80";
}
 
sub vcl_recv {
  if (req.url ~ "^/stylesheets") {
    # set stylesheets backend
    set req.backend = stylesheets;
    return(lookup);
  }
 
  # set default backend
  set req.backend = default;
  return(pass);
}



Round Robin And Random Multiple Server Backend

2011年3月20日 星期日

使 CUDA wizard 支援 sm_20 (Fermi)

CUDA wizard 只支援到 sm_13,這樣無法使用 Fermi 架構的特性

安裝完 CUDA wizard 之後,若是使用 VS 9.0 請修改
C:\Program Files\Microsoft Visual Studio 9.0\VC\VCProjectDefaults\cuda.rules

增加兩個片斷,請 search sm_13

<!-- after arch sm_13 -->
<EnumValue
Value="8"
Switch="-arch compute_20"
DisplayName="2.0 (virtual) Arch"
/>

<EnumValue
Value="9"
Switch="-arch sm_20"
DisplayName="2.0 (hardware) Arch"
/>

第二段
<!-- after code sm_13 -->
<EnumValue
Value="8"
Switch="-code compute_20"
DisplayName="2.0 (virtual) Arch"
/>

<EnumValue
Value="9"
Switch="-code sm_20"
DisplayName="2.0 (hardware) Arch"
/>
Fermi (2.0) 並沒有 virtual 的部分,其實上面可以再縮減。
重新啟動 Virsual Studio,專案屬性應該就能選 sm_20 了。

2011年1月10日 星期一

PyCon US 2011 & PyCon Asia Pacific 2011

PyCon US 2011
http://us.pycon.org/2011/home/
(this website is based on Django and Pinax.)


PyCon Asia Pacific 2011
http://apac.pycon.org/
(this website is based on Plone.)

2010年12月19日 星期日

the precreated templates for OpenVZ

Backup tools for Mac

Carbon Copy Cloner
http://www.bombich.com/index.html

TCFail Snow Leopard 繁體中文系統字體修改工具

2010年12月9日 星期四

CUDA Certification – Exam Scheduling Now Open

CUDA Certification – Exam Scheduling Now Open



NVIDIA CUDA Professional Developer Program Study Guide
As part of the process of achieving the standards expected from an NVIDIA CUDA Professional Developer, all candidates are required to take a series of self-study lectures and exercises.
Please read this entire document before starting your study course.
The foundation of this training is provided by the text book,  Programming Massively Parallel Processors: A Hands-on Approach, authors, David B. Kirk, Wen-mei W. Hwu.
You can also make use of podcasts in mp4 format of the lectures below; the reading assignments will help to make the lecture more productive, so please complete in advance.
  1. Introduction to GPU Computing (60.2 MB)
    1. Assignment please read Chapter 1 of Textbook
  2. CUDA Programming Model (75.3 MB)
    1. Assignment please read Chapter 2 of Textbook
  3. CUDA API (32.4 MB) 
  4. Simple Matrix Multiplication in CUDA (46.0 MB)
    1. Assignment please read Chapter 3 of Textbook 
  5. CUDA Memory Model (109 MB)
    1. Assignment please read Chapter 4 of Textbook 
  6. Shared Memory Matrix Multiplication (81.4 MB) 
  7. Additional CUDA API Features (22.4 MB) 
  8. Useful Information on CUDA Tools (15.7 MB) 
  9. Threading Hardware (140 MB) 
    1. Assignment please read Chapter 5 of Textbook 
  10. Memory Hardware (85.8 MB)
  11. Memory Bank Conflicts (115 MB) 
  12. Parallel Thread Execution (32.6 MB) 
  13. Control Flow (96.6 MB) 
  14. Precision (137 MB)
    1. Assignment please read Chapter 6 of Textbook
    2. Assignment please read Chapter 7 of Textbook
Please download all the documents and files that are relevant to your operating system.
As part of the study process, please ensure you also download and study the following documents:
CUDA C Programming Guide 3.0
CUDA C Best Practices Guide 3.0
CUDA C Online Documentation
Additional CUDA Programming Tools and Compiler Documentation can be found at this link:
http://www.nvidia.com/object/cuda_programming_tools.html
Please download the following additional documents:
CUDA Compiler Driver NVCC 2.0
PTX: Parallel Thread Execution ISA Version 1.2
CUDA Occupancy Calculator
Additional Course Exercises with Solutions (Supports CUDA Basics)
Exercise Instructions
Exercise files for Visual Studio
Exercise files for Mac & Linux
Additional Supporting Materials
NVIDIA is hosting a series of Webinars about the CUDA Architecture.  NVIDIA staff is available during the presentations to answer questions, and the recordings are available for download.
http://developer.nvidia.com/object/gpu_computing_online.html
For technical questions please use the public CUDA developer forums:
http://forums.nvidia.com/index.php?showforum=62

2010年12月8日 星期三

解讀 Drupal 的 hook_menu()

假若  
$items['mypath/%objectA'] = array( ... 

需要實作
function objectA_load() { return $object;}

page callback 就能取得完整 object 或是 array,而非只是 id

參考這篇
Anatomy of hook_menu