摘要://///////////////////////////////////author : zhxfl//date : 2013.8.29//email : 291221622@qq.com//Adress :http://www.cnblogs.com/zhxfl/p/3288510.html///////////////////////////////////在看这个之前,你先要了解onEnter , onExit 和 构造函数,析构函数在调用顺序上面的区别总的来说,顺序如下构造函数{}onEnter{}onExit{}析构函数{}讲这个之前需要讲一些在实践中遇到的问题。前段时间在项目中f
阅读全文
摘要:1、JString char*互相转化char* JstringToChar(JNIEnv* env, jstring jstr){ char* rtn = NULL; jclass clsstring = env->FindClass("java/lang/String"); jstring strencode = env->NewStringUTF("utf-8"); jmethodID mid = env->GetMethodID(clsstring, "getBytes", "(Ljava/lang
阅读全文
摘要:Created on 2013-8-7URL : http://blog.sina.com.cn/s/blog_a502f1a30101mfj4.html@author: zhxfl转载请说明出处一 从视频中提取帧并且保存图片#include #include #include "opencv2/highgui/highgui.hpp"using namespace std;using namespace cv;bool VedioToImage(char *from, char *to){ CvCapture *capture = cvCreateFileCapture(
阅读全文
摘要:Created on 2013-8-5URL :http://blog.sina.com.cn/s/blog_a502f1a30101mjch.html@author: zhxfl转载请说明出处 1 #include 2 #include 3 #include 4 __global__ void matrixMulCUDA(int *A,int *B,int * C, 5 dim3 dimsA,dim3 dimsB, dim3 dimsC) 6 { 7 int i = blockIdx.x; 8 int j = threadIdx.x; ...
阅读全文
摘要:Created on 2013-8-5URL : http://blog.sina.com.cn/s/blog_a502f1a30101mi6t.html@author: zhxfl转载请说明出处 1 cudaDeviceProp prop; 2 3 int count; 4 ( cudaGetDeviceCount( &count ) ); 5 for (int i=0; i>()2)正常:function >()3)崩溃:function >()4)正常:function >()5)崩溃:function >()其中第一个的崩溃让人无法理解,其他都符合
阅读全文