- Developped under Python 3.7.12
- Standalone script which parse hackmd markdown (including imgur link) and create directory (from tags) with downloaded imgur link
- To use,
python3 script.py --zip_file <file.zip>
- To export your hackmd markdown as zip file
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
NAME = libasm.a | |
SRCS = dot_product.asm | |
OBJS = $(SRCS:.asm=.o) | |
all: | |
nasm -g -f elf64 ${SRCS} | |
gcc -g -c main.c -o main.o | |
ar rc $(NAME) $(OBJS) | |
gcc -g main.o $(NAME) -o 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
NAME = libasm.a | |
SRCS = fill_mat.asm | |
OBJS = $(SRCS:.asm=.o) | |
all: | |
nasm -g -f elf64 ${SRCS} | |
gcc -g -c main.c -o main.o | |
ar rc $(NAME) $(OBJS) | |
gcc -g main.o $(NAME) -o 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
NAME = libasm.a | |
SRCS = block_avg.asm | |
OBJS = $(SRCS:.asm=.o) | |
all: | |
nasm -g -f elf64 ${SRCS} | |
gcc -g -c main.c -o main.o | |
ar rc $(NAME) $(OBJS) | |
gcc -g main.o $(NAME) -o 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
all: | |
nasm -f elf64 main.asm | |
gcc -g -nostartfiles -no-pie -o main main.o | |
debug: | |
echo "dashboard -output /dev/pts/0\nb _start\nrun >> gdb-log.txt 2>&1\nlayout asm\ndashboard assembly\ndashboard source\ndashboard threads\nset logging file gdb-log.txt\nset logging on\nset trace-commands on\nrecord\n" > gdb-commands.txt | |
gdb -x gdb-commands.txt main | |
clean: | |
rm *.o main gdb-commands.txt gdb-log.txt .gdb_history |
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
%define ARCH_X86_64 1 | |
; sad_16x16, 4, 7, 5, src, src_stride, dst, dst_stride, src_stride3, dst_stride3, cnt | |
; function_name, #args (%1), #regs (%2), #xmm_regs (%3), [stack_size,] (%4) arg_names... (%5-*) | |
%macro PUSH_IF_USED 1-* | |
%rep %0 | |
%if %1 < regs_used | |
push r%1 | |
%endif |
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
struct BenchWrapper | |
{ | |
size_t nb_fct_call; | |
size_t iter_per_fct; | |
// Define function arguments here | |
int (*func)(const OVSEI *sei, OVFrame **frame); | |
}; | |
void bench_decorator(struct BenchWrapper bw, char* name, const OVSEI *sei, OVFrame **frame) | |
{ |
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
void fg_simulate_grain_blk8x8(int32_t *grainStripe, uint32_t grainStripeOffsetBlk8, | |
uint32_t width, uint8_t log2ScaleFactor, int16_t scaleFactor, uint32_t kOffset, uint32_t lOffset, uint8_t h, uint8_t v, uint32_t xSize) | |
{ | |
uint32_t k, l; | |
uint32_t idx, idx_offset, idx_offset_l, grainStripeOffsetBlk8_l; | |
idx_offset = ( h*NUM_CUT_OFF_FREQ + v ) * DATA_BASE_SIZE * DATA_BASE_SIZE; | |
for (l = 0; l < 8; l++) /* y direction */ | |
{ | |
idx_offset_l = idx_offset + (l + lOffset) * DATA_BASE_SIZE; |
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
void fg_simulate_grain_blk8x8_sse4(int32_t *grainStripe, uint32_t grainStripeOffsetBlk8, | |
uint32_t width, uint8_t log2ScaleFactor, int16_t scaleFactor, uint32_t kOffset, uint32_t lOffset, uint8_t h, uint8_t v, uint32_t xSize) | |
{ | |
uint32_t idx_offset_l1, idx_offset_l2, idx_offset_l3, idx_offset_l4; | |
uint32_t grainStripeOffsetBlk8_l1, grainStripeOffsetBlk8_l2, grainStripeOffsetBlk8_l3, grainStripeOffsetBlk8_l4; | |
uint32_t idx_offset = ( h*NUM_CUT_OFF_FREQ + v ) * DATA_BASE_SIZE * DATA_BASE_SIZE; | |
__m128i scale = _mm_set_epi32(scaleFactor, scaleFactor, scaleFactor, scaleFactor); |
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
static inline uint32_t ov_clip_uintp2(int32_t val, uint32_t a) | |
{ | |
if (val > 0) { | |
int32_t mask = (1 << a) - 1; | |
int32_t overflow = !!(val & (~mask)); | |
return ((-overflow) & mask) | (val & mask); | |
} else { | |
return 0; | |
} | |
#if 0 |
OlderNewer