BVLC/caffe — pull request #397 by luotao1 (2014-05-07 09:18:14+00:00)
Title: modify im2col.cpp into a multi-thread version

When training ImageNet model on CPU, `ConvolutionLayer::Forward_cpu` and `ConvolutionLayer::Backward_cpu` occupy about 80% time, and `im2col_cpu` + `col2im_cpu` occupy 30%~50% time of ConvolutionLayer, thus, we modify im2col.cpp into a multi-thread version.

We test out modified version on our 4-physical-core machine, if we create 4 pthreads, we can decrease 50% time of `im2col_cpu` + `col2im_cpu` . And you can define your **THREAD_NUM** based on the physical core number of your machine.