
C/C++
zhe_csdn
不断犯错不断改错不断进步的过程
展开
-
c++调用tensorflow,我个人觉得这才是算法最终算法上战场后的最好表现形式
cpp调用tensorflow转载 2022-08-23 17:14:32 · 217 阅读 · 0 评论 -
cpp 四种分配内存方法
(1) malloc 函数: void *malloc(unsigned int size)在内存的动态分配区域中分配一个长度为size的连续空间,如果分配成功,则返回所分配内存空间的首地址,否则返回NULL,申请的内存不会进行初始化。(2)calloc 函数: void *calloc(unsigned int num, unsigned int size)按照所给的数据个数和数据类型所占字节数,分配一个 num * size 连续的空间。calloc申请内存空间后,会自动初始化内存空间为 0,但原创 2021-02-25 16:20:33 · 1133 阅读 · 0 评论 -
memcpy(input_tensor, image.data, image.total() * image.elemSize()) core dumped
//以下写法 core dumpedfloat* input_tensor = interpreter->typed_input_tensor<float>(0);memcpy(input_tensor, image.data, image.total() * image.elemSize());//修改过的写法 正确float *input_tensor = interpreter->typed_input_tensor<float>(0);for(int原创 2020-11-26 09:02:09 · 576 阅读 · 6 评论 -
Tensorflow lite 编译Android JNI C++ 动态链接库(步骤详细生动,肯定能搞定,原作写得很好)
https://blog.csdn.net/qq_27262241/article/details/107967506https://blog.csdn.net/qq_27262241/article/details/108090950转载 2020-11-25 14:11:44 · 477 阅读 · 0 评论 -
/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S(已经解决)
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.Core was generated by `./demo’.Program terminated with signal SIGSEGV, Segmentation fault.#0 __memcpy_avx_unaligned () at …/sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:23823原创 2020-11-23 18:30:56 · 4748 阅读 · 5 评论 -
Ubuntu16.04下配置VScode的C/C++开发环境(原作写得很好推荐)
https://www.cnblogs.com/flyinggod/p/10867530.html转载 2020-11-03 15:59:33 · 406 阅读 · 0 评论 -
CMakeLists.txt文件基本使用(转载)
https://blog.csdn.net/afei__/article/details/81201039CMakeLists.txt 语法介绍与实例演练,我觉得原作者写得非常好转载 2020-10-09 14:11:50 · 785 阅读 · 0 评论 -
c/c++按照行来读写txt文件
方法一 #include <stdio.h> #include <stdlib.h> int main() { FILE *fp; if(NULL == (fp = fopen("1.txt", "r"))) { printf("error\n...原创 2020-01-10 14:49:22 · 1763 阅读 · 0 评论 -
linux 编译动态链接库so文件(转载)
https://www.cnblogs.com/yushengzhou/p/8662921.html转载 2019-12-11 19:47:24 · 275 阅读 · 0 评论 -
多线程能否加快处理速度
问:多线程是不是能加快处理速度?解析:在使用多线程时,一定要知道一个道理:处理速度的最终决定因素是CPU、内存等,在单CPU(无论多少核)上,分配CPU资源的单位是“进程”而不是“线程”。我们可以做一个简单的试验假设我要拷贝100万条数据,单CPU电脑,用一个进程,在单线程的情况下,CPU占用率为5%,耗时1000秒。那么当在这个进程下,开辟10个线程同时去运行,是不是CPU占用率...转载 2019-12-05 16:31:24 · 3308 阅读 · 2 评论 -
golang 图片处理,剪切,base64数据转换,文件存储/ python base64 编解码,转换成Opencv,PIL.Image图片格式/cpp base64编解码
https://www.cnblogs.com/satng/p/5584429.html博文链接地址原创 2019-07-14 21:25:47 · 1431 阅读 · 0 评论 -
结构体指针,C语言结构体指针详解
指向结构体变量的指针#include <stdio.h># include <string.h>struct AGE{int year;int month;int day;};struct STUDENT{char name[20]; //姓名int num; //学号struct AGE birthday; //生日float score...原创 2019-06-11 19:15:12 · 3946 阅读 · 1 评论