Most RISC-V vector (RVV) instructions access control and status registers (CSRs), which can be understood as additional instruction operands that were implemented separately due to encoding constraints. The assembly programmer must manually access these CSRs. The C-languge RVV intrinsics do have any such encoding constraints, so the intrinsics programmer can enjoy a simpler programming model.
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
###################################### | |
field name: councilor | |
element in list: 102830 | |
unique element: 947 | |
top 30 repeating value: | |
0 : [2057, '黃國安'] | |
1 : [1773, '張鎮榮'] | |
2 : [1721, '陳見賢'] | |
3 : [1125, '劉水復'] | |
4 : [1049, '江維屏'] |
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
#!/bin/bash | |
# | |
BACKUPDEST="$1" | |
DOMAIN="$2" | |
MAXBACKUPS="$3" | |
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then | |
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]" | |
exit 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
// see https://eopxd.com/2020/09/15/canonical-coin-system/ for some explaination | |
#include <cstdio> | |
#include <vector> | |
#define N 1000006 | |
using namespace std; | |
int dp[2*N]; | |
vector<int> coin; | |
int G ( int x ) { | |
int ret = 0; | |
for ( auto it=coin.rbegin(); it!= coin.rend(); ++it ) { |
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
// see https://eopxd.com/2020/08/30/morris-traversal/ for explaination | |
#include <iostream> | |
#include <cassert> | |
#include <vector> | |
#include <memory> | |
using namespace std; | |
template<class T> | |
struct Tree { |
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
# By eopXD (eopxd.com) | |
# Since it took me some time to figure it out, I guess this file can help out. | |
import onnx | |
from onnx import helper | |
from onnx import AttributeProto, TensorProto, GraphProto | |
from onnx import numpy_helper | |
xNP = np.array([[[[0., 1., 2.], # (1, 1, 3, 3) | |
[3., 4., 5.], | |
[6., 7., 8.]]]]).astype(np.float32) |
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
// C++ 14 | |
#include <iostream> | |
#include <memory> | |
#include <set> | |
// template specialization | |
template<typename T> struct std::less<std::unique_ptr<T>> { | |
bool operator()(const std::unique_ptr<T>& a, const std::unique_ptr<T>& b) const { | |
return *a < *b; | |
} |
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
?contract |
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
?contract |
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
{"valueParameterDescriptions":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"O","contractName":"","contractDescription":"","choiceDescriptions":[]} |