Skip to content

Instantly share code, notes, and snippets.

Eyal Rozenberg eyalroz

Block or report user

Report or block eyalroz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
eyalroz /
Last active Jul 23, 2019
Better column abstraction in cudf - rejoinder 1

Rejoinder to the initial design document / proposal

These comments and questions follow this gist by Jacob Hemstad. They appear in order of the text in Jacob's gist. Please excuse the somewhat argumentative/critical tone - I'm actually very pleased that we are hammering this out.

We want to write an algorithm once and allow it to work on a variety of columns.

Well, yes, but aren't we doing that now already?

eyalroz / limits.cuh
Created Oct 21, 2017
CUDA-compatible version of C++ <limits>
View limits.cuh
// CUDA-device-accessible version of gcc 4.9.3's <limits>. -*- C++ -*-
* The C++ standard library's numeric_limits classes cannot currently be used
* in device code, since their methods are not marked __host__ __device__, and
* even though they're constexpr - CUDA 7.5 and earlier does not properly support
* using __host__ constpexr's on the device (there's experimental support but
* it causes trouble in different places).
eyalroz /
Created Apr 15, 2017
Shell script for determining the SM value for your (single) GPU
# Prints the compute capability of the first CUDA device installed
# on the system, or alternatively the device whose index is the
# first command-line argument
timestamp=$(date +%s.%N)
gcc_binary=${CMAKE_CXX_COMPILER:-$(which c++)}
View sgn2pdf
# sgn2pdf
# by Eyal Rozenberg <>
# version: 2016-12-27
# Extracts a PDF file from an Israeli courts' .sgn PDF document envelope
# This program is free software: you can redistribute it and/or modify
View memory_region.h
* memory_region.h
* Definition of the gsl::span-like memory_region class
#pragma once
#if ( __cplusplus < 201103L )
View Factory.h
* Implementation of the factory pattern, based on suggestions here:
* and on the suggestions for corrections here:
View Parsing the unparsed program_options options
static void add_unrecognized_options(TestConfiguration& config, const std::vector<string>& unrecognized_options)
// TODO: make sure all unrecognized options are of the form --option=value
// I'm sure the following can be made more elegant...
enum { OptionName, OptionValue } now_expecting = OptionName;
std::string option_name;
for(auto it = unrecognized_options.begin(); it != unrecognized_options.end(); it++) {
std::string option_value;
eyalroz / static_block.h
Last active Mar 20, 2019
A static block implementation in almost-C C++
View static_block.h
* static_block.h
* An implementation of a Java-style static block, in C++ (and potentially a
* GCC/clang extension to avoid warnings). Almost, but not quite, valid C.
* Partially inspired by Andrei Alexandrescu's Scope Guard and
* discussions on
* By Eyal Rozenberg <>
You can’t perform that action at this time.