This file contains hidden or 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
| #! /usr/bin/env python3 | |
| import json | |
| import subprocess | |
| import copy | |
| target = 'Ethernet124' | |
| brk_mode = '4x25G[10G]' | |
| speed = '25000' | |
| def parse_lane(port): |
This file contains hidden or 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
| #ifndef CAST_H | |
| #define CAST_H | |
| // cast number to signed implementation independently | |
| // develop from https://stackoverflow.com/questions/13150449/efficient-unsigned-to-signed-cast-avoiding-implementation-defined-behavior | |
| #include <type_traits> | |
| #include <limits> | |
| template<typename Tu> |
This file contains hidden or 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
| # depends on libjpg-dev libpng-dev | |
| cmake -DLLVM_DIR=<path to llvm\lib\cmake\llvm> \ | |
| -DWITH_TESTS=OFF -DWITH_APPS=OFF -DWITH_TUTORIALS=OFF -DWITH_DOCS=OFF \ | |
| -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 \ | |
| # -DHALIDE_SHARED_LIBRARY=OFF \ | |
| -DCMAKE_INSTALL_PREFIX=<install path> .. |
This file contains hidden or 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
| -fsantize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer | |
| -fsantize=undefined | |
| -Wshadow | |
| https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/ | |
| # | |
| -fexceptions |