Some codes are borrowed from CUDA sample codes and NVIDIA blogs
Fulcrum: a Simplified Control and Access Mechanism toward Flexible and Practical in-situ Accelerators.
Marzieh Lenjani, Patricia Gonzalez, Elaheh Sadredini, Shuangchen Li, Yuan Xie, Ameen Akel, Sean Eilert, Mircea R. Stan, and Kevin Skadron
The 26th IEEE International Symposium on High-Performance Computer Architecture (HPCA), 2020.