上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 30 下一页

2017年10月22日

摘要: 基本演算矩阵的转置\[\begin{equation}(\mathbf{A}+\mathbf{B})^T = \mathbf{A}^T+\mathbf{B}^T\end{equation}\]\[\begin{equation}(\mathbf{AB})^T = \mathbf{B}^T\mathbf{A}^T\end{equation}\]上面\(\mathbf{A}\in\mathbb{R... 阅读全文
posted @ 2017-10-22 13:11 花老🐯 阅读(1687) 评论(0) 推荐(0) 编辑

2017年10月21日

摘要: k-means 是聚类中比较简单的一种。用这个例子说一下感受一下 TensorFlow 的强大功能和语法。 一、 TensorFlow 的安装按照官网上的步骤一步一步来即可,我使用的是 virtualenv 这种方式。 二、代码功能在\([0,0]\) 到 \([1,1]\) 的单位正方形中,随机生成 \(N\) 个点,然后把这 \(N\) 个点聚为 \(K\) 类。最终结果如下,在... 阅读全文
posted @ 2017-10-21 12:10 花老🐯 阅读(2855) 评论(0) 推荐(0) 编辑
摘要: Long-press gestures are continuous. The gesture begins (UIGestureRecognizerStateBegan) when the number of allowable fingers (numberOfTouchesRequired) have been pressed for the specified period (minimu... 阅读全文
posted @ 2017-10-21 10:07 花老🐯 阅读(575) 评论(0) 推荐(0) 编辑

2017年10月5日

摘要: A debug trick在异常端点处运行 po $arg1,找出异常信息。 Address Sanitizer概述是一个运行时检测工具发现内存问题 可以用于模拟器和设备 可以发现的问题Use after freeHeap buffer overflowStack buffer overflowGlobal variable overflowOverflows in C++ container... 阅读全文
posted @ 2017-10-05 10:39 花老🐯 阅读(632) 评论(0) 推荐(0) 编辑
摘要: Thread Sanitizer 过程编译过程中链接了一个新的库。 也可以通过命令行来操作: $ clang -fsanitize=thread source.c -o executable$ swiftc -sanitize=thread source.swift -o executable$ xcodebuild -enableThreadSanitizer YES 不支持设备,只支持... 阅读全文
posted @ 2017-10-05 09:33 花老🐯 阅读(504) 评论(0) 推荐(0) 编辑

2017年10月1日

摘要: 看完这个 WWDC 之后的总结。 Metal 可以在单位时间内提供 10 倍的 draw call 调用。 BackgroundAbout Draw Call每一次 draw call 调用都必须有自己的状态向量,比如着色器、纹理等。而改变状态向量对 CPU 来说是比较耗时的,因此单位时间内 draw call 的次数有限。  CPU 负责把状态向量的改变翻译为硬件命令 (hardwar... 阅读全文
posted @ 2017-10-01 20:13 花老🐯 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 读苹果文档时的笔记,给自己看。primary goal of Metal is to minimize the CPU overhead incurred by executing GPU workloads. 用在两个方面: graphicsdata-parallel computationMetal App 不能在后台运行,否则会被终止。 Command Organization and... 阅读全文
posted @ 2017-10-01 12:59 花老🐯 阅读(2171) 评论(0) 推荐(0) 编辑
摘要: Basic Buffers当向顶点着色器传递数据过多(大于 4096 字节)时, setVertexBytes:length:atIndex: 方法不允许使用,应该使用 setVertexBytes:length:atIndex: 方法提高性能。这时,参数应该是 MTLBuffer类型,可以被 GPU 访问的内存。_vertexBuffer.contents 方法返回可以被 CPU 访问的内存接口... 阅读全文
posted @ 2017-10-01 10:21 花老🐯 阅读(690) 评论(0) 推荐(0) 编辑

2017年8月27日

摘要: 这篇文章写的是看完 WWDC 17 - Modernizing GCD Usage 之后的笔记。 一、Parallelism & ConcurrencyParallelism 指的是在多个 CPU 核上同时跑代码。 DispatchQueue.concurrentPerform(iterations: 100) { (i) in print("\(i)")}为了更好的利用多个 CPU 的... 阅读全文
posted @ 2017-08-27 15:59 花老🐯 阅读(1128) 评论(0) 推荐(0) 编辑

2017年8月20日

摘要: 每一个模块、方法都有一个 ID,通过 ID 来调用。 m_registry->callNativeMethod(call.moduleId, call.methodId, std::move(call.arguments), call.callId); 找到对应的模块所有的模块在 ModuleRegistry 都有,存在 modules_ 变量中,通过下面的代码来调用模块对应的方法。 mod... 阅读全文
posted @ 2017-08-20 18:22 花老🐯 阅读(240) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 30 下一页

导航