Skip to content

Instantly share code, notes, and snippets.

View fwsGonzo's full-sized avatar
💭
I may be slow to respond.

Alf-André Walla fwsGonzo

💭
I may be slow to respond.
  • Varnish Software
  • Norway
View GitHub Profile
clang++-7.0 t.cpp -o t
t.cpp:6:13: error: invalid operands to binary expression ('std::ostream'
(aka 'basic_ostream<char>') and 'T')
std::cout << T{} << std::endl;
~~~~~~~~~ ^ ~~~
/usr/lib/gcc/x86_64-linux-gnu/8.0.1/../../../../include/c++/8.0.1/system_error:217:5: note:
candidate function not viable: no known conversion from 'T' to 'const std::error_code' for
2nd argument
operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
^
cmake_minimum_required (VERSION 3.0.2)
project (vmod C)
include(../cmake/vmod.cmake vmod)
add_vmod(vmod_example vmod_example.vcc "Example VMOD"
vmod_example.c
)
vmod_add_tests(vmod_example
tests/vtc01.vtc
)
FROM ubuntu:18.04 as base
RUN apt update
# dm2 dependencies
RUN apt install -y build-essential git cmake gcc-8 g++-8 libglfw3 liblua5.3-dev xorg-dev
# GLEW dependencies
RUN apt install -y libxmu-dev libxi-dev libgl-dev libglu-dev python
RUN git clone https://github.com/nigels-com/glew.git /usr/glew
WORKDIR /usr/glew
#include <cassert>
#include <cstdio>
#include <pthread.h>
#include <sys/types.h>
#include <stdexcept>
#include <thread> // C++ threads
struct testdata
{
int depth = 0;
#include <stdio.h>
#include <elf.h>
#include <string.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdlib.h>
Hello
Hello Varnish!
test
Oh hi mark!
Oh hi mark!
64-bit ELF without binary translation
=====================================
$ ./rvlinux ../binaries/coremark.riscv64
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 14048973904
Total time (secs): 14.048974
Iterations/Sec : 2847.183024
Iterations : 40000
@fwsGonzo
fwsGonzo / benchmark.txt
Last active December 31, 2023 23:03
Benchmark between libriscv and LuaJIT
$ ./bench
* All benchmark results are measured in 200x1200 samples
benchmark overhead median 0ns lowest: 0ns highest: 0ns
Self-test running ELF entry at 0x101BC
Calling into event loop...!
event_loop: Checking for work
event_loop: Going to sleep!
add_work: Adding work
Resuming event loop...!
event_loop: Checking for work