摘要:
1.Preview2.active reading, read with questions, take notes3.Recite and Review4.Change read rates according to purpose and familarity with topics 阅读全文
摘要:
-L 编译时查找动态链接库的路径-lxxx(小写) e.g -lcudart = link libcudart.so ,-I(大写) 头文件的路径-rpath (-R), 编译时指定链接动态库的路径可以用ldd 看看是不有 ‘not found’在你链接的库后面,解决方法是通过-Wl,rpath=... 阅读全文
摘要:
http://codextechnicanum.blogspot.com/2013/12/embedding-python-in-c-converting-c.html//Make some vectors containing the data static const double xa... 阅读全文
摘要:
Notes on GNU MakefileVPATH=srcVPATH指定寻找源代码的路径,如果多个文件夹含有同名文件,总是选择找到的第一个。path %.c srcvpath %.h include# set LD_LIBRARY_PATHexport CC = gccexport CXX = ... 阅读全文
摘要:
1.使用Matlab的C扩展,需要用户安装matlab。g++ -L/media/exsoftware/MATLAB/R2013b/bin/glnxa64 -Wl,-rpath,/media/exsoftware/MATLAB/R2013b/bin/glnxa64 -o "test" ./d.o .... 阅读全文
摘要:
矩阵维度表示和正常相反。 a[2][3],行2列3,a.shape.shape_[0]=3,a.shape.shape_[1]=2.pred.Resize( Shape2( batch_size, num_out ) );Resize相当于STL的reserve,预先分配空间。Shape2说明是一个... 阅读全文
摘要:
// functional_mem_fun.cpp// compile with: /EHsc#include #include #include #include #include using namespace std;class StoreVals { int val;public:... 阅读全文
摘要:
/usr/lib/gedit/plugins/terminal.py# -*- coding: utf8 -*-# terminal.py - Embeded VTE terminal for gedit# This file is part of gedit## Copyright (C) 200... 阅读全文
摘要:
decltype((variable))总是引用类型,但是decltype(variable)只有当variable是引用类型时才是引用类型。#include #include using std::cin;using std::cout;using std::endl;auto f(auto x)... 阅读全文
摘要:
C familySupport for colorizing diagnostics emitted by GCC has been added. The -fdiagnostics-color=auto will enable it when outputting to terminals, -f... 阅读全文
摘要:
http://blog.jobbole.com/44015/2013/07/26 | 分类: C/C++, 开发 | 5 条评论 | 标签: C++11, C语言分享到: 127本文由 伯乐在线 - 治不好你我就不是兽医 翻译自 Marius Bancila。未经许可,禁止转载!欢迎加入:技术翻译小... 阅读全文
摘要:
http://www.cnblogs.com/baiyanhuang/archive/2010/01/17/1730717.htmlC++代码一直以其运行时的高性能高调面对世人, 但是说起编译速度,却只有低调的份了。比如我现在工作的源代码,哪怕使用Incredibuild调动近百台机子,一个完整的b... 阅读全文
摘要:
cout.setf(std::ios::unitbuf); 阅读全文
摘要:
Officialhttp://67.223.234.84/boost_doc/libs/range/doc/utility_class.html#sub_rangehttp://blog.sina.com.cn/s/blog_77eecd340100ru5z.htmlrange 所有的接口都直接定义... 阅读全文
摘要:
Check your gcc version. If it is less than 4.7, you need use another printer.py file. Get the file fromhttp://gcc.gnu.org/svn/gcc/branches/gcc-4_6-bra... 阅读全文
摘要:
conceptC++http://www.generic-programming.org/faq/?category=conceptcxxChecking Concept Without Concepts in C++ByAnthony Williams, September 22, 20101Co... 阅读全文
摘要:
./configure CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3"CXXFLAGS="-g -O2 -std=c++11"c++0x./configure CC="/usr/bin/gcc-4.6" CXX="/usr/bin... 阅读全文
摘要:
1 登录github, 点击自己感兴趣的repository的fork按钮,这样自己的github主页会有一个拷贝。2 在自己本地修改同时保持和原来的repository同步:git remote -v, 看看自己当前git repository的configure, origin 表示自己的rep... 阅读全文
摘要:
//commndline: doxygen Doxyfile /**comment/* /**time diff@pre precondition@post endcondition@throw exceptions@param start The start time 参数@para... 阅读全文
摘要:
http://www.cplusplus.com/forum/articles/10627/1.hpp文件hpp文件可以使用template函数和class静态函数(不含静态成员)a)不可包含全局对象和全局函数由于hpp本质上是作为.h被调用者include,所以当hpp文件中存在全局对象或者全局函... 阅读全文
摘要:
https://code.google.com/p/deep-learning-faces/source/browse/trunk/cuda_ut/include/bsxfun.h?r=7&spec=svn7/*Copyright (C) 2013 Yichuan Tang. contact: ta... 阅读全文
摘要:
sudo gedit /usr/local/cuda-5.5/libnsight/nsight.ini--launcher.defaultActionopenFile-vm../jre/bin/java-vmargs-XX:CompileCommand=exclude,java/lang/refle... 阅读全文
摘要:
Y=alpha * X +beta*Ytemplate void caffe_cpu_axpby(const int N, const float alpha, const float* X, const float beta, float* Y... 阅读全文
摘要:
手动安装 sudo rm -rf /usr/local/lib/python2.7/site-packages/numpy/ sudo rm -rf /usr/local/lib/python2.7/site-packages/numpy-*.egg*sudo rm -rf /usr/local/b... 阅读全文
摘要:
double getUnixTime(void){ struct timespec tv; if(clock_gettime(CLOCK_REALTIME, &tv) != 0) return 0; return (((double) tv.tv_sec) + (double) (... 阅读全文
该文被密码保护。 阅读全文
摘要:
shared_ptr tmp2(new int(10)) ; int * test=tmp2.get(); std::cout die_gen(generator,1, 6)然后就可以不停的读取die_gen, 比如std::cout #include int main(){boost... 阅读全文
摘要:
在调用protobuf的ParseFromString(str)方法时,默认情况下,如果str的长度>64MB,会返回失败。这里给出了解释,主要是出于安全因素的考虑。可以通过SetTotalBytesLimit方法去除这个限制:// ::google::protobuf::Message req;:... 阅读全文
摘要:
make -dshould give you more than enough information to debug your makefile.Be warned: it will take some time and effort to analyze the output but load... 阅读全文
摘要:
#define min(x,y) (((x) #include #include #include #include //extern "C"//{ #include //}using namespace std;int main(){ const enum CBLAS_ORDER Ord... 阅读全文
摘要:
多个cu文件nvcc -cubin -m64 -lcudadevrt -lcublas_device -gencode arch=compute_35,code=sm_35 -o test.cubin -c test.cu -dlinkYou can also do that in two step... 阅读全文
摘要:
scalar add#include #include #include __global__ void add(int *a, int *b,int *c){c[blockIdx.x]=a[blockIdx.x]+b[blockIdx.x];}int main(void) { // H ha... 阅读全文
摘要:
http://blog.csdn.net/yutianzuijin/article/details/8147912分类:编程语言2012-11-05 10:552521人阅读评论(0)收藏举报cudaGPU 最近初试cuda编程,作为一个新手,遇到了各种各样的问题,然后花费了大量时间解决这些匪夷所... 阅读全文
摘要:
#include #include using namespace std;int sum=0;void * add(void *);pthread_mutex_t mut;int main(){ pthread_t thread[10]; int num; long count... 阅读全文
摘要:
# See README.txt..PHONY: all cpp java python cleanall: cpp #java pythoncpp: add_person_cpp list_people_cpp temp_cppjava: add_person_java lis... 阅读全文
摘要:
加法还可用友元函数,两个参数的方式实现。#include #include #include #include using namespace std;class Matrix{public: Matrix(){memset(this->_mat,0,sizeof(this->_mat));}... 阅读全文
摘要:
#include #include #include #include using namespace std;templateelemtypea mymax(const vector &a){ return *max_element( a.begin(), a.end() );}te... 阅读全文
摘要:
http://wenku.baidu.com/link?url=saMJ3WpR_Lili2oflaIK-xK7wkQhtP2I-FdEX6I_XjmNxl7m0Z8SYHJtfqyXYkSmok8hkOugcFeO2_CUyNKzsUc8sD-ycpEFIqxOXMoJ1qGconst 可以放在头... 阅读全文
摘要:
importgc gc.disable() http://blog.csdn.net/aixiaohei/article/details/6446869 阅读全文
摘要:
https://grapeot.me/easy-and-cheap-cluster-building-on-aws.htmlThu 17 July 2014, byYan Wang|2 CommentsLinuxParallelgithubImageWhy?It often requires a l... 阅读全文