Skip to content

Instantly share code, notes, and snippets.

@Aphoh
Aphoh / fft_demo.ipynb
Created November 23, 2023 09:03
Pytorch FFT Demo
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
//Feast your eyes on the worst pointer chasing logic I have ever seen.
static simulation_context* ctx_from_term(ErlNifEnv *env, ERL_NIF_TERM term) {
/* This may seem crazy, but here's what's going on here.
* I'm trying to get a simulation_context*, which is a resource
* my application is using. The function enif_get_resource accepts a void** ptr such that *ptr
* will point to my resource, so **ptr will be my simulation_context*
*/
// We can't make a simulation_context*** as then it will try to write the pointer-pointer to that location
##### Replace 'example' anywhere with the name of your app and '*ec2ip*' with your ec2 instance ip
##### Set up your instance and make sure it's security group has ssh, http, and https open inbound and outbound
##### Don't forget to chmod 400 cert.pem
##### .deliver/config
APP="example"
BUILD_HOST="*ec2ip*"
BUILD_USER="elixir_builder"
BUILD_AT="/home/$BUILD_USER/edeliver/$APP/builds"
// High quality
// Price range 1
gen best_one = .
set trace on
mkmat *_5_1, matrix(food_5_1)
forvalues i=1/56 {