摘要: mindstudio环境搭建 在进行算子开发前需要搭建好mindstudio开发环境,因为之前都没有接触过,所以为了避免大家少踩坑,我在此记录了一下自己的搭建过程,如有错误还请大家多多指教。 申请公测,等待审核,收到邮件,下载资料 在搭建环境之前需要申请一下公测资格,否则无法下载资料和镜像。 在 h 阅读全文
posted @ 2020-06-05 17:53 强威 阅读(6165) 评论(0) 推荐(0) 编辑
摘要: 1.实现 #include <iostream> #include <vector> using namespace std; template<class T> void merge(vector<T>& a, int left, int mid, int right) { vector<T> t 阅读全文
posted @ 2020-04-08 11:52 强威 阅读(147) 评论(0) 推荐(0) 编辑
摘要: share_ptr 简单实现: #include <iostream> using namespace std; template<class T> class SmartPtr { public: SmartPtr(T* ori_ptr); ~SmartPtr(); SmartPtr(SmartP 阅读全文
posted @ 2020-04-04 12:58 强威 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 1.最简单的单例模式,不考虑线程安全以及内存泄漏 #pragma once #include <iostream> using namespace std; class Singleton { private: Singleton() { cout << "construct" << endl; } 阅读全文
posted @ 2020-03-08 22:55 强威 阅读(203) 评论(0) 推荐(0) 编辑
摘要: C++对多线程新加的支持操作 线程池 我们有两种常见的创建线程的方法,一种是继承Thread类,一种是实现Runnable的接口,Thread类其实也是实现了Runnable接口。但是我们创建这两种线程在运行结束后都会被虚拟机销毁,如果线程数量多的话,频繁的创建和销毁线程会大大浪费时间和效率,更重要 阅读全文
posted @ 2020-03-06 22:32 强威 阅读(1299) 评论(0) 推荐(0) 编辑
摘要: // Strvec.h#pragma once #include <iostream> #include <string> #include <memory> #include <utility> #include <initializer_list> // 实现简版vector,之所以说简版是因为 阅读全文
posted @ 2020-03-01 21:32 强威 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Given an m x n matrix of non-negative integers representing the height of each unit cell in a continent, the "Pacific ocean" touches the left and top 阅读全文
posted @ 2020-02-24 23:12 强威 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1.哈希表 2.优先队列实现 3.堆排序(面试中堆的问题经常出现) 4.二叉搜索树的特征,查找和插入的时间复杂度 5.为什么说二叉搜索树有时会不稳定,如何改进?(可能会退化为链表;改进为平衡二叉查找树) 6.AVL树大概的调整过程;(左旋右旋) 7.红黑树的特征以及大概的调整过程 8.海量数据排序 阅读全文
posted @ 2020-02-20 18:42 强威 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1.突破 const 的限制 class Test { public: Test() = default; Test(unsigned int times):times(times){ } ~Test() = default; void printOut() const { cout << "out 阅读全文
posted @ 2020-02-19 19:53 强威 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1.如何查看内存空间?如何查看磁盘空间? (free; df -h) 2.如何查看进程? 3.一个文件"ip.txt",有两个字段ip(第一列)和访问时间(第二列),找出访问次数最多的ip awk '{ips[$1]++;} END {for(ip in ips) printf("%s\t%d\n" 阅读全文
posted @ 2020-02-17 18:21 强威 阅读(160) 评论(0) 推荐(0) 编辑