Skip to content

Instantly share code, notes, and snippets.


Anatoliy V Tomilov tomilov

  • Yekaterinburg
View GitHub Profile
View LRU cache C++20.cpp
#include <unordered_set>
#include <list>
#include <optional>
#include <functional>
#include <utility>
#include <tuple>
#include <memory>
#include <type_traits>
#include <cstdlib>
View StdDevs for 8x8 tiles of input
constexpr size_t tileSize = 8;
const size_t width = ...;
const size_t height = ...;
thrust::cuda::pointer<const float3> p = ...;
assert(width % tileSize == 0);
assert(height % tileSize == 0);
thrust::cuda::vector<float3> sums;
View 1.diff
--- c:/Users/Anatoly/Documents/Projects/Vulkan-Hpp/vulkan/vulkan.hpp 2020-05-05 20:09:03.802924000 +0500
+++ c:/VulkanSDK/ 2020-04-24 11:54:44.062122600 +0500
@@ -13150,6 +13150,22 @@
return UniqueHandle<T,D>(data, deleter);
+ template <typename T, typename D>
+ VULKAN_HPP_INLINE typename ResultValueType<UniqueHandle<T,D>>::type createResultValue( Result result, T & data, char const * message, std::initializer_list<Result> successCodes, typename UniqueHandleTraits<T,D>::deleter const& deleter )
+ {
View Optix 7 denoiser Vulkan interop.cpp
#include <optix.h>
#include <optix_stubs.h>
#include <optix_function_table_definition.h>
#include <cuda.h>
namespace Denoiser
static void CUDA_CHECK(CUresult result)
tomilov /
Created Jan 10, 2020 — forked from datagrok/
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
tomilov / box_triangle_intersection.plt
Created Nov 23, 2019
nonagon as result of intersection of parallelotope and triangle in space
View box_triangle_intersection.plt
set view equal xyz
set autoscale
unset border
unset xtics
unset ytics
unset ztics
set xyplane at -1
set xrange [-1:5]
set yrange [-1:5]
tomilov / ddp_ssp.cpp
Last active Nov 13, 2019
dynamic dynamic programming for subset sum problem
View ddp_ssp.cpp
#include <iostream>
#include <algorithm>
#include <cassert>
struct pair
int term;
int sum;
pair operator + (int x)
View crc32c.h
#pragma once
#include <cstdint>
#include <x86intrin.h>
std::uint32_t crc32c(const void * input, std::size_t size, std::uint32_t result = ~0)
auto i8 = static_cast< const std::uint8_t * >(input);
tomilov /
Created Sep 29, 2017 — forked from matriphe/
Bash Script to notify via Telegram Bot API when user log in SSH
# save it as /etc/profile.d/
# use jq to parse JSON from
# get jq from here
DATE_EXEC="$(date "+%d %b %Y %H:%M")"
if [ -n "$SSH_CLIENT" ]; then
tomilov / stream.js
Created Apr 23, 2017 — forked from padenot/stream.js
How to serve media on node.js
View stream.js
var http = require('http');
var path = require('path');
var fs = require('fs');
var AUDIOFILE = "./audio.ogg";
function serveWithRanges(request, response, content) {
var range = request.headers.range;
var total = content.length;
var parts = range.replace(/bytes=/, "").split("-");