Skip to content

Instantly share code, notes, and snippets.

View bassoy's full-sized avatar
🎯
Focusing

Cem Bassoy bassoy

🎯
Focusing
  • Fraunhofer IOSB
  • Germany
View GitHub Profile
@bassoy
bassoy / main.cpp
Last active September 29, 2018 11:38
Example of Tensor/Matrix/Vector Profiler
// Wraps the standard transpose
template<typename _Value, typename _Layout>
struct StandardTranspose
{
using Value = _Value;
using Layout = _Layout;
using Array = fhg::tensor<Value, Layout>;
static constexpr auto name = "transpose";
static auto call(Array const& a, std::vector<std::size_t> const& phi) { return a.transpose(phi); }
@bassoy
bassoy / main.cpp
Created April 2, 2020 11:05 — forked from amitsingh19975/main.cpp
decoupling tensor
int main(){
auto s1 = ub::test::tensor_static_container<float,ub::static_extents<1,2,3>, ub::first_order>{};
auto s2 = ub::test::tensor_static_container<float,ub::static_extents<1,2,3>, ub::first_order>{1};
std::cout<<s1.rank()<<'\n';
return 0;
}
@bassoy
bassoy / query_lighthouse.sh
Created September 7, 2022 15:45
Query System & Sync Status of Lighthouse (Readiness for the Merge)
#! /bin/bash
curlcmd='curl -s -H "accept: application/json" -X GET'
host="http://localhost:5052"
temp=$(echo "scale=2; $(cat /sys/devices/virtual/thermal/thermal_zone0/temp) / 1000" | bc)
printf "Temperature: %.2f C.\n" ${temp}
home_avail=$(df -hBG /home --output=avail | grep -v Avail | grep -Eo "[0-9]+.[0-9]+")
printf "Available disk space on /home: %s GB.\n" ${home_avail}