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
#include <pty.h> | |
#include <fcntl.h> | |
#include <signal.h> | |
#include <sys/ioctl.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <tcl8.6/expect.h> |
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
\documentclass[14pt, a4paper]{extarticle} | |
\RequirePackage[l2tabu, orthodox]{nag} | |
\usepackage[utf8]{inputenc} | |
\usepackage[russian]{babel} | |
\usepackage[top=2cm, bottom=2cm, left=3cm, right=1cm]{geometry} % Отступы | |
\usepackage{fontspec} | |
\usepackage{amsmath, amssymb, indentfirst, titletoc, titlesec, verbatim, csquotes, tabularx, listings, caption, url, tocloft, graphicx, multirow, courier} |
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
APP_NAME = opt | |
LIB_NAME = spirvopt | |
MODE = Debug | |
CC = gcc | |
CFLAGS = -g -Wall -Wextra -pedantic -Wno-unused-function | |
BUILD_PATH = build/debug | |
ifeq ($(MODE), Release) |
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 GLFW_INCLUDE_VULKAN | |
#define NUM_SAMPLES VK_SAMPLE_COUNT_1_BIT | |
#define NUM_DESCRIPTOR_SETS 1 | |
#define NUM_SHADER_STAGES 2 | |
#define NUM_VERT_ATTRIBUTES 2 | |
#define NUM_VIEWPORTS 1 | |
#define NUM_SCISSORS NUM_VIEWPORTS | |
#define FENCE_TIMEOUT 100000000 | |
#include "common.h" |
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
# Git branch in prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1) /' | |
} | |
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;33m\]\$(parse_git_branch)\[\033[00m\]$ " | |
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 void | |
m3_unity(f32 result[static 9]) | |
{ | |
memset(result, 0x00, 9 * sizeof(f32)); | |
result[0] = result[4] = result[8] = 1.0f; | |
} | |
static void | |
m3_mul(f32 result[static 9], f32 A[static 9], f32 B[static 9]) |
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 s32 | |
orient_2d(s32 ax, s32 ay, s32 bx, s32 by, s32 x, s32 y) | |
{ | |
return(bx - ax) * (y - ay) - (by - ay) * (x - ax); | |
} | |
static void | |
fill_triangle(struct framebuffer *fb, | |
s32 v0x, s32 v0y, s32 v1x, s32 v1y, s32 v2x, s32 v2y) | |
{ |
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
// [INFO] Average time ~ 16.1 msec (10k triangles) | |
#include "../../common.h" | |
#if VIS | |
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
struct GL { | |
GLuint VAO; |
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
#include "common.h" | |
#include <SDL.h> | |
static const u32 WINDOW_WIDTH = 800; | |
static const u32 WINDOW_HEIGHT = 600; | |
static const u32 TARGET_FRAMERATE = 60; | |
static const f32 TARGET_FRAMETIME = 1000.0f / (f32) TARGET_FRAMERATE; |
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
body { | |
background: #eee; | |
padding: 5em; | |
font-family: Roboto; | |
line-height: 1.6; | |
} | |
pre { | |
background: white; | |
padding: .5em; |