Warning
To access the discord post links please join the TouhouAI (24k members) discord server.
WIP
// clang gpu_compiler.m -fobjc-arc -fmodules -mmacosx-version-min=11.0 -framework Foundation -framework CoreGraphics -o gpu_compiler | |
#import <Foundation/Foundation.h> | |
#import <Metal/Metal.h> | |
void compile_to_gpu_code(id<MTLDevice> device, NSString *programString, NSString *destinationPath) { | |
NSError *error; | |
MTLCompileOptions *options = [MTLCompileOptions new]; | |
options.libraryType = MTLLibraryTypeDynamic; | |
options.installName = [NSString stringWithFormat:@"@executable_path/userCreatedDylib.metallib"]; |
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
#!/usr/bin/env python | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
__version__ = "0.2" | |
__all__ = ["SimpleHTTPRequestHandler"] |
Warning
To access the discord post links please join the TouhouAI (24k members) discord server.
WIP