diff --git a/LuckyProfiler/LuckyProfiler.sln b/LuckyProfiler/LuckyProfiler.sln new file mode 100644 index 0000000..f46d3fc --- /dev/null +++ b/LuckyProfiler/LuckyProfiler.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.1927 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LuckyProfiler", "LuckyProfiler\LuckyProfiler.vcxproj", "{646A57BE-C795-4CCC-948D-29E173111E26}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {646A57BE-C795-4CCC-948D-29E173111E26}.Debug|x64.ActiveCfg = Debug|x64 + {646A57BE-C795-4CCC-948D-29E173111E26}.Debug|x64.Build.0 = Debug|x64 + {646A57BE-C795-4CCC-948D-29E173111E26}.Debug|x86.ActiveCfg = Debug|Win32 + {646A57BE-C795-4CCC-948D-29E173111E26}.Debug|x86.Build.0 = Debug|Win32 + {646A57BE-C795-4CCC-948D-29E173111E26}.Release|x64.ActiveCfg = Release|x64 + {646A57BE-C795-4CCC-948D-29E173111E26}.Release|x64.Build.0 = Release|x64 + {646A57BE-C795-4CCC-948D-29E173111E26}.Release|x86.ActiveCfg = Release|Win32 + {646A57BE-C795-4CCC-948D-29E173111E26}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {81ECE81C-B8D8-431E-BB15-E4F4841B9CC0} + EndGlobalSection +EndGlobal diff --git a/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj b/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj new file mode 100644 index 0000000..6e8ce76 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj @@ -0,0 +1,183 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {646A57BE-C795-4CCC-948D-29E173111E26} + Win32Proj + LuckyProfiler + 10.0.19041.0 + + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + DynamicLibrary + true + v141 + Unicode + + + DynamicLibrary + false + v141 + true + Unicode + + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include;C:\Program Files\Java\jdk1.8.0_202\include;C:\Program Files\Java\jdk1.8.0_202\include\win32;D:\a_XiaoYinghao\research material\LuckyProfile_\LuckyProfile_\src;$(IncludePath) + C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib\x64;$(LibraryPath) + + + + Level3 + Disabled + true + WIN32;_DEBUG;LUCKYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + false + + + + + Level3 + Disabled + true + _DEBUG;LUCKYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + false + + + + + Level3 + MaxSpeed + true + true + true + WIN32;NDEBUG;LUCKYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + false + + + + + Level3 + MaxSpeed + true + true + true + NDEBUG;LUCKYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + false + cudart_static.lib; +kernel32.lib; +user32.lib; +gdi32.lib +;winspool.lib +;comdlg32.lib +;advapi32.lib +;shell32.lib; +ole32.lib; +oleaut32.lib; +uuid.lib; +odbc32.lib; +odbccp32.lib;%(AdditionalDependencies) + + + + + + + + + + Document + + + + + + + + + + + \ No newline at end of file diff --git a/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj.filters b/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj.filters new file mode 100644 index 0000000..89b2557 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + 头文件 + + + 头文件 + + + 头文件 + + + + + 源文件 + + + 源文件 + + + + + 源文件 + + + \ No newline at end of file diff --git a/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj.user b/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj.user new file mode 100644 index 0000000..6e2aec7 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/LuckyProfiler.vcxproj.user @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/LuckyProfiler/LuckyProfiler/LuckyProfiler_.cpp b/LuckyProfiler/LuckyProfiler/LuckyProfiler_.cpp new file mode 100644 index 0000000..bde7dfe --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/LuckyProfiler_.cpp @@ -0,0 +1,90 @@ +#include "cuda.h" +#include +#include "kernel.h" +#include "skeleton.h" + +int skelNum; +int PreProjectionNum; + +JNIEXPORT void JNICALL Java_LuckyProfiler_1_computeAngs(JNIEnv* env, jobject, jintArray locx, jintArray locy, jintArray SkelImwithout1, jint SkelNum, jint imgH, jint imgW) { + jint* Locx = env->GetIntArrayElements(locx, NULL); + jint* Locy = env->GetIntArrayElements(locy, NULL); + jint* skel = env->GetIntArrayElements(SkelImwithout1, NULL); + skelNum = SkelNum; + + getAngs(Locx, Locy, skel, SkelNum, imgH, imgW); + + env->ReleaseIntArrayElements(SkelImwithout1, skel, 0); + env->ReleaseIntArrayElements(locx, Locx, 0); + env->ReleaseIntArrayElements(locy, Locy, 0); +} + +JNIEXPORT JNIEXPORT jintArray JNICALL Java_LuckyProfiler_1_getSkeleton(JNIEnv *env, jobject, jintArray JSkeletontemp, jint imgH, jint imgW) { + jint* Skeletontemp = env->GetIntArrayElements(JSkeletontemp, NULL); + + long* skg = compute_skeleton_gradient(Skeletontemp, imgH, imgW); + + //int thres = 30; + + //bool* skr = (bool*)calloc(0, sizeof(bool) * imgH * imgW); + //int idx = 0; + //for (int j = 0; j < imgW; j++) { + // for (int i = 0; i < imgH; i++) { + // if (skg[idx] > thres) { + // skr[i * imgW + j] = 1; + // } + // idx++; + // } + //} + + //bool *BoolSkelImwithout1 = algbwmorph(skr, imgH, imgW); + //short *SkelImwithout1 = (short*)malloc(sizeof(short) * imgH * imgW); + //for (int i = 0; i < imgH * imgW; i++) SkelImwithout1[i] = BoolSkelImwithout1[i]; + + jintArray result = NULL; + result = env->NewIntArray(imgH * imgW); + env->SetIntArrayRegion(result, 0, imgH * imgW, skg); + + env->ReleaseIntArrayElements(JSkeletontemp, Skeletontemp, 0); + + free(skg); + return result; +} + +JNIEXPORT void JNICALL Java_LuckyProfiler_1_computeRCadiAndRelatedLocIndex +(JNIEnv* env, jobject, jintArray JSkelImwithout1, jintArray JSingleResult, jintArray Jrr, jint JPreProjectionNum, jint imH, jint imgW) { + PreProjectionNum = JPreProjectionNum; + jint* SkelImwithout1 = env->GetIntArrayElements(JSkelImwithout1, NULL); + jint* SingleResult = env->GetIntArrayElements(JSingleResult, NULL); + jint* rr = env->GetIntArrayElements(Jrr, NULL); + + getRCadiAndRelatedLocIndex(SkelImwithout1, SingleResult, rr, PreProjectionNum, imH, imgW, skelNum); + + env->ReleaseIntArrayElements(JSkelImwithout1, SkelImwithout1, 0); + env->ReleaseIntArrayElements(JSingleResult, SingleResult, 0); + env->ReleaseIntArrayElements(Jrr, rr, 0); +} + +JNIEXPORT jintArray JNICALL Java_LuckyProfiler_1_getRCadi(JNIEnv* env, jobject) { + jintArray result = NULL; + result = env->NewIntArray(skelNum * PreProjectionNum); + env->SetIntArrayRegion(result, 0, skelNum * PreProjectionNum, RCadi); + free(RCadi); + return result; +} + +JNIEXPORT jintArray JNICALL Java_LuckyProfiler_1_getRelatedLocIndex(JNIEnv* env, jobject) { + jintArray result = NULL; + result = env->NewIntArray(skelNum * PreProjectionNum); + env->SetIntArrayRegion(result, 0, skelNum * PreProjectionNum, RelatedLocIndex); + free(RelatedLocIndex); + return result; +} + +JNIEXPORT jdoubleArray JNICALL Java_LuckyProfiler_1_getAngs(JNIEnv* env, jobject) { + jdoubleArray result = NULL; + result = env->NewDoubleArray(skelNum); + env->SetDoubleArrayRegion(result, 0, skelNum, angs); + free(angs); + return result; +} \ No newline at end of file diff --git a/LuckyProfiler/LuckyProfiler/LuckyProfiler_.h b/LuckyProfiler/LuckyProfiler/LuckyProfiler_.h new file mode 100644 index 0000000..37182cc --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/LuckyProfiler_.h @@ -0,0 +1,61 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class LuckyProfiler_ */ + +#ifndef _Included_LuckyProfiler_ +#define _Included_LuckyProfiler_ +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: LuckyProfiler_ + * Method: computeAngs + * Signature: ([I[I[IIII)V + */ +JNIEXPORT void JNICALL Java_LuckyProfiler_1_computeAngs + (JNIEnv *, jobject, jintArray, jintArray, jintArray, jint, jint, jint); + +/* + * Class: LuckyProfiler_ + * Method: getSkeleton + * Signature: ([III)[I + */ +JNIEXPORT jintArray JNICALL Java_LuckyProfiler_1_getSkeleton + (JNIEnv *, jobject, jintArray, jint, jint); + +/* + * Class: LuckyProfiler_ + * Method: getAngs + * Signature: ()[D + */ +JNIEXPORT jdoubleArray JNICALL Java_LuckyProfiler_1_getAngs + (JNIEnv *, jobject); + +/* + * Class: LuckyProfiler_ + * Method: computeRCadiAndRelatedLocIndex + * Signature: ([I[I[IIII[I)V + */ +JNIEXPORT void JNICALL Java_LuckyProfiler_1_computeRCadiAndRelatedLocIndex + (JNIEnv *, jobject, jintArray, jintArray, jintArray, jint, jint, jint, jintArray); + +/* + * Class: LuckyProfiler_ + * Method: getRCadi + * Signature: ()[I + */ +JNIEXPORT jintArray JNICALL Java_LuckyProfiler_1_getRCadi + (JNIEnv *, jobject); + +/* + * Class: LuckyProfiler_ + * Method: getRelatedLocIndex + * Signature: ()[I + */ +JNIEXPORT jintArray JNICALL Java_LuckyProfiler_1_getRelatedLocIndex + (JNIEnv *, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/LuckyProfiler/LuckyProfiler/kernel.cu b/LuckyProfiler/LuckyProfiler/kernel.cu new file mode 100644 index 0000000..4a2eece --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/kernel.cu @@ -0,0 +1,291 @@ +#include "cuda_runtime.h" +#include "device_launch_parameters.h" +#include +#include +#include "kernel.h" + +#define PI 3.14159265358979323846 + +double* angs; +long* RelatedLocIndex,* RCadi; + +//__device__ bool lutskel[][512] = { +// {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, +//}; + +__global__ void adjangle1(double* angs, long* Locx, long* Locy, long* SkelImwithout1, int nx, int SkelNum, int imgW) { + int x = blockDim.x * blockIdx.x + threadIdx.x; + int y = blockDim.y * blockIdx.y + threadIdx.y; + + int tid = y * nx + x; + if (tid < SkelNum) { + int G1 = SkelImwithout1[Locx[tid] * imgW + Locy[tid] + 1]; + int G2 = SkelImwithout1[(Locx[tid] - 1) * imgW + Locy[tid] + 1]; + int G3 = SkelImwithout1[(Locx[tid] - 1) * imgW + Locy[tid]]; + int G4 = SkelImwithout1[(Locx[tid] - 1) * imgW + Locy[tid] - 1]; + int G5 = SkelImwithout1[Locx[tid] * imgW + Locy[tid] - 1]; + int G6 = SkelImwithout1[(Locx[tid] + 1) * imgW + Locy[tid] - 1]; + int G7 = SkelImwithout1[(Locx[tid] + 1) * imgW + Locy[tid]]; + int G8 = SkelImwithout1[(Locx[tid] + 1) * imgW + Locy[tid] + 1]; + int G9 = SkelImwithout1[(Locx[tid] + 1) * imgW + Locy[tid] + 2]; + int G10 = SkelImwithout1[Locx[tid] * imgW + Locy[tid] + 2]; + int G11 = SkelImwithout1[(Locx[tid] - 1) * imgW + Locy[tid] + 2]; + int G12 = SkelImwithout1[(Locx[tid] - 2) * imgW + Locy[tid] + 2]; + int G13 = SkelImwithout1[(Locx[tid] - 2) * imgW + Locy[tid] + 1]; + int G14 = SkelImwithout1[(Locx[tid] - 2) * imgW + Locy[tid]]; + int G15 = SkelImwithout1[(Locx[tid] - 2) * imgW + Locy[tid] - 1]; + int G16 = SkelImwithout1[(Locx[tid] - 2) * imgW + Locy[tid] - 2]; + int G17 = SkelImwithout1[(Locx[tid] - 1) * imgW + Locy[tid] - 2]; + int G18 = SkelImwithout1[Locx[tid] * imgW + Locy[tid] - 2]; + int G19 = SkelImwithout1[(Locx[tid] + 1) * imgW + Locy[tid] - 2]; + int G20 = SkelImwithout1[(Locx[tid] + 2) * imgW + Locy[tid] - 2]; + int G21 = SkelImwithout1[(Locx[tid] + 2) * imgW + Locy[tid] - 1]; + int G22 = SkelImwithout1[(Locx[tid] + 2) * imgW + Locy[tid]]; + int G23 = SkelImwithout1[(Locx[tid] + 2) * imgW + Locy[tid] + 1]; + int G24 = SkelImwithout1[(Locx[tid] + 2) * imgW + Locy[tid] + 2]; + + int G[5][5] = { {G16, G15, G14, G13, G12}, {G17, G4, G3, G2, G11}, {G18, G5, 1, G1, G10}, {G19, G6, G7, G8, G9}, {G20, G21, G22, G23, G24} }; + + int N = 0; + int temp1 = 0; + double meanx = 0; + double meany = 0; + int temp3 = 0; + int cnt = 0; + +#pragma unrolling + for (int i = 1; i <= 5; i++) { +#pragma unrolling + for (int j = 1; j <= 5; j++) { + if (G[i - 1][j - 1] == 1) { + N++; + temp1 += i * j; + meanx += i; + meany += j; + temp3 += i * i; + cnt++; + } + } + + } + + meanx /= cnt; + meany /= cnt; + + double temp2 = N * meanx * meany; + double temp4 = N * meanx * meanx; + + double k = (temp1 - temp2) / (temp3 - temp4); + + double ang; + + if (isnan(k)) { + ang = PI / 2; + } + else { + ang = atan(k); + } + + angs[tid] = ang; + } +} + +__global__ void PreR(long* RCadi, long* RelatedLocIndex, int* SkelImwithout1, int* SingleResult, int* rr, int PreProjectionNum, int imgH, int imgW, int nx, int skelNum) { + int x = blockDim.x * blockIdx.x + threadIdx.x; + int y = blockDim.y * blockIdx.y + threadIdx.y; + + int tid = y * nx + x; + if (tid < skelNum) { + int* XLoc = (int*)malloc(sizeof(int) * (PreProjectionNum + 7)); + int* YLoc = (int*)malloc(sizeof(int) * (PreProjectionNum + 7)); + XLoc[0] = SingleResult[tid * 2]; + YLoc[0] = SingleResult[tid * 2 + 1]; + + int size = 1; + + if (XLoc[0] - 1 >= 0 && YLoc[0] - 1 >= 0 && XLoc[0] + 1 < imgH && YLoc[0] + 1 < imgW) { +#pragma unrolling + for (int k = 0; k < 1000; k++) { + int presize = size; + for (int K = 0; K < presize; K++) { + int x = XLoc[K]; + int y = YLoc[K]; + int L[8][2] = { {x - 1, y - 1}, {x - 1, y}, {x - 1, y + 1}, {x, y - 1}, {x, y + 1}, {x + 1, y - 1}, {x + 1, y}, {x + 1, y + 1} }; +#pragma unrolling + for (int i = 0; i < 8; i++) { + bool* jud = (bool*)malloc(sizeof(bool) * size); + for (int j = 0; j < size; j++) { + jud[j] = (XLoc[j] == L[i][0]) && (YLoc[j] == L[i][1]); + } + + if (L[i][0] >= 0 && L[i][0] < imgH && L[i][1] >= 0 && L[i][1] < imgW) { + if (SkelImwithout1[L[i][0] * imgW + L[i][1]] == 1) { + bool flag = false; + for (int t = 0; t < size; t++) { + flag |= jud[t]; + } + + if (!flag) { + XLoc[size] = L[i][0]; + YLoc[size] = L[i][1]; + size++; + } + } + } + free(jud); + } + } + + if (size >= PreProjectionNum) { + for (int j = 0; j < PreProjectionNum; j++) { + for (int i1 = 0; i1 < skelNum; i1++) { + if (SingleResult[i1 * 2] == XLoc[j] && SingleResult[i1 * 2 + 1] == YLoc[j]) { + RelatedLocIndex[tid * PreProjectionNum + j] = i1; + RCadi[tid * PreProjectionNum + j] = rr[i1]; + break; + } + } + } + break; + } + } + } + free(XLoc); + free(YLoc); + } +} + +//__global__ void parbwlookup(int* bw, int i, int imgH, int imgW) { +// int x = blockDim.x * blockIdx.x + threadIdx.x; +// int y = blockDim.y * blockIdx.y + threadIdx.y; +// +// int tid = y * nx + x; +// if (tid < imgH * imgW) { +// +// } +//} + +void getAngs(long* locx, long* locy, long* SkelImwithout1, int SkelNum, int imgH, int imgW) { + int dev = 0; + cudaSetDevice(dev); + + double* d_angs; + long* d_locx, *d_locy, *d_SkelImwithout1; + + angs = (double*)malloc(sizeof(double) * SkelNum); + + cudaMalloc((double**)&d_angs, sizeof(double) * SkelNum); + cudaMalloc((long**)&d_locx, sizeof(long) * SkelNum); + cudaMalloc((long**)&d_locy, sizeof(long) * SkelNum); + cudaMalloc((long**)&d_SkelImwithout1, sizeof(long) * imgH * imgW); + + cudaMemcpy(d_locx, locx, sizeof(long) * SkelNum, cudaMemcpyHostToDevice);// + cudaMemcpy(d_locy, locy, sizeof(long) * SkelNum, cudaMemcpyHostToDevice); + cudaMemcpy(d_SkelImwithout1, SkelImwithout1, sizeof(long) * imgH * imgW, cudaMemcpyHostToDevice); + + int nx = (int)ceil(sqrt(SkelNum)); + int ny = (int)ceil(sqrt(SkelNum)); + + dim3 block(32, 32);//the size of a block must not bigger than 1024 + dim3 grid((nx + block.x - 1) / block.x, (ny + block.y - 1) / block.y); + + adjangle1 << > > (d_angs, d_locx, d_locy, d_SkelImwithout1, nx, SkelNum, imgW); + + cudaDeviceSynchronize(); + + cudaMemcpy(angs, d_angs, sizeof(double) * SkelNum, cudaMemcpyDeviceToHost); + + cudaError_t err = cudaGetLastError(); + if (err != cudaSuccess) { + fprintf(stderr, "Got error %s at %s:%d\n", cudaGetErrorString(err), \ + __FILE__, __LINE__); \ + // Possibly: exit(-1) if program cannot continue.... + } + + cudaFree(d_angs); + cudaFree(d_locx); + cudaFree(d_locy); + cudaFree(d_SkelImwithout1); + + cudaDeviceReset(); +} + +void getRCadiAndRelatedLocIndex(long* SkelImwithout1, long* SingleResult, long* rr, int PreProjectionNum, int imgH, int imgW, int skelNum) { + int dev = 0; + cudaSetDevice(dev); + + long* d_RCadi, * d_RelatedLocIndex; + int* d_SingleResult, *d_rr,*d_SkelImwithout1; + + RCadi = (long*)malloc(sizeof(long) * (skelNum * PreProjectionNum)); + RelatedLocIndex = (long*)malloc(sizeof(long) * (skelNum * PreProjectionNum)); + memset(RCadi, 0, sizeof(long) * (skelNum * PreProjectionNum)); + memset(RelatedLocIndex, 0, sizeof(long) * (skelNum * PreProjectionNum)); + + cudaMalloc((long**)&d_RCadi, sizeof(long) * (skelNum * PreProjectionNum)); + cudaMalloc((long**)&d_RelatedLocIndex, sizeof(long) * (skelNum * PreProjectionNum)); + cudaMalloc((int**)&d_SkelImwithout1, sizeof(int) * imgH * imgW); + cudaMalloc((int**)&d_SingleResult, sizeof(int) * 2 * skelNum); + cudaMalloc((int**)&d_rr, sizeof(int) * skelNum); + + cudaMemcpy(d_RCadi, RCadi, sizeof(long) * (skelNum * PreProjectionNum), cudaMemcpyHostToDevice);// + cudaMemcpy(d_RelatedLocIndex, RelatedLocIndex, sizeof(long) * (skelNum * PreProjectionNum), cudaMemcpyHostToDevice); + cudaMemcpy(d_SkelImwithout1, SkelImwithout1, sizeof(int) * imgH * imgW, cudaMemcpyHostToDevice); + cudaMemcpy(d_SingleResult, SingleResult, sizeof(int) * 2 * skelNum, cudaMemcpyHostToDevice); + cudaMemcpy(d_rr, rr, sizeof(int) * skelNum, cudaMemcpyHostToDevice); + + cudaDeviceSetLimit(cudaLimitMallocHeapSize, 512 * 1024 * 1024); + + int nx = (int)ceil(sqrt(skelNum)); + int ny = (int)ceil(sqrt(skelNum)); + + dim3 block(32, 32);//the size of a block must not bigger than 1024 + dim3 grid((nx + block.x - 1) / block.x, (ny + block.y - 1) / block.y); + + PreR << > > (d_RCadi, d_RelatedLocIndex, d_SkelImwithout1, d_SingleResult, d_rr, PreProjectionNum, imgH, imgW, nx, skelNum); + + cudaDeviceSynchronize(); + + cudaError_t err = cudaGetLastError(); + if (err != cudaSuccess) { + fprintf(stderr, "Got error %s at %s:%d\n", cudaGetErrorString(err), \ + __FILE__, __LINE__); \ + // Possibly: exit(-1) if program cannot continue.... + } + + cudaMemcpy(RCadi, d_RCadi, sizeof(long) * (skelNum * PreProjectionNum), cudaMemcpyDeviceToHost); + cudaMemcpy(RelatedLocIndex, d_RelatedLocIndex, sizeof(long) * (skelNum * PreProjectionNum), cudaMemcpyDeviceToHost); + + cudaFree(d_RCadi); + cudaFree(d_RelatedLocIndex); + cudaFree(d_SkelImwithout1); + cudaFree(d_SingleResult); + cudaFree(d_rr); + + cudaDeviceReset(); +} + +//inline void bwlookup(int* bw, int i, int imgH, int imgW) { +// int* d_bw; +// cudaMalloc((int**)&d_bw, sizeof(int) * imgH * imgW); +// cudaMemcpy(d_bw, bw, sizeof(int) * imgH * imgW, cudaMemcpyHostToDevice); +// +// int nx = imgH; +// int ny = imgW; +// +// dim3 block(32, 32);//the size of a block must not bigger than 1024 +// dim3 grid((nx + block.x - 1) / block.x, (ny + block.y - 1) / block.y); +// +// //kernel +// +// cudaDeviceSynchronize(); +// cudaMemcpy(bw, d_bw, sizeof(int) * imgH * imgW, cudaMemcpyDeviceToHost); +// cudaFree(d_bw); +//} diff --git a/LuckyProfiler/LuckyProfiler/kernel.h b/LuckyProfiler/LuckyProfiler/kernel.h new file mode 100644 index 0000000..bed93b7 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/kernel.h @@ -0,0 +1,8 @@ +#pragma once + +extern double* angs; +extern long* RelatedLocIndex,* RCadi; + +void getAngs(long* locx, long* locy, long* SkelImwithout1, int SkelNum, int imgH, int imgW); +void getRCadiAndRelatedLocIndex(long* SkelImwithout1, long* SingleResult, long* rr, int PreProjectionNum, int imH, int imgW, int skelNum); +//void bwlookup(int* bw, int i, int imgH, int imgW); \ No newline at end of file diff --git a/LuckyProfiler/LuckyProfiler/skeleton.cpp b/LuckyProfiler/LuckyProfiler/skeleton.cpp new file mode 100644 index 0000000..98ed612 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/skeleton.cpp @@ -0,0 +1,500 @@ +//*************************************************************************** +// +// Matlab C routine file: skelgrad.cpp +// +// +// Input: +// img: binary silhouette image +// +// Output: +// skg: skeleton gradient transform +// skr: skeleton radius +// +//*************************************************************************** + +//#include "mex.h" +#include +#include +#include +#include +#include +#include "kernel.h" + +//*************************************************************************** + +#define SQR(x) (x)*(x) +#define MIN(x,y) (((x) < (y)) ? (x):(y)) +#define MAX(x,y) (((x) > (y)) ? (x):(y)) +#define ABS(x) (((x) < 0) ? (-(x)):(x)) +#define cutBounds(i) (((i)>0) ? (((i) 8) { + int pivot; + int pivid; + int lo = 1; // everything to the left of lo is smaller than pivot + int hi = n - 1; // everything to the right of hi is larger than the pivot + int tmp; + + srand(time(0)); + pivid = rand() % n; + tmp = arr[0]; + arr[0] = arr[pivid]; + arr[pivid] = tmp; + pivot = arr[0]; // store value for convenience + while (hi != lo - 1) { // keep going until everything has been categorized. + if (arr[lo] < pivot) { + // smaller than pivot, so stays here + lo++; + } + else { + // larger than pivot, so moves to the other end + tmp = arr[hi]; + arr[hi] = arr[lo]; + arr[lo] = tmp; + hi--; + } + } + tmp = arr[hi]; + arr[hi] = arr[0]; + arr[0] = tmp; + quicksort(arr, hi); // sort smaller side of array + quicksort(arr + lo, n - lo); // sort bigger side of array + } + else { + // use insertion sort + int i, j; + int tmp; + + for (i = 0; i < n; i++) { + for (j = i; (j > 0) && (arr[j] < arr[j - 1]); j--) { + tmp = arr[j]; + arr[j] = arr[j - 1]; + arr[j - 1] = tmp; + } + } + } +} +// end of quicksort() + +//**************************************************************************** +// +// joint_neighborhood() returns a byte value representing the immediate +// neighborhood of the specified joint in bit form, clockwise from NW. +// +// R/O arr: binary pixel array +// R/O i,j: coordinates of point +// R/O nrow, ncol: dimensions of binary image +// Returns: bit representation of 8-neighbors +// + +template +inline int joint_neighborhood(T *arr, int i, int j, int nrow, int ncol) { + int p = i + j * nrow; + int condition = 8 * (i <= 0) + 4 * (j <= 0) + 2 * (i >= nrow) + (j >= ncol); + + switch (condition) { + case 0: // all points valid + return (arr[p - nrow - 1] ? 1 : 0) + (arr[p - 1] ? 2 : 0) + (arr[p] ? 4 : 0) + (arr[p - nrow] ? 8 : 0); + case 1: // right side not valid + return (arr[p - nrow - 1] ? 1 : 0) + (arr[p - nrow] ? 8 : 0); + case 2: // bottom not valid + return (arr[p - nrow - 1] ? 1 : 0) + (arr[p - 1] ? 2 : 0); + case 3: // bottom and right not valid + return (arr[p - nrow - 1] ? 1 : 0); + case 4: // left side not valid + return (arr[p - 1] ? 2 : 0) + (arr[p] ? 4 : 0); + case 5: // left and right sides not valid + return 0; + case 6: // left and bottom sides not valid + return (arr[p - 1] ? 2 : 0); + case 7: // left, bottom, and right sides not valid + return 0; + case 8: // top side not valid + return (arr[p] ? 4 : 0) + (arr[p - nrow] ? 8 : 0); + case 9: // top and right not valid + return (arr[p - nrow] ? 8 : 0); + case 10: // top and bottom not valid + case 11: // top, bottom and right not valid + return 0; + case 12: // top and left not valid + return (arr[p] ? 4 : 0); + case 13: // top, left and right sides not valid + case 14: // top, left and bottom sides not valid + case 15: // no sides valid + return 0; + default: + //mexErrMsgTxt("Impossible condition.\n"); + return -1; + } +} + +//*************************************************************************** +// +// compute_skeleton_gradient() does the main computation. +// Written as a template to support multiple image types. +// +// R/O img: the image +// R/O nrow, ncol: image dimensions +// R/O nlhs: number of arguments to return +// W/O plhs: array of return arguments (0 = gradient, 1 = radius) +// + +long *compute_skeleton_gradient(long *img, int nrow, int ncol) { + int i, j, ei, ej, inear; + int ijunc, iedge, iseq, lastdir, mind, minjunc, pspan; + int jnrow = nrow + 1, jncol = ncol + 1; + int njunc, jhood, nedge, nnear; + int mindNE, mindNW, mindSE, mindSW; + int *jx, *jy, *edgej, *seqj, *edgelen; + int *dNE, *dNW, *dSE, *dSW, *nearj; + bool *seenj; + long *skg; + + // count junctions + njunc = 0; + for (j = 0; j < jncol; j++) { + for (i = 0; i < jnrow; i++) { + jhood = joint_neighborhood(img, i, j, nrow, ncol); + if ((jhood != 0) && (jhood != 15)) { + njunc++; + } + } + } + + // allocate scratch space + jx = (int*)malloc(njunc * sizeof(int)); + jy = (int*)malloc(njunc * sizeof(int)); + seqj = (int*)malloc(njunc * sizeof(int)); + edgej = (int*)malloc(njunc * sizeof(int)); + seenj = (bool*)malloc(jnrow*jncol * sizeof(bool)); + dNE = (int*)malloc(njunc * sizeof(int)); + dNW = (int*)malloc(njunc * sizeof(int)); + dSE = (int*)malloc(njunc * sizeof(int)); + dSW = (int*)malloc(njunc * sizeof(int)); + nearj = (int*)malloc(njunc * sizeof(int)); + for (i = 0; i < jnrow*jncol; i++) { + seenj[i] = false; + } + //mexPrintf("Space allocated\n"); + + // register junctions + ijunc = 0; + nedge = 0; + for (j = 0; j < jncol; j++) { + for (i = 0; i < jnrow; i++) { + jhood = joint_neighborhood(img, i, j, nrow, ncol); + if ((jhood != 0) && (jhood != 15) && (jhood != 5) && (jhood != 10) && !seenj[i + j * jnrow]) { + // found new edge; traverse it + iseq = 0; + ei = i; + ej = j; + lastdir = North; + //mexPrintf("Beginning traverse.\n"); + while (!seenj[ei + ej * jnrow] || (jhood == 5) || (jhood == 10)) { + //mexPrintf("Traversing at (%d,%d).\n",ei,ej); + + if (!seenj[ei + ej * jnrow]) { + // register this junction + jx[ijunc] = ej; + jy[ijunc] = ei; + edgej[ijunc] = nedge; + seqj[ijunc] = iseq; + iseq++; + ijunc++; + seenj[ei + ej * jnrow] = true; + } + + // traverse clockwise + switch (dircode[jhood]) { + case North: + ei--; + lastdir = North; + break; + case South: + ei++; + lastdir = South; + break; + case East: + ej++; + lastdir = East; + break; + case West: + ej--; + lastdir = West; + break; + case None: + switch (lastdir) { + case East: // go North + ei--; + lastdir = North; + break; + case West: // go South + ei++; + lastdir = South; + break; + case South: // go East + ej++; + lastdir = East; + break; + case North: // go West + ej--; + lastdir = West; + break; + } + break; + } + jhood = joint_neighborhood(img, ei, ej, nrow, ncol); + } + nedge++; + } + } + } + //mexPrintf("Junctions counted.\n"); + + // count perimeter along each edge + edgelen = (int*)malloc(nedge * sizeof(int)); + for (iedge = 0; iedge < nedge; iedge++) { + edgelen[iedge] = 0; + } + for (ijunc = 0; ijunc < njunc; ijunc++) { + edgelen[edgej[ijunc]]++; + } + + time_t t5 = clock(); + + // create output + skg = (long*)malloc(sizeof(long) * (nrow * ncol)); + for (j = 0; j < ncol; j++) { + for (i = 0; i < nrow; i++) { + if (img[i + j * nrow]) { + // compute distance to all junction points + // keeping track of minimum + mind = mindNE = mindNW = mindSE = mindSW = SQR(jnrow + jncol); + minjunc = -1; + for (ijunc = 0; ijunc < njunc; ijunc++) { + dNE[ijunc] = SQR(i - jy[ijunc]) + SQR(j - jx[ijunc]); + dNW[ijunc] = SQR(i - jy[ijunc]) + SQR(j + 1 - jx[ijunc]); + dSE[ijunc] = SQR(i + 1 - jy[ijunc]) + SQR(j - jx[ijunc]); + dSW[ijunc] = SQR(i + 1 - jy[ijunc]) + SQR(j + 1 - jx[ijunc]); + if (dNE[ijunc] < mindNE) { + mindNE = dNE[ijunc]; + if (dNE[ijunc] < mind) { + mind = dNE[ijunc]; + minjunc = ijunc; + } + } + if (dNW[ijunc] < mindNW) { + mindNW = dNW[ijunc]; + if (dNW[ijunc] < mind) { + mind = dNW[ijunc]; + minjunc = ijunc; + } + } + if (dSE[ijunc] < mindSE) { + mindSE = dSE[ijunc]; + if (dSE[ijunc] < mind) { + mind = dSE[ijunc]; + minjunc = ijunc; + } + } + if (dSW[ijunc] < mindSW) { + mindSW = dSW[ijunc]; + if (dSW[ijunc] < mind) { + mind = dSW[ijunc]; + minjunc = ijunc; + } + } + } + + // find all other junction points at minimal distance + nnear = pspan = 0; + for (ijunc = 0; ijunc < njunc; ijunc++) { + if ((dNE[ijunc] <= MIN(mindNE, dNE[minjunc])) + || (dNW[ijunc] <= MIN(mindNW, dNW[minjunc])) + || (dSE[ijunc] <= MIN(mindSE, dSE[minjunc])) + || (dSW[ijunc] <= MIN(mindSW, dSW[minjunc]))) { + // we have a candidate junction + if (edgej[ijunc] != edgej[minjunc]) { + pspan = -1; + break; + } + else { + nearj[nnear] = seqj[ijunc]; + nnear++; + } + } + } + + if (pspan >= 0) { + // compute perimeter span -- find largest gap and take remainder + quicksort(nearj, nnear); + //mexPrintf("Positions: "); + //for (inear = 0; inear < nnear; inear++) { + // mexPrintf("%d ",nearj[inear]); + //} + pspan = nearj[0] - nearj[nnear - 1] + edgelen[edgej[minjunc]]; + //mexPrintf("\nDifferences: %d ",pspan); + for (inear = 1; inear < nnear; inear++) { + if (pspan < nearj[inear] - nearj[inear - 1]) { + pspan = nearj[inear] - nearj[inear - 1]; + } + //mexPrintf("%d ",nearj[inear]-nearj[inear-1]); + } + //mexPrintf(" => Result: %d (from %d; ep = %d).\n", + // edgelen[edgej[minjunc]]-pspan,pspan, + // edgelen[edgej[minjunc]]); + pspan = edgelen[edgej[minjunc]] - pspan; + skg[i + j * nrow] = pspan; + } else { + skg[i + j * nrow] = LONG_MAX; + } + + //mexPrintf("Final span: %g.\n",pspan); + } + else { + skg[i + j * nrow] = 0; + } + } + } + + time_t t6 = clock(); + printf("create output: %d ms.\n", t6 - t5); + _flushall(); + + // free space + free(jx); + free(jy); + free(seqj); + free(edgej); + free(seenj); + free(dNE); + free(dNW); + free(dSE); + free(dSW); + free(nearj); + + return skg; +} +// end of compute_skeleton_gradient() + +//*************************************************************************** +// +// Gateway driver to call the calculation from Matlab. +// +// This is the Matlab entry point. +// + +//void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { +// int nrow, ncol; +// double *img; +// +// // check for proper number of arguments +// errCheck(nrhs == 1, "Exactly one input argument required."); +// errCheck(nlhs <= 2, "Too many output arguments."); +// +// // check format of arguments +// errCheck(mxIsUint8(prhs[0]) || mxIsLogical(prhs[0]) || mxIsDouble(prhs[0]), +// "Input must be double binary image."); +// nrow = mxGetM(prhs[0]); +// ncol = mxGetN(prhs[0]); +// img = mxGetPr(prhs[0]); +// +// // process image +// if (mxIsDouble(prhs[0])) { +// compute_skeleton_gradient(img, nrow, ncol, nlhs, plhs); +// } +// else { +// compute_skeleton_gradient((unsigned char *)img, nrow, ncol, nlhs, plhs); +// } +//} +// end of mexFunction() + +bool* bwlookup(bool *bw, int lutIndex, int imgH, int imgW) { + bool* bwout = (bool*)calloc(0, sizeof(bool) * imgH* imgW); + for (int i = 0; i < imgH; i++) { + for (int j = 0; j < imgW; j++) { + int index = 0; + for (int k = 0; k < 9; k++) { + int newX = i + DIRECTIONS[k][0]; + int newY = j + DIRECTIONS[k][1]; + if (newX >= 0 && newX < imgH && newY >= 0 && newY < imgW && bw[newX * imgW + newY]) { + index += 1 << k; + } + } + bwout[i * imgW + j] = lutskel[lutIndex][index]; + } + } + return bwout; +} + +inline void bwmorphApplyOnce(bool* bw, int imgH, int imgW) { + for (int i = 0; i < 8; i++) { + bool* pre_bw = bw; + bw = bwlookup(bw, i, imgH, imgW); + free(pre_bw); + } +} + +inline bool isequal(bool *last_aout, bool *bwout, unsigned size) { + for (int i = 0; i < size; i++) { + if (last_aout[i] != bwout[i]) return false; + } + return true; +} + +bool* algbwmorph(bool * bw,int imgH, int imgW) { + bool* bwout = (bool*)malloc(sizeof(bool) * imgH* imgW); + memcpy(bwout, bw, sizeof(bool) * imgH* imgW); + int iter = 0, n = INT_MAX; + bool* last_aout = (bool*)malloc(sizeof(bool) * imgH* imgW); + while (iter < n) { + memcpy(last_aout, bwout, sizeof(bool) * imgH* imgW); + + bwmorphApplyOnce(bwout, imgH, imgW); + + iter += 1; + if (isequal(last_aout, bwout, imgH* imgW)) { + break; + } + + } + free(last_aout); + + return bwout; +} + diff --git a/LuckyProfiler/LuckyProfiler/skeleton.h b/LuckyProfiler/LuckyProfiler/skeleton.h new file mode 100644 index 0000000..2a9445d --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/skeleton.h @@ -0,0 +1,4 @@ +#pragma once + +long *compute_skeleton_gradient(long *img, int nrow, int ncol); +bool* algbwmorph(bool * bw, int imgH, int imgW); \ No newline at end of file diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.Build.CppClean.log b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.Build.CppClean.log new file mode 100644 index 0000000..e734540 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.Build.CppClean.log @@ -0,0 +1,18 @@ +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\vc141.pdb +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\skeleton.obj +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler_.obj +d:\workspace_vs2017\luckyprofiler\x64\release\luckyprofiler.dll +d:\workspace_vs2017\luckyprofiler\x64\release\luckyprofiler.pdb +d:\workspace_vs2017\luckyprofiler\x64\release\luckyprofiler.lib +d:\workspace_vs2017\luckyprofiler\x64\release\luckyprofiler.exp +d:\workspace_vs2017\luckyprofiler\x64\release\luckyprofiler.ipdb +d:\workspace_vs2017\luckyprofiler\x64\release\luckyprofiler.iobj +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\kernel.cu.cache +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\kernel.cu.obj +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler.tlog\cl.command.1.tlog +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler.tlog\cl.read.1.tlog +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler.tlog\cl.write.1.tlog +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler.tlog\link.command.1.tlog +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler.tlog\link.read.1.tlog +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler.tlog\link.write.1.tlog +d:\workspace_vs2017\luckyprofiler\luckyprofiler\x64\release\luckyprofiler.tlog\luckyprofiler.write.1u.tlog diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.log b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.log new file mode 100644 index 0000000..0b8e590 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.log @@ -0,0 +1,63 @@ + + D:\workspace_vs2017\LuckyProfiler\LuckyProfiler>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\nvcc.exe" -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -DNDEBUG -DLUCKYPROFILER_EXPORTS -D_WINDOWS -D_USRDLL -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W3 /nologo /O2 /FS /Zi /MD " -o x64\Release\kernel.cu.obj "D:\workspace_vs2017\LuckyProfiler\LuckyProfiler\kernel.cu" -clean + kernel.cu + Compiling CUDA source file kernel.cu... + + D:\workspace_vs2017\LuckyProfiler\LuckyProfiler>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\nvcc.exe" -gencode=arch=compute_35,code=\"sm_35,compute_35\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include" -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart static -DNDEBUG -DLUCKYPROFILER_EXPORTS -D_WINDOWS -D_USRDLL -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W3 /nologo /O2 /Fdx64\Release\vc141.pdb /FS /Zi /MD " -o x64\Release\kernel.cu.obj "D:\workspace_vs2017\LuckyProfiler\LuckyProfiler\kernel.cu" +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(824): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(1759): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(2621): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(3460): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(4403): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(5301): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(6212): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(7093): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(7892): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/device_functions.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/device_functions.h(772): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/device_functions.h(1628): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\device_double_functions.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_20_intrinsics.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_20_intrinsics.h(925): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(824): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(1759): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(2621): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(3460): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(4403): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(5301): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(6212): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(7093): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(7892): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/device_functions.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/device_functions.h(772): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/device_functions.h(1628): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\device_double_functions.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_20_intrinsics.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_20_intrinsics.h(925): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + kernel.cu +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h : warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(824): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(1759): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(2621): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(3461): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(4403): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(5301): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(6212): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(7093): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h(7892): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失 + LuckyProfiler_.cpp +d:\workspace_vs2017\luckyprofiler\luckyprofiler\luckyprofiler_.cpp(22): warning C4141: “dllexport”: 使用了多次 + skeleton.cpp +d:\workspace_vs2017\luckyprofiler\luckyprofiler\skeleton.cpp(73): warning C4244: “参数”: 从“time_t”转换到“unsigned int”,可能丢失数据 +d:\workspace_vs2017\luckyprofiler\luckyprofiler\skeleton.cpp(396): warning C4477: “printf”: 格式字符串“%d”需要类型“int”的参数,但可变参数 1 拥有了类型“time_t” + d:\workspace_vs2017\luckyprofiler\luckyprofiler\skeleton.cpp(396): note: 请考虑在格式字符串中使用“%lld” + d:\workspace_vs2017\luckyprofiler\luckyprofiler\skeleton.cpp(396): note: 请考虑在格式字符串中使用“%Id” + d:\workspace_vs2017\luckyprofiler\luckyprofiler\skeleton.cpp(396): note: 请考虑在格式字符串中使用“%I64d” +d:\workspace_vs2017\luckyprofiler\luckyprofiler\skeleton.cpp(474): warning C4018: “<”: 有符号/无符号不匹配 + 正在创建库 D:\workspace_vs2017\LuckyProfiler\x64\Release\LuckyProfiler.lib 和对象 D:\workspace_vs2017\LuckyProfiler\x64\Release\LuckyProfiler.exp + 正在生成代码 + All 19 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. + 已完成代码的生成 + LuckyProfiler.vcxproj -> D:\workspace_vs2017\LuckyProfiler\x64\Release\LuckyProfiler.dll diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.command.1.tlog b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.command.1.tlog new file mode 100644 index 0000000..35f6202 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.command.1.tlog differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.read.1.tlog b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.read.1.tlog new file mode 100644 index 0000000..a1c3d3f Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.read.1.tlog differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.write.1.tlog b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.write.1.tlog new file mode 100644 index 0000000..7ad6ece Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/CL.write.1.tlog differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/LuckyProfiler.lastbuildstate b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/LuckyProfiler.lastbuildstate new file mode 100644 index 0000000..2ee235f --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/LuckyProfiler.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v141:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=10.0.19041.0 +Release|x64|D:\workspace_vs2017\LuckyProfiler\| diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/LuckyProfiler.write.1u.tlog b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/LuckyProfiler.write.1u.tlog new file mode 100644 index 0000000..8cece0f Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/LuckyProfiler.write.1u.tlog differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.command.1.tlog b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.command.1.tlog new file mode 100644 index 0000000..e8c02e9 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.command.1.tlog differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.read.1.tlog b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.read.1.tlog new file mode 100644 index 0000000..1c3de31 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.read.1.tlog differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.write.1.tlog b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.write.1.tlog new file mode 100644 index 0000000..14db111 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler.tlog/link.write.1.tlog differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler_.obj b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler_.obj new file mode 100644 index 0000000..4727cb7 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/LuckyProfiler_.obj differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu.cache b/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu.cache new file mode 100644 index 0000000..6563746 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu.cache @@ -0,0 +1,50 @@ +Identity=kernel.cu +AdditionalCompilerOptions= +AdditionalCompilerOptions= +AdditionalDependencies= +AdditionalDeps= +AdditionalLibraryDirectories= +AdditionalOptions= +AdditionalOptions= +CodeGeneration=compute_35,sm_35 +CodeGeneration=compute_35,sm_35 +CompileOut=x64\Release\kernel.cu.obj +CudaRuntime=Static +CudaToolkitCustomDir= +Defines=;NDEBUG;LUCKYPROFILER_EXPORTS;_WINDOWS;_USRDLL;_WINDLL;_UNICODE;UNICODE; +Emulation=false +FastMath=false +GenerateLineInfo=false +GenerateRelocatableDeviceCode=false +GPUDebugInfo=false +GPUDebugInfo=false +HostDebugInfo=false +Include=;;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include +Inputs= +InterleaveSourceInPTX=false +Keep=false +KeepDir=x64\Release +LinkOut= +MaxRegCount=0 +NvccCompilation=compile +NvccPath= +Optimization=O2 +Optimization=O2 +PerformDeviceLink= +ProgramDataBaseFileName=x64\Release\vc141.pdb +PtxAsOptionV=false +RequiredIncludes= +Runtime=MD +Runtime=MD +RuntimeChecks=Default +RuntimeChecks=Default +TargetMachinePlatform=64 +TargetMachinePlatform=64 +TypeInfo= +TypeInfo= +UseHostDefines=true +UseHostInclude=true +UseHostLibraryDependencies= +UseHostLibraryDirectories= +Warning=W3 +Warning=W3 diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu.obj b/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu.obj new file mode 100644 index 0000000..f9ca2d3 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu.obj differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu2042449326.deps b/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu2042449326.deps new file mode 100644 index 0000000..f980dd9 --- /dev/null +++ b/LuckyProfiler/LuckyProfiler/x64/Release/kernel.cu2042449326.deps @@ -0,0 +1,191 @@ +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include\cuda_runtime.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_config.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\crtdefs.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\vcruntime.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\sal.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\concurrencysal.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\vadefs.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_defines.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\limits.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stddef.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\library_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\channel_descriptor.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_device_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_functions.hpp +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/common_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\string.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_memory.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_memcpy_s.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\errno.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\vcruntime_string.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_wstring.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\time.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_wtime.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\math.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdlib.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_malloc.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_search.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_wstdlib.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\cmath +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\yvals.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\yvals_core.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xkeycheck.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\crtdefs.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\crtdbg.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\vcruntime_new_debug.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\vcruntime_new.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\use_ansi.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\cstdlib +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\math.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xtgmath.h +C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include\xtr1common +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\math_functions.hpp +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\channel_descriptor.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\channel_descriptor.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt/device_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\device_functions.hpp +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_atomic_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\device_double_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\device_double_functions.hpp +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_20_atomic_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_32_atomic_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_35_atomic_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_32_atomic_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_60_atomic_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_20_intrinsics.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_30_intrinsics.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_32_intrinsics.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_35_intrinsics.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_32_intrinsics.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\sm_61_intrinsics.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\sm_70_rt.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\builtin_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\driver_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\crt\host_defines.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_surface_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_fetch_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_texture_types.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\texture_indirect_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\surface_indirect_functions.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\cuda_runtime_api.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\device_launch_parameters.h +c:\program files\nvidia gpu computing toolkit\cuda\v10.0\include\vector_types.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include\cuda_runtime.h +C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include\device_launch_parameters.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_wstdio.h +C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt_stdio_config.h +d:\workspace_vs2017\luckyprofiler\luckyprofiler\kernel.h diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/skeleton.obj b/LuckyProfiler/LuckyProfiler/x64/Release/skeleton.obj new file mode 100644 index 0000000..24ee361 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/skeleton.obj differ diff --git a/LuckyProfiler/LuckyProfiler/x64/Release/vc141.pdb b/LuckyProfiler/LuckyProfiler/x64/Release/vc141.pdb new file mode 100644 index 0000000..f0ba3d7 Binary files /dev/null and b/LuckyProfiler/LuckyProfiler/x64/Release/vc141.pdb differ diff --git a/LuckyProfiler/x64/Release/LuckyProfiler.dll b/LuckyProfiler/x64/Release/LuckyProfiler.dll new file mode 100644 index 0000000..00c6c2d Binary files /dev/null and b/LuckyProfiler/x64/Release/LuckyProfiler.dll differ diff --git a/LuckyProfiler/x64/Release/LuckyProfiler.exp b/LuckyProfiler/x64/Release/LuckyProfiler.exp new file mode 100644 index 0000000..63b76bb Binary files /dev/null and b/LuckyProfiler/x64/Release/LuckyProfiler.exp differ diff --git a/LuckyProfiler/x64/Release/LuckyProfiler.iobj b/LuckyProfiler/x64/Release/LuckyProfiler.iobj new file mode 100644 index 0000000..0da2927 Binary files /dev/null and b/LuckyProfiler/x64/Release/LuckyProfiler.iobj differ diff --git a/LuckyProfiler/x64/Release/LuckyProfiler.ipdb b/LuckyProfiler/x64/Release/LuckyProfiler.ipdb new file mode 100644 index 0000000..c0387a4 Binary files /dev/null and b/LuckyProfiler/x64/Release/LuckyProfiler.ipdb differ diff --git a/LuckyProfiler/x64/Release/LuckyProfiler.lib b/LuckyProfiler/x64/Release/LuckyProfiler.lib new file mode 100644 index 0000000..1b98448 Binary files /dev/null and b/LuckyProfiler/x64/Release/LuckyProfiler.lib differ diff --git a/LuckyProfiler/x64/Release/LuckyProfiler.pdb b/LuckyProfiler/x64/Release/LuckyProfiler.pdb new file mode 100644 index 0000000..d538fea Binary files /dev/null and b/LuckyProfiler/x64/Release/LuckyProfiler.pdb differ