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
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
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
from contextlib import contextmanager | |
import numpy as np | |
import torch | |
from torch import Tensor, ByteTensor | |
import torch.nn.functional as F | |
from torch.autograd import Variable | |
import pycuda.driver | |
from pycuda.gl import graphics_map_flags | |
from glumpy import app, gloo, gl |
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
#!/usr/bin/python | |
# | |
# Usage: | |
# adb logcat -v time | python logcat_unity.py | |
import sys | |
import re | |
IGNORED_LINES=["(Filename:"] | |
LOG_TAG="Unity" |
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
std::chrono::high_resolution_clock::time_point start, end, timetoprint; | |
timetoprint = start = end = std::chrono::high_resolution_clock::now(); | |
long long frame_count=0; | |
long double frametime_total=0.f; | |
while(!glfwWindowShouldClose(win)) { | |
end = std::chrono::high_resolution_clock::now(); | |
long int frametime_us = (std::chrono::duration_cast<std::chrono::microseconds>(end-start).count()); | |
float frametime_s = ft/1e6f; |