git clone https://github.com/spack/spack.git
export SPACK_ROOT=/path/to/spack
export PATH=${SPACK_ROOT}/bin:${PATH}
source ${SPACK_ROOT}/share/spack/setup-env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream>; | |
#include <string>; | |
#include <chrono>; | |
#include <thread>; | |
#include <cstdlib>; | |
const int width = 158; // Width of terminal window | |
const int flipsPerLine = 5; // No. of columns changed per line | |
const int millisecondsOfSleep = 50; // Delay between lines in millisecond | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 思路: | |
* 1. 左边的右括号不能超过当前位置的一半长度 | |
* 2. 右边的左括号不能超过当前位置的一半长度 | |
*/ | |
#define _USE_MATH_DEFINES | |
#ifdef ONLINE_JUDGE | |
#define FINPUT(file) 0 | |
#define FOUTPUT(file) 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I left files that I am not familar with. | |
spack/package.py | 131 ++ | |
spack/packages.yaml | 16 +- | |
Add new packages for NVIDIA GPUs | |
src/lib/analysis/Args.hpp | 3 + | |
Initialize instruction mix analysis files. All the features are implemented in master-gpu-instruction-analyzer branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<type T> | |
void build(T[] tree, T[] vals, size_t n) { | |
if (n == 0) { | |
return; | |
} | |
for (auto i = n; i < 2 * n; ++i) { | |
tree[i] = vals[i]; | |
} | |
for (auto i = n - 1; i > 0; --i) { | |
tree[i] = tree[i * 2] + tree[i * 2 + 1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NumMatrix { | |
private: | |
std::vector<std::vector<int> > tree; | |
void columnInit(std::vector<int> &tree_column, std::vector<int> &matrix_column) { | |
size_t columns = matrix_column.size(); | |
for (size_t i = columns; i < tree_column.size(); ++i) { | |
tree_column[i] = matrix_column[i - columns]; | |
} | |
for (size_t i = columns - 1; i > 0; --i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
void __attribute__ ((noinline)) init(int *arr, size_t length) { | |
for (auto i = 0; i < length; ++i) { | |
arr[i] = 1; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
week |
OlderNewer