![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
CUDA
Lsuper11
这个作者很懒,什么都没留下…
展开
-
无法解析的外部符号cusolverDnCreate
无法解析的外部符号cusolverDnCreate。原创 2023-08-15 16:47:07 · 249 阅读 · 0 评论 -
CMake生成的VS项目之后运行弹出错误框:无法启动...\Debug\~.exe,找不到指定的文件夹
问题的根本是项目缺东西,有问题,当所有问题解决了,也就不会出现这个问题的,***这个问题报错的原因不是根本原因是解决所有问题,但问题不是代码错误,是属性中缺东西!eg.2:无法解析的外部符号…(自己忘在LSVM.cu中定义但是在train.cpp中用了)。那么就在LSVM.cu中加上就好了。CMake生成的VS项目之后运行弹出错误框:无法启动…\Debug~.exe,找不到指定的文件夹。如:无法解析的外部符号cusolverDnCreate。首先确实Debug文件夹中没有.exe文件。原创 2023-08-15 16:45:39 · 1564 阅读 · 0 评论 -
Cmake 创建一个子项目
用Cmake 创建一个子项目原创 2022-10-24 21:28:44 · 1285 阅读 · 0 评论 -
Cmake实例解析
Cmake 命令语句(二)原创 2022-10-24 21:00:11 · 226 阅读 · 0 评论 -
【Cmake生成VS2012编译成功后运行显示无法启动系统找不到指定的文件夹】
Cmake生成VS2012编译成功后运行显示无法启动系统找不到指定的文件夹原创 2022-08-29 09:52:58 · 856 阅读 · 0 评论 -
无法打开inttypes.h文件
用cmake生成VS2012项目时,由于C99问题,inttypes头文件2012版没有。显示无法打开inttypes。原创 2022-08-27 21:01:17 · 710 阅读 · 0 评论 -
C语言读取.mat的cell数组
C语言读取.mat数据的cell数组原创 2022-08-26 12:45:54 · 464 阅读 · 0 评论 -
【C/C++ matlab混合编程之数组保存mat格式】
c语言保存mat数据格式原创 2022-08-15 12:46:28 · 791 阅读 · 0 评论 -
cuda矩阵乘法(简单理解)
cuda矩阵乘法原创 2022-07-18 23:23:34 · 999 阅读 · 0 评论 -
cuda向量乘向量
cublas向量乘向量原创 2022-04-11 18:46:31 · 114 阅读 · 0 评论 -
CUDA数组付初值
CUDA付初值int *d_ws_priority = nullptr;float *d_g = nullptr; cudaMalloc(&d_ws_priority, num_vec * sizeof(int));cudaMalloc(&d_g, num_vec_aligned * sizeof(float)); memsetCuda<int>(d_ws_priority, 0, num_vec);//将已开辟内存空间d_ws_priority的首原创 2022-01-27 13:58:18 · 1135 阅读 · 0 评论 -
CUDA Bug<二> 无法解析的外部符号 cublasCreate_v2
CUDA cublas Bugerror:错误 252 error LNK2019: 无法解析的外部符号 cublasCreate_v2,该符号在函数 “void __cdecl train<64>(bool,float const *,float const *,float *,int,int,float,float)” (??$train@$0EA@@@YAX_NPEBM1PEAMHHMM@Z) 中被引用解决方案项目->属性->连接器->输入->附加依赖项(c原创 2021-11-30 15:04:26 · 1952 阅读 · 3 评论 -
【cudaMemcpy】
cudaMemcpycudaMemcpy用于在主机(Host)和设备(Device)之间往返的传递数据,用法如下:主机到设备:cudaMemcpy(d_A,h_A,nBytes,cudaMemcpyHostToDevice)设备到主机:cudaMemcpy(h_A,d_A,nBytes,cudaMemcpyDeviceToHost)注意:该函数是同步执行函数,在未完成数据的转移操作之前会锁死并一直占有CPU进程的控制权,所以不用再添加cudaDeviceSynchronize()函数———————原创 2021-11-28 13:43:40 · 5487 阅读 · 0 评论 -
CUDA 块同步,线程同步
Block同步WAIT_FOR_THE_FINAL_BLOCK自定义#define WAIT_FOR_THE_FINAL_BLOCK \do { \ __threadfence(); \ __shared__ int value; \ if (threadIdx.x + threadIdx.y == 0) value = 1 + atomicAdd(d_sync_buffer + sync_buffer_id, 1); \ __syncthreads(); \ if (value <原创 2021-11-25 19:34:31 · 1717 阅读 · 0 评论 -
CUDA Bug <一>
问题描述:错误 23 error : no instance of function template “getgriddim” matches the argument list dim3 dimGrid(getgriddim(num_vec, (size_t)dimBlock.x));getgriddim函数定义如下#pragma once#include <algorithm>template<typename T>__host__ __device__ T原创 2021-11-25 13:19:45 · 491 阅读 · 0 评论 -
CUDA thrust
CUDA thrustthrustthrust :: sort_by_keythrust::greater/less< float/int >( )thrust::device_ptr < float> dev_sortval = thrust::device_pointer_cast(d_sortval)thrust :: stable_sortthrustThrust是一个类似于STL的针对CUDA的C++模板库,能够使程序更简洁易读。Thrust提供与CUDA C完全兼容原创 2021-11-24 18:35:01 · 1415 阅读 · 0 评论