forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
3
lib/aura/Backends/hl/aura/aurahl.c
Normal file
3
lib/aura/Backends/hl/aura/aurahl.c
Normal file
@ -0,0 +1,3 @@
|
||||
// Keep this file so that the headers are included in the compilation
|
||||
#include "hl/aura/math/fft.h"
|
||||
#include "hl/aura/types/complex_array.h"
|
3
lib/aura/Backends/hl/aura/aurahl.h
Normal file
3
lib/aura/Backends/hl/aura/aurahl.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define AURA_HL_FUNC(n) aura_hl_##n
|
28
lib/aura/Backends/hl/aura/math/FFT.h
Normal file
28
lib/aura/Backends/hl/aura/math/FFT.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <hl.h>
|
||||
|
||||
#include <aura/types/_ComplexArray/HL_ComplexArrayImpl.h>
|
||||
|
||||
#include "hl/aura/aurahl.h"
|
||||
#include "common_c/math/fft.h"
|
||||
#include "common_c/types/complex_t.h"
|
||||
|
||||
HL_PRIM void AURA_HL_FUNC(ditfft2)(aura__types___ComplexArray__HL_ComplexArrayImpl time_array, int t, aura__types___ComplexArray__HL_ComplexArrayImpl freq_array, int f, int n, int step, bool inverse) {
|
||||
const aura_complex_t *times = (aura_complex_t*) time_array->self;
|
||||
aura_complex_t *freqs = (aura_complex_t*) freq_array->self;
|
||||
|
||||
aura_ditfft2(times, t, freqs, f, n, step, inverse);
|
||||
}
|
||||
|
||||
HL_PRIM void AURA_HL_FUNC(ditfft2_iterative)(aura__types___ComplexArray__HL_ComplexArrayImpl time_array, aura__types___ComplexArray__HL_ComplexArrayImpl freq_array, int n, bool inverse, aura__types___ComplexArray__HL_ComplexArrayImpl exp_rotation_step_table) {
|
||||
const aura_complex_t *times = (aura_complex_t*) time_array->self;
|
||||
aura_complex_t *freqs = (aura_complex_t*) freq_array->self;
|
||||
|
||||
const aura_complex_t *exp_lut = (aura_complex_t*) exp_rotation_step_table->self;
|
||||
|
||||
aura_ditfft2_iterative(times, freqs, n, inverse, exp_lut);
|
||||
}
|
||||
|
||||
DEFINE_PRIM(_VOID, ditfft2, _BYTES _I32 _BYTES _I32 _I32 _I32 _BOOL)
|
||||
DEFINE_PRIM(_VOID, ditfft2_iterative, _BYTES _BYTES _I32 _BOOL _BYTES)
|
29
lib/aura/Backends/hl/aura/types/complex_array.h
Normal file
29
lib/aura/Backends/hl/aura/types/complex_array.h
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <hl.h>
|
||||
|
||||
#include "hl/aura/aurahl.h"
|
||||
|
||||
#include "common_c/types/complex_array.h"
|
||||
#include "common_c/types/complex_t.h"
|
||||
|
||||
HL_PRIM vbyte* AURA_HL_FUNC(complex_array_alloc)(int length) {
|
||||
return (vbyte*) aura_complex_array_alloc(length);
|
||||
}
|
||||
|
||||
HL_PRIM void AURA_HL_FUNC(complex_array_free)(vbyte* complex_array) {
|
||||
aura_complex_array_free((aura_complex_t*) complex_array);
|
||||
}
|
||||
|
||||
HL_PRIM aura_complex_t* AURA_HL_FUNC(complex_array_set)(vbyte* complex_array, int index, float real, float imag) {
|
||||
return aura_complex_array_set((aura_complex_t *) complex_array, index, real, imag);
|
||||
}
|
||||
HL_PRIM aura_complex_t* AURA_HL_FUNC(complex_array_get)(vbyte* complex_array, int index) {
|
||||
return aura_complex_array_get((aura_complex_t*) complex_array, index);
|
||||
}
|
||||
|
||||
DEFINE_PRIM(_BYTES, complex_array_alloc, _I32)
|
||||
DEFINE_PRIM(_VOID, complex_array_free, _BYTES)
|
||||
|
||||
DEFINE_PRIM(_REF(_aura__types___Complex__ComplexImpl), complex_array_set, _BYTES _I32 _F32 _F32)
|
||||
DEFINE_PRIM(_REF(_aura__types___Complex__ComplexImpl), complex_array_get, _BYTES _I32)
|
8
lib/aura/Backends/hl/kincfile.js
Normal file
8
lib/aura/Backends/hl/kincfile.js
Normal file
@ -0,0 +1,8 @@
|
||||
const project = new Project("aura-hl");
|
||||
|
||||
project.addIncludeDir("../");
|
||||
|
||||
project.addFile("../common_c/**");
|
||||
project.addFile("aura/**");
|
||||
|
||||
resolve(project);
|
Reference in New Issue
Block a user