http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
http://stackoverflow.com/questions/3175105/how-to-insert-code-into-a-latex-doc
LaTeX Sample with professional look
http://stackoverflow.com/questions/741985/latex-source-code-listing-like-in-professional-books
Saturday, April 28, 2012
Daily Reading: Locality of reference
Spatial Locality, Temporal Locality, relevant knowledge of cache. (wiki)
http://en.wikipedia.org/wiki/Locality_of_reference#Use_of_spatial_and_temporal_locality:_hierarchical_memory
http://en.wikipedia.org/wiki/Locality_of_reference#Use_of_spatial_and_temporal_locality:_hierarchical_memory
Texture memory speed test
Speed test program
http://forums.nvidia.com/index.php?showtopic=181432&st=0
"On Fermi, global memory loads are cached in L1 and L1 cache has higher bandwidth than the texture cache"
http://stackoverflow.com/questions/9893086/why-in-my-case-the-texture-memory-is-slower-than-the-global
Spatial Locality of texture memory usage.
http://forums.nvidia.com/index.php?showtopic=181432&st=0
"On Fermi, global memory loads are cached in L1 and L1 cache has higher bandwidth than the texture cache"
http://stackoverflow.com/questions/9893086/why-in-my-case-the-texture-memory-is-slower-than-the-global
Spatial Locality of texture memory usage.
Cache & Cache miss or hit
Most modern desktop and server CPUs have at least three independent caches: an Instruction cache to speed up executable instruction fetch, a data cache to speed up data fetch and store, and a translation lookaside buffer (TLB)???? used to speed up virtual-to-physical address translation for both executable instruction and data.
Cache Entries
Memory is split into "locations," which correspond to cache "lines".
The requested memory location (now called a tag)
a copy of the data
When the processor needs to read or write a location in main memory, it first checks for a corresponding entry in the cache. The cache checks for the contents of the requested memory location in any cache lines that might contain in that address. If the processor finds that the memory location is in the cache, a cache hit has occurred (otherwise, a cache miss).
A cache miss refers to a failed attempt to read or write a piece of data in the cache, which results in a main memory access with much longer latency.
Three kinds of cache misses : instruction read miss, data read miss, and data write miss.
A cache read miss from an instruction cache generally causes the most delay, because the processor, or at least the thread of execution, has to wait (stall) until the instruction is fetched from main memory.
A cache read miss from a data cache usually causes less delay, because instructions not dependent on the cache read can be issued and continue execution until the data is returned from main memory, and the dependent instructions can resume execution.
A cache write miss to a data cache generally causes the least delay, because the write can be queued and there are few limitations on the execution of subsequent instructions. The processor can continue until the queue is full.
Reference:
http://en.wikipedia.org/wiki/CPU_cache#Cache_miss
Cache Entries
Memory is split into "locations," which correspond to cache "lines".
The requested memory location (now called a tag)
a copy of the data
When the processor needs to read or write a location in main memory, it first checks for a corresponding entry in the cache. The cache checks for the contents of the requested memory location in any cache lines that might contain in that address. If the processor finds that the memory location is in the cache, a cache hit has occurred (otherwise, a cache miss).
A cache miss refers to a failed attempt to read or write a piece of data in the cache, which results in a main memory access with much longer latency.
Three kinds of cache misses : instruction read miss, data read miss, and data write miss.
A cache read miss from an instruction cache generally causes the most delay, because the processor, or at least the thread of execution, has to wait (stall) until the instruction is fetched from main memory.
A cache read miss from a data cache usually causes less delay, because instructions not dependent on the cache read can be issued and continue execution until the data is returned from main memory, and the dependent instructions can resume execution.
A cache write miss to a data cache generally causes the least delay, because the write can be queued and there are few limitations on the execution of subsequent instructions. The processor can continue until the queue is full.
Reference:
http://en.wikipedia.org/wiki/CPU_cache#Cache_miss
Friday, April 27, 2012
Translation lookaside buffer (wiki)
A translation lookaside buffer (TLB) is a cache that memory management hardware uses to improve virtual address translation speed. All current desktop, notebook, and server processors use a TLB to map virtual and physical address spaces, and it is nearly always present in any hardware which utilizes virtual memory.
Reference:Wiki
Reference:Wiki
Wednesday, April 25, 2012
Create perspective image in inkscape
Import bitmap as vector
http://inkscape.org/doc/tracing/tutorial-tracing.html
Create perspective frame of picture:
Tutorial:
http://www.brankovukelic.com/post/716617691/complete-guide-inkscape-perspective
http://www.built-to-spec.com/blog/2011/01/02/quick-inkscape-tutorial-perspective-transforms/
http://tonybuser.com/2d-to-3d
http://inkscape.org/doc/tracing/tutorial-tracing.html
Create perspective frame of picture:
Tutorial:
http://www.brankovukelic.com/post/716617691/complete-guide-inkscape-perspective
http://www.built-to-spec.com/blog/2011/01/02/quick-inkscape-tutorial-perspective-transforms/
http://tonybuser.com/2d-to-3d
Saturday, April 21, 2012
Matrix2latex (Matlab)
Little Script for Matrix in Matlab output to Latex
http://www.mathworks.de/matlabcentral/fileexchange/4894-matrix2latex
http://www.mathworks.de/matlabcentral/fileexchange/4894-matrix2latex
Friday, April 20, 2012
Fixing problem during installing gummi spelling check
gtkspell need
No package 'gtk+-2.0' found solution:
http://ubuntuforums.org/showthread.php?t=1255480
libgtk2.0-dev
fixed it
No package 'enchant' found solution:
Download enchant source
http://www.linuxfromscratch.org/blfs/view/cvs/general/enchant.html
Installation Method:
http://groups.google.com/group/pyenchant-users/browse_thread/thread/6be9036c488d37bb?pli=1
./configure
make
make install (maybe need sudo permission)
inttool installation (need intltool 0.35.0 or later)
./configure
make
make install
No package 'gtk+-2.0' found solution:
http://ubuntuforums.org/showthread.php?t=1255480
libgtk2.0-dev
fixed it
No package 'enchant' found solution:
Download enchant source
http://www.linuxfromscratch.org/blfs/view/cvs/general/enchant.html
Installation Method:
http://groups.google.com/group/pyenchant-users/browse_thread/thread/6be9036c488d37bb?pli=1
./configure
make
make install (maybe need sudo permission)
inttool installation (need intltool 0.35.0 or later)
./configure
make
make install
Thursday, April 19, 2012
Wednesday, April 18, 2012
GPU: architecture and programming (NYU Course)
http://cs.nyu.edu/courses/spring12/CSCI-GA.3033-012/index.html
Contains some interesting links for GPU tools from webpage above
Multi2Sim Simulation Framework
http://www.multi2sim.org/
GPUocelot
http://code.google.com/p/gpuocelot/
Dynamic Compilation for PTX
Short CUDA tutorial of Colorado School of Mines
http://geco.mines.edu/tesla/cuda_tutorial_mio/index.html
Contains some interesting links for GPU tools from webpage above
Multi2Sim Simulation Framework
http://www.multi2sim.org/
GPUocelot
http://code.google.com/p/gpuocelot/
Dynamic Compilation for PTX
Short CUDA tutorial of Colorado School of Mines
http://geco.mines.edu/tesla/cuda_tutorial_mio/index.html
Notes of CUDA/C typecasting
Fast way to convert float4 to uchar4? Texture conversion
http://forums.nvidia.com/index.php?showtopic=166797
There is no Boolean type in C
http://www.cs.cf.ac.uk/Dave/C/node4.html
How to vectorize a vector type cast
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-February/047827.html
CUDA Example BoxFilter in OpenCL
http://rungpu.org/opencl/kernels/25/boxfilter.cl
Shows Interoperability between CUDA and OpenGL
Contains function of conversion between RGB field and float field
http://forums.nvidia.com/index.php?showtopic=166797
There is no Boolean type in C
http://www.cs.cf.ac.uk/Dave/C/node4.html
How to vectorize a vector type cast
http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-February/047827.html
CUDA Example BoxFilter in OpenCL
http://rungpu.org/opencl/kernels/25/boxfilter.cl
Shows Interoperability between CUDA and OpenGL
Contains function of conversion between RGB field and float field
Monday, April 16, 2012
How to record videos from Logitech Quickcam Pro 9000
http://ubuntuforums.org/showthread.php?t=890526
ffmpeg -f audio_device -i /dev/dsp1 -f video4linux2 -s 640x480 -i /dev/video0 -f avi - | tee `date -I`.avi | mplayer -
Wednesday, April 11, 2012
ffmpeg webcam I/O problem compilation
ffmpeg webcam I/O problem
http://ubuntuforums.org/showthread.php?t=1414326
More information about video4Linux2
http://ubuntuforums.org/showthread.php?t=1564565
Using ffmpeg libs in C
http://ubuntuforums.org/showthread.php?t=128247
C++ example and bash command under Linux
http://www-i6.informatik.rwth-aachen.de/~dreuw/videotools.html
Philippe Dreuw's Computer Vision Main Site:
http://www-i6.informatik.rwth-aachen.de/~dreuw/index.php
ffmpeg documentation
http://ffmpeg.org/ffmpeg.html#toc-Examples-6
ffmpeg tricks
http://segfault.in/2010/10/ffmpeg-tricks-you-should-know-about/
http://ubuntuforums.org/showthread.php?t=1414326
More information about video4Linux2
http://ubuntuforums.org/showthread.php?t=1564565
Using ffmpeg libs in C
http://ubuntuforums.org/showthread.php?t=128247
C++ example and bash command under Linux
http://www-i6.informatik.rwth-aachen.de/~dreuw/videotools.html
Philippe Dreuw's Computer Vision Main Site:
http://www-i6.informatik.rwth-aachen.de/~dreuw/index.php
ffmpeg documentation
http://ffmpeg.org/ffmpeg.html#toc-Examples-6
ffmpeg tricks
http://segfault.in/2010/10/ffmpeg-tricks-you-should-know-about/
Paul Griffith's Webblog
http://www.paulgriffiths.net/index.php
Examples in C from Paul Griffith.
http://www.paulgriffiths.net/program/c/
A simple TCP/IP echo server
http://www.paulgriffiths.net/program/c/echoserv.php
Examples in C from Paul Griffith.
http://www.paulgriffiths.net/program/c/
A simple TCP/IP echo server
http://www.paulgriffiths.net/program/c/echoserv.php
How to compile ffmpeg from source
http://www.helyar.net/2010/how-to-compile-ffmpeg-from-source/
How to build FFmpeg for Android
http://www.roman10.net/how-to-build-ffmpeg-for-android/
Feipeng Liu Nanyang Singapore
How to build FFmpeg for Android
http://www.roman10.net/how-to-build-ffmpeg-for-android/
Feipeng Liu Nanyang Singapore