-# FFT and convolution test (Python)
+# FFT and convolution test (Python), "generators" version
#
# Copyright (c) 2020 Project Nayuki. (MIT License)
# https://www.nayuki.io/page/free-small-fft-in-multiple-languages
#
+# Copyright (C) 2021 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
+# https://libre-soc.org/openpower/sv/remap/
+#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
SVSHAPE0 = SVSHAPE()
SVSHAPE0.lims = [n, 0, 0]
SVSHAPE0.order = [0,1,2]
- SVSHAPE0.mode = 0b00
+ SVSHAPE0.mode = 0b01 # FFT mode
+ SVSHAPE0.skip = 0b00
SVSHAPE0.offset = 0
SVSHAPE0.invxyz = [0,0,0] # inversion if desired
# j+halfstep schedule
SVSHAPE1 = deepcopy(SVSHAPE0)
- SVSHAPE1.mode = 0b01
+ SVSHAPE1.skip = 0b01
# k schedule
SVSHAPE2 = deepcopy(SVSHAPE0)
- SVSHAPE2.mode = 0b10
+ SVSHAPE2.skip = 0b10
# enumerate over the iterator function, getting 3 *different* indices
for idx, (jl, jh, k) in enumerate(zip(iterate_indices(SVSHAPE0),
else:
return [(val / n) for val in xvec]
+
+###################################
# ---- Main and test functions ----
+###################################
def main():
global _maxlogerr