Segment Tree
Use Case 1: Range Minimum Query Given a fixed-length array arr and multiple interval queries [l, r], return the minimum number in the range [l, r]. Use Case 2: Range Sum Given a fixed-length arr...
Use Case 1: Range Minimum Query Given a fixed-length array arr and multiple interval queries [l, r], return the minimum number in the range [l, r]. Use Case 2: Range Sum Given a fixed-length arr...
GEMV We will use load/compute/store coding style which is generally the most efficient for implementing kernels using HLS. #include <hls_stream.h> #include <hls_math.h> // for half-pr...
This tutorial uses Vitis 2022.1 version. Background Why Vitis Emulation Flow? Programming actual FPGA hardware directly is time consuming and prone to fault. If we successfully achieve the expe...
TL;DR Use the following command to change the fs.inotify.max_user_watches. sudo sysctl -n -w fs.inotify.max_user_watches=722104 Relavent Resources inotify ArchLinux Wiki man...
1. What is MPI? MPI (Message Passing Interface) is a standardized, portable library for writing parallel programs in distributed computing environments. It enables processes to communicate by sendi...
GMP The GNU Multiple Precision Arithmetic Library 安装 以下是针对一个没有 root 权限的 linux 操作系统的安装流程。 在 ubuntu/debian 上可以使用 sudo apt install libgmp-dev 安装 在 MacOS 上可以使用 brew install...
计算 $\pi$ 前情提要: 我们已经在 gmp 中展示了计算 $\pi$ 的方法, 接下来我们进一步对程序进行加速 Exploit CPU [\pi = \sum_{k=0}^{\infty}\left[\frac{1}{16^k}(\frac{4}{8k+1}-\frac{2}{8k+4}-\frac{1}{8k+5}-\frac{1}{8k+6})\right]] ...
背包问题 (Knapsack) 问题描述 0-1背包问题是非常经典的动态规划问题, 简单描述下这个问题, 首先你有容量为 W 的背包, 有 N 个物品可以选择装入或不装入背包, 每个物品有自己的价值和大小, 你所做的事就是在背包容量的限制下, 选择装入的物品以获得最高的利益。 求解思路 设有二维数组 dp[0..N][0..W], 其中 dp[i][j] 表示在考虑前 i 个物品并且...
Toolkits slurm openmp openmpi openacc cuda hip gmp Recommended Resources EssentialOfParallelComputing