diff --git a/master/doctrees/appdevelop/ai_dsp/gray_cnn.doctree b/master/doctrees/appdevelop/ai_dsp/gray_cnn.doctree index 4b5b2e39..eca4e23e 100644 Binary files a/master/doctrees/appdevelop/ai_dsp/gray_cnn.doctree and b/master/doctrees/appdevelop/ai_dsp/gray_cnn.doctree differ diff --git a/master/doctrees/appdevelop/ai_dsp/index.doctree b/master/doctrees/appdevelop/ai_dsp/index.doctree index eced6ac7..ec2fb6d6 100644 Binary files a/master/doctrees/appdevelop/ai_dsp/index.doctree and b/master/doctrees/appdevelop/ai_dsp/index.doctree differ diff --git a/master/doctrees/appdevelop/autocodegen/index.doctree b/master/doctrees/appdevelop/autocodegen/index.doctree index 67b93300..03c79192 100644 Binary files a/master/doctrees/appdevelop/autocodegen/index.doctree and b/master/doctrees/appdevelop/autocodegen/index.doctree differ diff --git a/master/doctrees/appdevelop/dsp/hrrp.doctree b/master/doctrees/appdevelop/dsp/hrrp.doctree index 58263551..22f61ce0 100644 Binary files a/master/doctrees/appdevelop/dsp/hrrp.doctree and b/master/doctrees/appdevelop/dsp/hrrp.doctree differ diff --git a/master/doctrees/appdevelop/dsp/index.doctree b/master/doctrees/appdevelop/dsp/index.doctree index 89d5afe0..20c89803 100644 Binary files a/master/doctrees/appdevelop/dsp/index.doctree and b/master/doctrees/appdevelop/dsp/index.doctree differ diff --git a/master/doctrees/appdevelop/dsp/rdsar.doctree b/master/doctrees/appdevelop/dsp/rdsar.doctree index 18033ff6..89cd2471 100644 Binary files a/master/doctrees/appdevelop/dsp/rdsar.doctree and b/master/doctrees/appdevelop/dsp/rdsar.doctree differ diff --git a/master/doctrees/appdevelop/dsp/rpc.doctree b/master/doctrees/appdevelop/dsp/rpc.doctree index defe87f2..9ca04006 100644 Binary files a/master/doctrees/appdevelop/dsp/rpc.doctree and b/master/doctrees/appdevelop/dsp/rpc.doctree differ diff --git a/master/doctrees/appdevelop/index.doctree b/master/doctrees/appdevelop/index.doctree index ab5e00d9..0fbd3f2d 100644 Binary files a/master/doctrees/appdevelop/index.doctree and b/master/doctrees/appdevelop/index.doctree differ diff --git a/master/doctrees/environment.pickle b/master/doctrees/environment.pickle index af2d517b..bbf0e7d1 100644 Binary files a/master/doctrees/environment.pickle and b/master/doctrees/environment.pickle differ diff --git a/master/doctrees/functionlib/custom_op/complex_abs.doctree b/master/doctrees/functionlib/custom_op/complex_abs.doctree index ec85863a..00ffb23a 100644 Binary files a/master/doctrees/functionlib/custom_op/complex_abs.doctree and b/master/doctrees/functionlib/custom_op/complex_abs.doctree differ diff --git a/master/doctrees/functionlib/custom_op/fft.doctree b/master/doctrees/functionlib/custom_op/fft.doctree index 9c486480..375ace93 100644 Binary files a/master/doctrees/functionlib/custom_op/fft.doctree and b/master/doctrees/functionlib/custom_op/fft.doctree differ diff --git a/master/doctrees/functionlib/custom_op/ifft.doctree b/master/doctrees/functionlib/custom_op/ifft.doctree index d45872f1..33a18b0a 100644 Binary files a/master/doctrees/functionlib/custom_op/ifft.doctree and b/master/doctrees/functionlib/custom_op/ifft.doctree differ diff --git a/master/doctrees/functionlib/custom_op/index.doctree b/master/doctrees/functionlib/custom_op/index.doctree index dd44f926..b64eeca2 100644 Binary files a/master/doctrees/functionlib/custom_op/index.doctree and b/master/doctrees/functionlib/custom_op/index.doctree differ diff --git a/master/doctrees/functionlib/dsplib/abs.doctree b/master/doctrees/functionlib/dsplib/abs.doctree index 3dff2d3e..58f1133f 100644 Binary files a/master/doctrees/functionlib/dsplib/abs.doctree and b/master/doctrees/functionlib/dsplib/abs.doctree differ diff --git a/master/doctrees/functionlib/dsplib/absgrad.doctree b/master/doctrees/functionlib/dsplib/absgrad.doctree index c70bb91f..7c4574eb 100644 Binary files a/master/doctrees/functionlib/dsplib/absgrad.doctree and b/master/doctrees/functionlib/dsplib/absgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/activation.doctree b/master/doctrees/functionlib/dsplib/activation.doctree index afedab4d..6ff39087 100644 Binary files a/master/doctrees/functionlib/dsplib/activation.doctree and b/master/doctrees/functionlib/dsplib/activation.doctree differ diff --git a/master/doctrees/functionlib/dsplib/activation_grad.doctree b/master/doctrees/functionlib/dsplib/activation_grad.doctree index 3caaa9f5..c6850324 100644 Binary files a/master/doctrees/functionlib/dsplib/activation_grad.doctree and b/master/doctrees/functionlib/dsplib/activation_grad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/adam.doctree b/master/doctrees/functionlib/dsplib/adam.doctree index 29f1f517..2751f5fd 100644 Binary files a/master/doctrees/functionlib/dsplib/adam.doctree and b/master/doctrees/functionlib/dsplib/adam.doctree differ diff --git a/master/doctrees/functionlib/dsplib/adamweightdecay.doctree b/master/doctrees/functionlib/dsplib/adamweightdecay.doctree index 2b9ddba1..e75b5da4 100644 Binary files a/master/doctrees/functionlib/dsplib/adamweightdecay.doctree and b/master/doctrees/functionlib/dsplib/adamweightdecay.doctree differ diff --git a/master/doctrees/functionlib/dsplib/adder.doctree b/master/doctrees/functionlib/dsplib/adder.doctree index 749b2e6d..d4053ac3 100644 Binary files a/master/doctrees/functionlib/dsplib/adder.doctree and b/master/doctrees/functionlib/dsplib/adder.doctree differ diff --git a/master/doctrees/functionlib/dsplib/addfusion.doctree b/master/doctrees/functionlib/dsplib/addfusion.doctree index 17493b65..35634a07 100644 Binary files a/master/doctrees/functionlib/dsplib/addfusion.doctree and b/master/doctrees/functionlib/dsplib/addfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/addgrad.doctree b/master/doctrees/functionlib/dsplib/addgrad.doctree index 49fc4873..22fab4c1 100644 Binary files a/master/doctrees/functionlib/dsplib/addgrad.doctree and b/master/doctrees/functionlib/dsplib/addgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/addn.doctree b/master/doctrees/functionlib/dsplib/addn.doctree index 81375bbf..c43688a5 100644 Binary files a/master/doctrees/functionlib/dsplib/addn.doctree and b/master/doctrees/functionlib/dsplib/addn.doctree differ diff --git a/master/doctrees/functionlib/dsplib/affine.doctree b/master/doctrees/functionlib/dsplib/affine.doctree index ce66fab2..ad52d8a1 100644 Binary files a/master/doctrees/functionlib/dsplib/affine.doctree and b/master/doctrees/functionlib/dsplib/affine.doctree differ diff --git a/master/doctrees/functionlib/dsplib/all.doctree b/master/doctrees/functionlib/dsplib/all.doctree index 5b5841d3..94ab2cbc 100644 Binary files a/master/doctrees/functionlib/dsplib/all.doctree and b/master/doctrees/functionlib/dsplib/all.doctree differ diff --git a/master/doctrees/functionlib/dsplib/allgather.doctree b/master/doctrees/functionlib/dsplib/allgather.doctree index 913a20ed..7a57afde 100644 Binary files a/master/doctrees/functionlib/dsplib/allgather.doctree and b/master/doctrees/functionlib/dsplib/allgather.doctree differ diff --git a/master/doctrees/functionlib/dsplib/apply_momentum.doctree b/master/doctrees/functionlib/dsplib/apply_momentum.doctree new file mode 100644 index 00000000..464d1c39 Binary files /dev/null and b/master/doctrees/functionlib/dsplib/apply_momentum.doctree differ diff --git a/master/doctrees/functionlib/dsplib/applymomentum.doctree b/master/doctrees/functionlib/dsplib/applymomentum.doctree deleted file mode 100644 index 797e0150..00000000 Binary files a/master/doctrees/functionlib/dsplib/applymomentum.doctree and /dev/null differ diff --git a/master/doctrees/functionlib/dsplib/argmax.doctree b/master/doctrees/functionlib/dsplib/argmax.doctree index 88bf7022..62714c13 100644 Binary files a/master/doctrees/functionlib/dsplib/argmax.doctree and b/master/doctrees/functionlib/dsplib/argmax.doctree differ diff --git a/master/doctrees/functionlib/dsplib/argmin.doctree b/master/doctrees/functionlib/dsplib/argmin.doctree index 8781de04..d1986b29 100644 Binary files a/master/doctrees/functionlib/dsplib/argmin.doctree and b/master/doctrees/functionlib/dsplib/argmin.doctree differ diff --git a/master/doctrees/functionlib/dsplib/assert.doctree b/master/doctrees/functionlib/dsplib/assert.doctree index ea6d3b42..38745b1d 100644 Binary files a/master/doctrees/functionlib/dsplib/assert.doctree and b/master/doctrees/functionlib/dsplib/assert.doctree differ diff --git a/master/doctrees/functionlib/dsplib/assign.doctree b/master/doctrees/functionlib/dsplib/assign.doctree index be5051f2..355c8930 100644 Binary files a/master/doctrees/functionlib/dsplib/assign.doctree and b/master/doctrees/functionlib/dsplib/assign.doctree differ diff --git a/master/doctrees/functionlib/dsplib/assignadd.doctree b/master/doctrees/functionlib/dsplib/assignadd.doctree index 2e9bc465..fd012906 100644 Binary files a/master/doctrees/functionlib/dsplib/assignadd.doctree and b/master/doctrees/functionlib/dsplib/assignadd.doctree differ diff --git a/master/doctrees/functionlib/dsplib/attention.doctree b/master/doctrees/functionlib/dsplib/attention.doctree index 5b878b82..f36b13d2 100644 Binary files a/master/doctrees/functionlib/dsplib/attention.doctree and b/master/doctrees/functionlib/dsplib/attention.doctree differ diff --git a/master/doctrees/functionlib/dsplib/audio_spectrogram.doctree b/master/doctrees/functionlib/dsplib/audio_spectrogram.doctree index d2b7355e..181b9a40 100644 Binary files a/master/doctrees/functionlib/dsplib/audio_spectrogram.doctree and b/master/doctrees/functionlib/dsplib/audio_spectrogram.doctree differ diff --git a/master/doctrees/functionlib/dsplib/avgpooling.doctree b/master/doctrees/functionlib/dsplib/avgpooling.doctree index 984b2cf3..82ddd3a8 100644 Binary files a/master/doctrees/functionlib/dsplib/avgpooling.doctree and b/master/doctrees/functionlib/dsplib/avgpooling.doctree differ diff --git a/master/doctrees/functionlib/dsplib/avgpoolinggrad.doctree b/master/doctrees/functionlib/dsplib/avgpoolinggrad.doctree index f6901796..cc391310 100644 Binary files a/master/doctrees/functionlib/dsplib/avgpoolinggrad.doctree and b/master/doctrees/functionlib/dsplib/avgpoolinggrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/batchnorm.doctree b/master/doctrees/functionlib/dsplib/batchnorm.doctree index 9bad90de..2778edc5 100644 Binary files a/master/doctrees/functionlib/dsplib/batchnorm.doctree and b/master/doctrees/functionlib/dsplib/batchnorm.doctree differ diff --git a/master/doctrees/functionlib/dsplib/batchnormgrad.doctree b/master/doctrees/functionlib/dsplib/batchnormgrad.doctree index efd93646..57c946d3 100644 Binary files a/master/doctrees/functionlib/dsplib/batchnormgrad.doctree and b/master/doctrees/functionlib/dsplib/batchnormgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/batchtospace.doctree b/master/doctrees/functionlib/dsplib/batchtospace.doctree index abe73409..2db792d7 100644 Binary files a/master/doctrees/functionlib/dsplib/batchtospace.doctree and b/master/doctrees/functionlib/dsplib/batchtospace.doctree differ diff --git a/master/doctrees/functionlib/dsplib/batchtospacend.doctree b/master/doctrees/functionlib/dsplib/batchtospacend.doctree index 863b26fe..44fcbddf 100644 Binary files a/master/doctrees/functionlib/dsplib/batchtospacend.doctree and b/master/doctrees/functionlib/dsplib/batchtospacend.doctree differ diff --git a/master/doctrees/functionlib/dsplib/biasadd.doctree b/master/doctrees/functionlib/dsplib/biasadd.doctree index de4c0ab3..23e10eba 100644 Binary files a/master/doctrees/functionlib/dsplib/biasadd.doctree and b/master/doctrees/functionlib/dsplib/biasadd.doctree differ diff --git a/master/doctrees/functionlib/dsplib/biasaddgrad.doctree b/master/doctrees/functionlib/dsplib/biasaddgrad.doctree index 01c30153..10b4bb5a 100644 Binary files a/master/doctrees/functionlib/dsplib/biasaddgrad.doctree and b/master/doctrees/functionlib/dsplib/biasaddgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/binarycrossentropy.doctree b/master/doctrees/functionlib/dsplib/binarycrossentropy.doctree index ec09ae2c..4ab81151 100644 Binary files a/master/doctrees/functionlib/dsplib/binarycrossentropy.doctree and b/master/doctrees/functionlib/dsplib/binarycrossentropy.doctree differ diff --git a/master/doctrees/functionlib/dsplib/binarycrossentropygrad.doctree b/master/doctrees/functionlib/dsplib/binarycrossentropygrad.doctree index e38d08d3..cd1877ac 100644 Binary files a/master/doctrees/functionlib/dsplib/binarycrossentropygrad.doctree and b/master/doctrees/functionlib/dsplib/binarycrossentropygrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/broadcastto.doctree b/master/doctrees/functionlib/dsplib/broadcastto.doctree index 006b6a23..528aec96 100644 Binary files a/master/doctrees/functionlib/dsplib/broadcastto.doctree and b/master/doctrees/functionlib/dsplib/broadcastto.doctree differ diff --git a/master/doctrees/functionlib/dsplib/call.doctree b/master/doctrees/functionlib/dsplib/call.doctree index 4902cbdf..4c237f34 100644 Binary files a/master/doctrees/functionlib/dsplib/call.doctree and b/master/doctrees/functionlib/dsplib/call.doctree differ diff --git a/master/doctrees/functionlib/dsplib/cast.doctree b/master/doctrees/functionlib/dsplib/cast.doctree index a85cf0dd..6628cd6f 100644 Binary files a/master/doctrees/functionlib/dsplib/cast.doctree and b/master/doctrees/functionlib/dsplib/cast.doctree differ diff --git a/master/doctrees/functionlib/dsplib/ceil.doctree b/master/doctrees/functionlib/dsplib/ceil.doctree index 61385e1f..e539fb60 100644 Binary files a/master/doctrees/functionlib/dsplib/ceil.doctree and b/master/doctrees/functionlib/dsplib/ceil.doctree differ diff --git a/master/doctrees/functionlib/dsplib/clip.doctree b/master/doctrees/functionlib/dsplib/clip.doctree index 85ce06c4..ccd94f37 100644 Binary files a/master/doctrees/functionlib/dsplib/clip.doctree and b/master/doctrees/functionlib/dsplib/clip.doctree differ diff --git a/master/doctrees/functionlib/dsplib/concat.doctree b/master/doctrees/functionlib/dsplib/concat.doctree index 604c3793..51a374c8 100644 Binary files a/master/doctrees/functionlib/dsplib/concat.doctree and b/master/doctrees/functionlib/dsplib/concat.doctree differ diff --git a/master/doctrees/functionlib/dsplib/constant_of_shape.doctree b/master/doctrees/functionlib/dsplib/constant_of_shape.doctree index 3f03e41d..7ee5b674 100644 Binary files a/master/doctrees/functionlib/dsplib/constant_of_shape.doctree and b/master/doctrees/functionlib/dsplib/constant_of_shape.doctree differ diff --git a/master/doctrees/functionlib/dsplib/conv2d.doctree b/master/doctrees/functionlib/dsplib/conv2d.doctree index 56560bb7..7dbad7b3 100644 Binary files a/master/doctrees/functionlib/dsplib/conv2d.doctree and b/master/doctrees/functionlib/dsplib/conv2d.doctree differ diff --git a/master/doctrees/functionlib/dsplib/conv2d_transpose.doctree b/master/doctrees/functionlib/dsplib/conv2d_transpose.doctree index 52842319..c9bc8d03 100644 Binary files a/master/doctrees/functionlib/dsplib/conv2d_transpose.doctree and b/master/doctrees/functionlib/dsplib/conv2d_transpose.doctree differ diff --git a/master/doctrees/functionlib/dsplib/conv2dbackpropfilterfusion.doctree b/master/doctrees/functionlib/dsplib/conv2dbackpropfilterfusion.doctree index 317aa9cd..0c23536a 100644 Binary files a/master/doctrees/functionlib/dsplib/conv2dbackpropfilterfusion.doctree and b/master/doctrees/functionlib/dsplib/conv2dbackpropfilterfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/conv2dbackpropinputfusion.doctree b/master/doctrees/functionlib/dsplib/conv2dbackpropinputfusion.doctree index 88f64901..e02f2f7f 100644 Binary files a/master/doctrees/functionlib/dsplib/conv2dbackpropinputfusion.doctree and b/master/doctrees/functionlib/dsplib/conv2dbackpropinputfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/cos.doctree b/master/doctrees/functionlib/dsplib/cos.doctree index ca9d34bb..50fe36ed 100644 Binary files a/master/doctrees/functionlib/dsplib/cos.doctree and b/master/doctrees/functionlib/dsplib/cos.doctree differ diff --git a/master/doctrees/functionlib/dsplib/crop.doctree b/master/doctrees/functionlib/dsplib/crop.doctree index 124fc193..322a0df8 100644 Binary files a/master/doctrees/functionlib/dsplib/crop.doctree and b/master/doctrees/functionlib/dsplib/crop.doctree differ diff --git a/master/doctrees/functionlib/dsplib/crop_and_resize.doctree b/master/doctrees/functionlib/dsplib/crop_and_resize.doctree index 34c02847..fb28e96a 100644 Binary files a/master/doctrees/functionlib/dsplib/crop_and_resize.doctree and b/master/doctrees/functionlib/dsplib/crop_and_resize.doctree differ diff --git a/master/doctrees/functionlib/dsplib/cumsum.doctree b/master/doctrees/functionlib/dsplib/cumsum.doctree index 5df0cebb..1b0b158f 100644 Binary files a/master/doctrees/functionlib/dsplib/cumsum.doctree and b/master/doctrees/functionlib/dsplib/cumsum.doctree differ diff --git a/master/doctrees/functionlib/dsplib/custom.doctree b/master/doctrees/functionlib/dsplib/custom.doctree index ed95f60c..f7a56734 100644 Binary files a/master/doctrees/functionlib/dsplib/custom.doctree and b/master/doctrees/functionlib/dsplib/custom.doctree differ diff --git a/master/doctrees/functionlib/dsplib/customextractfeatures.doctree b/master/doctrees/functionlib/dsplib/customextractfeatures.doctree index f8ff2467..ceec7713 100644 Binary files a/master/doctrees/functionlib/dsplib/customextractfeatures.doctree and b/master/doctrees/functionlib/dsplib/customextractfeatures.doctree differ diff --git a/master/doctrees/functionlib/dsplib/customnormalize.doctree b/master/doctrees/functionlib/dsplib/customnormalize.doctree index 0fbb7dc8..b40bb3ea 100644 Binary files a/master/doctrees/functionlib/dsplib/customnormalize.doctree and b/master/doctrees/functionlib/dsplib/customnormalize.doctree differ diff --git a/master/doctrees/functionlib/dsplib/custompredict.doctree b/master/doctrees/functionlib/dsplib/custompredict.doctree index d7ad419b..0ddecd20 100644 Binary files a/master/doctrees/functionlib/dsplib/custompredict.doctree and b/master/doctrees/functionlib/dsplib/custompredict.doctree differ diff --git a/master/doctrees/functionlib/dsplib/deconvgradfilter.doctree b/master/doctrees/functionlib/dsplib/deconvgradfilter.doctree index b19b629d..b6e0f806 100644 Binary files a/master/doctrees/functionlib/dsplib/deconvgradfilter.doctree and b/master/doctrees/functionlib/dsplib/deconvgradfilter.doctree differ diff --git a/master/doctrees/functionlib/dsplib/depend.doctree b/master/doctrees/functionlib/dsplib/depend.doctree index e80ae384..ac3a1ac9 100644 Binary files a/master/doctrees/functionlib/dsplib/depend.doctree and b/master/doctrees/functionlib/dsplib/depend.doctree differ diff --git a/master/doctrees/functionlib/dsplib/depthtospace.doctree b/master/doctrees/functionlib/dsplib/depthtospace.doctree index fad7b8a3..bc546d21 100644 Binary files a/master/doctrees/functionlib/dsplib/depthtospace.doctree and b/master/doctrees/functionlib/dsplib/depthtospace.doctree differ diff --git a/master/doctrees/functionlib/dsplib/detection_post_process.doctree b/master/doctrees/functionlib/dsplib/detection_post_process.doctree index 5a2a4867..dca5a90a 100644 Binary files a/master/doctrees/functionlib/dsplib/detection_post_process.doctree and b/master/doctrees/functionlib/dsplib/detection_post_process.doctree differ diff --git a/master/doctrees/functionlib/dsplib/div_fusion.doctree b/master/doctrees/functionlib/dsplib/div_fusion.doctree index 4e755238..8c8b67ef 100644 Binary files a/master/doctrees/functionlib/dsplib/div_fusion.doctree and b/master/doctrees/functionlib/dsplib/div_fusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/divgrad.doctree b/master/doctrees/functionlib/dsplib/divgrad.doctree index 6131e1e3..337103b3 100644 Binary files a/master/doctrees/functionlib/dsplib/divgrad.doctree and b/master/doctrees/functionlib/dsplib/divgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/dropout.doctree b/master/doctrees/functionlib/dsplib/dropout.doctree index 22f3a8fa..b45bbad0 100644 Binary files a/master/doctrees/functionlib/dsplib/dropout.doctree and b/master/doctrees/functionlib/dsplib/dropout.doctree differ diff --git a/master/doctrees/functionlib/dsplib/dropoutgrad.doctree b/master/doctrees/functionlib/dsplib/dropoutgrad.doctree index 102335c4..38469568 100644 Binary files a/master/doctrees/functionlib/dsplib/dropoutgrad.doctree and b/master/doctrees/functionlib/dsplib/dropoutgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/dsplib_index.doctree b/master/doctrees/functionlib/dsplib/dsplib_index.doctree index 7f6e1859..2f1e008f 100644 Binary files a/master/doctrees/functionlib/dsplib/dsplib_index.doctree and b/master/doctrees/functionlib/dsplib/dsplib_index.doctree differ diff --git a/master/doctrees/functionlib/dsplib/dynamicquant.doctree b/master/doctrees/functionlib/dsplib/dynamicquant.doctree index caee1c7e..63b8b171 100644 Binary files a/master/doctrees/functionlib/dsplib/dynamicquant.doctree and b/master/doctrees/functionlib/dsplib/dynamicquant.doctree differ diff --git a/master/doctrees/functionlib/dsplib/eltwise.doctree b/master/doctrees/functionlib/dsplib/eltwise.doctree index 0e624447..93f0ed0b 100644 Binary files a/master/doctrees/functionlib/dsplib/eltwise.doctree and b/master/doctrees/functionlib/dsplib/eltwise.doctree differ diff --git a/master/doctrees/functionlib/dsplib/elu.doctree b/master/doctrees/functionlib/dsplib/elu.doctree index 53a96701..812a39e4 100644 Binary files a/master/doctrees/functionlib/dsplib/elu.doctree and b/master/doctrees/functionlib/dsplib/elu.doctree differ diff --git a/master/doctrees/functionlib/dsplib/embeddinglookup.doctree b/master/doctrees/functionlib/dsplib/embeddinglookup.doctree index d2ed94b3..b2798d7d 100644 Binary files a/master/doctrees/functionlib/dsplib/embeddinglookup.doctree and b/master/doctrees/functionlib/dsplib/embeddinglookup.doctree differ diff --git a/master/doctrees/functionlib/dsplib/equal.doctree b/master/doctrees/functionlib/dsplib/equal.doctree index cd5d0bfd..d83f5116 100644 Binary files a/master/doctrees/functionlib/dsplib/equal.doctree and b/master/doctrees/functionlib/dsplib/equal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/erf.doctree b/master/doctrees/functionlib/dsplib/erf.doctree index cfb40b06..57e92e3e 100644 Binary files a/master/doctrees/functionlib/dsplib/erf.doctree and b/master/doctrees/functionlib/dsplib/erf.doctree differ diff --git a/master/doctrees/functionlib/dsplib/expand_dims.doctree b/master/doctrees/functionlib/dsplib/expand_dims.doctree index 6887337d..d1dc1911 100644 Binary files a/master/doctrees/functionlib/dsplib/expand_dims.doctree and b/master/doctrees/functionlib/dsplib/expand_dims.doctree differ diff --git a/master/doctrees/functionlib/dsplib/expfusion.doctree b/master/doctrees/functionlib/dsplib/expfusion.doctree index 92d2de0e..50225cc5 100644 Binary files a/master/doctrees/functionlib/dsplib/expfusion.doctree and b/master/doctrees/functionlib/dsplib/expfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars.doctree b/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars.doctree index fdb799bc..e08cd965 100644 Binary files a/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars.doctree and b/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars_per_channel.doctree b/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars_per_channel.doctree index 533b7ca6..7b090d8a 100644 Binary files a/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars_per_channel.doctree and b/master/doctrees/functionlib/dsplib/fake_quant_with_min_max_vars_per_channel.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fftimag.doctree b/master/doctrees/functionlib/dsplib/fftimag.doctree index 36c6b48f..ccc0e75e 100644 Binary files a/master/doctrees/functionlib/dsplib/fftimag.doctree and b/master/doctrees/functionlib/dsplib/fftimag.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fftreal.doctree b/master/doctrees/functionlib/dsplib/fftreal.doctree index 39cea848..3563e25f 100644 Binary files a/master/doctrees/functionlib/dsplib/fftreal.doctree and b/master/doctrees/functionlib/dsplib/fftreal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fill.doctree b/master/doctrees/functionlib/dsplib/fill.doctree index 4304c4a2..f85b3451 100644 Binary files a/master/doctrees/functionlib/dsplib/fill.doctree and b/master/doctrees/functionlib/dsplib/fill.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fillv2.doctree b/master/doctrees/functionlib/dsplib/fillv2.doctree index a29189ad..e5fec892 100644 Binary files a/master/doctrees/functionlib/dsplib/fillv2.doctree and b/master/doctrees/functionlib/dsplib/fillv2.doctree differ diff --git a/master/doctrees/functionlib/dsplib/flatten.doctree b/master/doctrees/functionlib/dsplib/flatten.doctree index c3bb1b3a..cd6c2a5a 100644 Binary files a/master/doctrees/functionlib/dsplib/flatten.doctree and b/master/doctrees/functionlib/dsplib/flatten.doctree differ diff --git a/master/doctrees/functionlib/dsplib/flattengrad.doctree b/master/doctrees/functionlib/dsplib/flattengrad.doctree index 587f7424..eca1a626 100644 Binary files a/master/doctrees/functionlib/dsplib/flattengrad.doctree and b/master/doctrees/functionlib/dsplib/flattengrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/floor.doctree b/master/doctrees/functionlib/dsplib/floor.doctree index 524eb94c..60b92b34 100644 Binary files a/master/doctrees/functionlib/dsplib/floor.doctree and b/master/doctrees/functionlib/dsplib/floor.doctree differ diff --git a/master/doctrees/functionlib/dsplib/floordiv.doctree b/master/doctrees/functionlib/dsplib/floordiv.doctree index 6d369782..c62c65f5 100644 Binary files a/master/doctrees/functionlib/dsplib/floordiv.doctree and b/master/doctrees/functionlib/dsplib/floordiv.doctree differ diff --git a/master/doctrees/functionlib/dsplib/floormod.doctree b/master/doctrees/functionlib/dsplib/floormod.doctree index 0dd8b5da..547d093d 100644 Binary files a/master/doctrees/functionlib/dsplib/floormod.doctree and b/master/doctrees/functionlib/dsplib/floormod.doctree differ diff --git a/master/doctrees/functionlib/dsplib/formattranspose.doctree b/master/doctrees/functionlib/dsplib/formattranspose.doctree index c3b163c4..e56fefd1 100644 Binary files a/master/doctrees/functionlib/dsplib/formattranspose.doctree and b/master/doctrees/functionlib/dsplib/formattranspose.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fullconnection.doctree b/master/doctrees/functionlib/dsplib/fullconnection.doctree index d06561b3..0b399966 100644 Binary files a/master/doctrees/functionlib/dsplib/fullconnection.doctree and b/master/doctrees/functionlib/dsplib/fullconnection.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fusedbatchnorm.doctree b/master/doctrees/functionlib/dsplib/fusedbatchnorm.doctree index 5401cb5d..7ace54f1 100644 Binary files a/master/doctrees/functionlib/dsplib/fusedbatchnorm.doctree and b/master/doctrees/functionlib/dsplib/fusedbatchnorm.doctree differ diff --git a/master/doctrees/functionlib/dsplib/gather.doctree b/master/doctrees/functionlib/dsplib/gather.doctree index ef671259..99fa0cfa 100644 Binary files a/master/doctrees/functionlib/dsplib/gather.doctree and b/master/doctrees/functionlib/dsplib/gather.doctree differ diff --git a/master/doctrees/functionlib/dsplib/gather_nd.doctree b/master/doctrees/functionlib/dsplib/gather_nd.doctree index 9e0ef3d2..e8defdcf 100644 Binary files a/master/doctrees/functionlib/dsplib/gather_nd.doctree and b/master/doctrees/functionlib/dsplib/gather_nd.doctree differ diff --git a/master/doctrees/functionlib/dsplib/gatherd.doctree b/master/doctrees/functionlib/dsplib/gatherd.doctree index 97d533c1..976f9375 100644 Binary files a/master/doctrees/functionlib/dsplib/gatherd.doctree and b/master/doctrees/functionlib/dsplib/gatherd.doctree differ diff --git a/master/doctrees/functionlib/dsplib/genop.doctree b/master/doctrees/functionlib/dsplib/genop.doctree index 31e3e19b..6f0e094d 100644 Binary files a/master/doctrees/functionlib/dsplib/genop.doctree and b/master/doctrees/functionlib/dsplib/genop.doctree differ diff --git a/master/doctrees/functionlib/dsplib/glu.doctree b/master/doctrees/functionlib/dsplib/glu.doctree index a3a23904..a977f9ba 100644 Binary files a/master/doctrees/functionlib/dsplib/glu.doctree and b/master/doctrees/functionlib/dsplib/glu.doctree differ diff --git a/master/doctrees/functionlib/dsplib/greater.doctree b/master/doctrees/functionlib/dsplib/greater.doctree index 3f757592..3a419e77 100644 Binary files a/master/doctrees/functionlib/dsplib/greater.doctree and b/master/doctrees/functionlib/dsplib/greater.doctree differ diff --git a/master/doctrees/functionlib/dsplib/greaterequal.doctree b/master/doctrees/functionlib/dsplib/greaterequal.doctree index af29f7f4..e494cd9f 100644 Binary files a/master/doctrees/functionlib/dsplib/greaterequal.doctree and b/master/doctrees/functionlib/dsplib/greaterequal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/groupnormfusion.doctree b/master/doctrees/functionlib/dsplib/groupnormfusion.doctree index b4341b41..45f9e8c5 100644 Binary files a/master/doctrees/functionlib/dsplib/groupnormfusion.doctree and b/master/doctrees/functionlib/dsplib/groupnormfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/gru.doctree b/master/doctrees/functionlib/dsplib/gru.doctree index 4b74edec..91d0b474 100644 Binary files a/master/doctrees/functionlib/dsplib/gru.doctree and b/master/doctrees/functionlib/dsplib/gru.doctree differ diff --git a/master/doctrees/functionlib/dsplib/hashtablelookup.doctree b/master/doctrees/functionlib/dsplib/hashtablelookup.doctree index a0c44f4a..4a597095 100644 Binary files a/master/doctrees/functionlib/dsplib/hashtablelookup.doctree and b/master/doctrees/functionlib/dsplib/hashtablelookup.doctree differ diff --git a/master/doctrees/functionlib/dsplib/instancenorm.doctree b/master/doctrees/functionlib/dsplib/instancenorm.doctree index beb01ded..4e7c657e 100644 Binary files a/master/doctrees/functionlib/dsplib/instancenorm.doctree and b/master/doctrees/functionlib/dsplib/instancenorm.doctree differ diff --git a/master/doctrees/functionlib/dsplib/invertpermutation.doctree b/master/doctrees/functionlib/dsplib/invertpermutation.doctree index fabf159f..6147f2f1 100644 Binary files a/master/doctrees/functionlib/dsplib/invertpermutation.doctree and b/master/doctrees/functionlib/dsplib/invertpermutation.doctree differ diff --git a/master/doctrees/functionlib/dsplib/isfinite.doctree b/master/doctrees/functionlib/dsplib/isfinite.doctree index abcce0cc..f0b6f42f 100644 Binary files a/master/doctrees/functionlib/dsplib/isfinite.doctree and b/master/doctrees/functionlib/dsplib/isfinite.doctree differ diff --git a/master/doctrees/functionlib/dsplib/l2norm.doctree b/master/doctrees/functionlib/dsplib/l2norm.doctree index 8dd61100..aa7d98f2 100644 Binary files a/master/doctrees/functionlib/dsplib/l2norm.doctree and b/master/doctrees/functionlib/dsplib/l2norm.doctree differ diff --git a/master/doctrees/functionlib/dsplib/layernormfusion.doctree b/master/doctrees/functionlib/dsplib/layernormfusion.doctree index 74d687ea..8ca47731 100644 Binary files a/master/doctrees/functionlib/dsplib/layernormfusion.doctree and b/master/doctrees/functionlib/dsplib/layernormfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/layernormgrad.doctree b/master/doctrees/functionlib/dsplib/layernormgrad.doctree index cee7e6e9..2701323d 100644 Binary files a/master/doctrees/functionlib/dsplib/layernormgrad.doctree and b/master/doctrees/functionlib/dsplib/layernormgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/leaky_relu.doctree b/master/doctrees/functionlib/dsplib/leaky_relu.doctree index d7adaa7a..40171227 100644 Binary files a/master/doctrees/functionlib/dsplib/leaky_relu.doctree and b/master/doctrees/functionlib/dsplib/leaky_relu.doctree differ diff --git a/master/doctrees/functionlib/dsplib/less.doctree b/master/doctrees/functionlib/dsplib/less.doctree index 0cca2891..3b04fb76 100644 Binary files a/master/doctrees/functionlib/dsplib/less.doctree and b/master/doctrees/functionlib/dsplib/less.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lessequal.doctree b/master/doctrees/functionlib/dsplib/lessequal.doctree index f4e5b90c..7fadf4ac 100644 Binary files a/master/doctrees/functionlib/dsplib/lessequal.doctree and b/master/doctrees/functionlib/dsplib/lessequal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/linspace.doctree b/master/doctrees/functionlib/dsplib/linspace.doctree index dede35b9..f81c7de6 100644 Binary files a/master/doctrees/functionlib/dsplib/linspace.doctree and b/master/doctrees/functionlib/dsplib/linspace.doctree differ diff --git a/master/doctrees/functionlib/dsplib/log.doctree b/master/doctrees/functionlib/dsplib/log.doctree index c9417e1b..08427958 100644 Binary files a/master/doctrees/functionlib/dsplib/log.doctree and b/master/doctrees/functionlib/dsplib/log.doctree differ diff --git a/master/doctrees/functionlib/dsplib/log1p.doctree b/master/doctrees/functionlib/dsplib/log1p.doctree index f6a0ad2e..19600321 100644 Binary files a/master/doctrees/functionlib/dsplib/log1p.doctree and b/master/doctrees/functionlib/dsplib/log1p.doctree differ diff --git a/master/doctrees/functionlib/dsplib/loggrad.doctree b/master/doctrees/functionlib/dsplib/loggrad.doctree index 0d408afa..ee85aec2 100644 Binary files a/master/doctrees/functionlib/dsplib/loggrad.doctree and b/master/doctrees/functionlib/dsplib/loggrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/logical_not.doctree b/master/doctrees/functionlib/dsplib/logical_not.doctree index 43341a65..bf21840a 100644 Binary files a/master/doctrees/functionlib/dsplib/logical_not.doctree and b/master/doctrees/functionlib/dsplib/logical_not.doctree differ diff --git a/master/doctrees/functionlib/dsplib/logical_or.doctree b/master/doctrees/functionlib/dsplib/logical_or.doctree index c7eeef35..572e1667 100644 Binary files a/master/doctrees/functionlib/dsplib/logical_or.doctree and b/master/doctrees/functionlib/dsplib/logical_or.doctree differ diff --git a/master/doctrees/functionlib/dsplib/logicaland.doctree b/master/doctrees/functionlib/dsplib/logicaland.doctree index 7b80d5db..c65544e4 100644 Binary files a/master/doctrees/functionlib/dsplib/logicaland.doctree and b/master/doctrees/functionlib/dsplib/logicaland.doctree differ diff --git a/master/doctrees/functionlib/dsplib/logsoftmax.doctree b/master/doctrees/functionlib/dsplib/logsoftmax.doctree index edeb8cfe..979e131a 100644 Binary files a/master/doctrees/functionlib/dsplib/logsoftmax.doctree and b/master/doctrees/functionlib/dsplib/logsoftmax.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lpnormalization.doctree b/master/doctrees/functionlib/dsplib/lpnormalization.doctree index a476c433..4674b802 100644 Binary files a/master/doctrees/functionlib/dsplib/lpnormalization.doctree and b/master/doctrees/functionlib/dsplib/lpnormalization.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lrn.doctree b/master/doctrees/functionlib/dsplib/lrn.doctree index 5bc42560..5b9b6e1d 100644 Binary files a/master/doctrees/functionlib/dsplib/lrn.doctree and b/master/doctrees/functionlib/dsplib/lrn.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lsh_projection.doctree b/master/doctrees/functionlib/dsplib/lsh_projection.doctree index 1aefcf2a..989ee451 100644 Binary files a/master/doctrees/functionlib/dsplib/lsh_projection.doctree and b/master/doctrees/functionlib/dsplib/lsh_projection.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lstm.doctree b/master/doctrees/functionlib/dsplib/lstm.doctree index b55ac65b..60a1571b 100644 Binary files a/master/doctrees/functionlib/dsplib/lstm.doctree and b/master/doctrees/functionlib/dsplib/lstm.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lstmgrad.doctree b/master/doctrees/functionlib/dsplib/lstmgrad.doctree index f0c822d2..47d8ca99 100644 Binary files a/master/doctrees/functionlib/dsplib/lstmgrad.doctree and b/master/doctrees/functionlib/dsplib/lstmgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lstmgraddata.doctree b/master/doctrees/functionlib/dsplib/lstmgraddata.doctree index e32b22ac..25ec18f4 100644 Binary files a/master/doctrees/functionlib/dsplib/lstmgraddata.doctree and b/master/doctrees/functionlib/dsplib/lstmgraddata.doctree differ diff --git a/master/doctrees/functionlib/dsplib/lstmgradweight.doctree b/master/doctrees/functionlib/dsplib/lstmgradweight.doctree index c3b3af8b..846e9536 100644 Binary files a/master/doctrees/functionlib/dsplib/lstmgradweight.doctree and b/master/doctrees/functionlib/dsplib/lstmgradweight.doctree differ diff --git a/master/doctrees/functionlib/dsplib/matmulfusion.doctree b/master/doctrees/functionlib/dsplib/matmulfusion.doctree index b543602d..41e346a0 100644 Binary files a/master/doctrees/functionlib/dsplib/matmulfusion.doctree and b/master/doctrees/functionlib/dsplib/matmulfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/maximum.doctree b/master/doctrees/functionlib/dsplib/maximum.doctree index 03e0573f..1a10ed46 100644 Binary files a/master/doctrees/functionlib/dsplib/maximum.doctree and b/master/doctrees/functionlib/dsplib/maximum.doctree differ diff --git a/master/doctrees/functionlib/dsplib/maximumgrad.doctree b/master/doctrees/functionlib/dsplib/maximumgrad.doctree index d27922f8..59030121 100644 Binary files a/master/doctrees/functionlib/dsplib/maximumgrad.doctree and b/master/doctrees/functionlib/dsplib/maximumgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/maxpoolfusion.doctree b/master/doctrees/functionlib/dsplib/maxpoolfusion.doctree index 5ef39302..fe1085d2 100644 Binary files a/master/doctrees/functionlib/dsplib/maxpoolfusion.doctree and b/master/doctrees/functionlib/dsplib/maxpoolfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/maxpoolgrad.doctree b/master/doctrees/functionlib/dsplib/maxpoolgrad.doctree index cbbfe7b8..3f816ed2 100644 Binary files a/master/doctrees/functionlib/dsplib/maxpoolgrad.doctree and b/master/doctrees/functionlib/dsplib/maxpoolgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/mfcc.doctree b/master/doctrees/functionlib/dsplib/mfcc.doctree index 4fc2d1d7..894b0608 100644 Binary files a/master/doctrees/functionlib/dsplib/mfcc.doctree and b/master/doctrees/functionlib/dsplib/mfcc.doctree differ diff --git a/master/doctrees/functionlib/dsplib/minimum.doctree b/master/doctrees/functionlib/dsplib/minimum.doctree index bd08c877..3e43f858 100644 Binary files a/master/doctrees/functionlib/dsplib/minimum.doctree and b/master/doctrees/functionlib/dsplib/minimum.doctree differ diff --git a/master/doctrees/functionlib/dsplib/minimumgrad.doctree b/master/doctrees/functionlib/dsplib/minimumgrad.doctree index a3246f36..a7d778ce 100644 Binary files a/master/doctrees/functionlib/dsplib/minimumgrad.doctree and b/master/doctrees/functionlib/dsplib/minimumgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/mod.doctree b/master/doctrees/functionlib/dsplib/mod.doctree index 515dae9a..d63472d1 100644 Binary files a/master/doctrees/functionlib/dsplib/mod.doctree and b/master/doctrees/functionlib/dsplib/mod.doctree differ diff --git a/master/doctrees/functionlib/dsplib/mul.doctree b/master/doctrees/functionlib/dsplib/mul.doctree index 9119b07d..3bf860ae 100644 Binary files a/master/doctrees/functionlib/dsplib/mul.doctree and b/master/doctrees/functionlib/dsplib/mul.doctree differ diff --git a/master/doctrees/functionlib/dsplib/mulgrad.doctree b/master/doctrees/functionlib/dsplib/mulgrad.doctree index e90bbc99..1641aced 100644 Binary files a/master/doctrees/functionlib/dsplib/mulgrad.doctree and b/master/doctrees/functionlib/dsplib/mulgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/neg.doctree b/master/doctrees/functionlib/dsplib/neg.doctree index 66371c2f..d36044d2 100644 Binary files a/master/doctrees/functionlib/dsplib/neg.doctree and b/master/doctrees/functionlib/dsplib/neg.doctree differ diff --git a/master/doctrees/functionlib/dsplib/neg_grad.doctree b/master/doctrees/functionlib/dsplib/neg_grad.doctree index 3b865f43..386f3287 100644 Binary files a/master/doctrees/functionlib/dsplib/neg_grad.doctree and b/master/doctrees/functionlib/dsplib/neg_grad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/nllloss.doctree b/master/doctrees/functionlib/dsplib/nllloss.doctree index 375930d0..f772c717 100644 Binary files a/master/doctrees/functionlib/dsplib/nllloss.doctree and b/master/doctrees/functionlib/dsplib/nllloss.doctree differ diff --git a/master/doctrees/functionlib/dsplib/nlllossgrad.doctree b/master/doctrees/functionlib/dsplib/nlllossgrad.doctree index 44b9dfac..19104ac3 100644 Binary files a/master/doctrees/functionlib/dsplib/nlllossgrad.doctree and b/master/doctrees/functionlib/dsplib/nlllossgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/non_max_suppression.doctree b/master/doctrees/functionlib/dsplib/non_max_suppression.doctree index c5438def..1d4343e0 100644 Binary files a/master/doctrees/functionlib/dsplib/non_max_suppression.doctree and b/master/doctrees/functionlib/dsplib/non_max_suppression.doctree differ diff --git a/master/doctrees/functionlib/dsplib/nonzero.doctree b/master/doctrees/functionlib/dsplib/nonzero.doctree index 41d56cf8..dfacc172 100644 Binary files a/master/doctrees/functionlib/dsplib/nonzero.doctree and b/master/doctrees/functionlib/dsplib/nonzero.doctree differ diff --git a/master/doctrees/functionlib/dsplib/not_equal.doctree b/master/doctrees/functionlib/dsplib/not_equal.doctree index 2c777d02..70dcccb4 100644 Binary files a/master/doctrees/functionlib/dsplib/not_equal.doctree and b/master/doctrees/functionlib/dsplib/not_equal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/onehot.doctree b/master/doctrees/functionlib/dsplib/onehot.doctree index 8886b132..94e359da 100644 Binary files a/master/doctrees/functionlib/dsplib/onehot.doctree and b/master/doctrees/functionlib/dsplib/onehot.doctree differ diff --git a/master/doctrees/functionlib/dsplib/ones_like.doctree b/master/doctrees/functionlib/dsplib/ones_like.doctree index ef5ed5e8..8612a6db 100644 Binary files a/master/doctrees/functionlib/dsplib/ones_like.doctree and b/master/doctrees/functionlib/dsplib/ones_like.doctree differ diff --git a/master/doctrees/functionlib/dsplib/padfusion.doctree b/master/doctrees/functionlib/dsplib/padfusion.doctree index 9c22b2b1..96235dcb 100644 Binary files a/master/doctrees/functionlib/dsplib/padfusion.doctree and b/master/doctrees/functionlib/dsplib/padfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/partialfusion.doctree b/master/doctrees/functionlib/dsplib/partialfusion.doctree index 59fa16e4..7b13f42e 100644 Binary files a/master/doctrees/functionlib/dsplib/partialfusion.doctree and b/master/doctrees/functionlib/dsplib/partialfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/pow_fusion.doctree b/master/doctrees/functionlib/dsplib/pow_fusion.doctree index 0faee085..da26f0b9 100644 Binary files a/master/doctrees/functionlib/dsplib/pow_fusion.doctree and b/master/doctrees/functionlib/dsplib/pow_fusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/power_grad.doctree b/master/doctrees/functionlib/dsplib/power_grad.doctree index 18cb4e71..02dde4bc 100644 Binary files a/master/doctrees/functionlib/dsplib/power_grad.doctree and b/master/doctrees/functionlib/dsplib/power_grad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/prelufusion.doctree b/master/doctrees/functionlib/dsplib/prelufusion.doctree index 762a9662..064890fd 100644 Binary files a/master/doctrees/functionlib/dsplib/prelufusion.doctree and b/master/doctrees/functionlib/dsplib/prelufusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/priorbox.doctree b/master/doctrees/functionlib/dsplib/priorbox.doctree index a7f1dc64..0f714864 100644 Binary files a/master/doctrees/functionlib/dsplib/priorbox.doctree and b/master/doctrees/functionlib/dsplib/priorbox.doctree differ diff --git a/master/doctrees/functionlib/dsplib/quantdtypecast.doctree b/master/doctrees/functionlib/dsplib/quantdtypecast.doctree index 0ee0d365..3574b6fa 100644 Binary files a/master/doctrees/functionlib/dsplib/quantdtypecast.doctree and b/master/doctrees/functionlib/dsplib/quantdtypecast.doctree differ diff --git a/master/doctrees/functionlib/dsplib/raggedrange.doctree b/master/doctrees/functionlib/dsplib/raggedrange.doctree index ef8853d6..b52f8871 100644 Binary files a/master/doctrees/functionlib/dsplib/raggedrange.doctree and b/master/doctrees/functionlib/dsplib/raggedrange.doctree differ diff --git a/master/doctrees/functionlib/dsplib/random_normal.doctree b/master/doctrees/functionlib/dsplib/random_normal.doctree index 64467d16..774d0adb 100644 Binary files a/master/doctrees/functionlib/dsplib/random_normal.doctree and b/master/doctrees/functionlib/dsplib/random_normal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/random_standard_normal.doctree b/master/doctrees/functionlib/dsplib/random_standard_normal.doctree index 81f50bab..bbe3aead 100644 Binary files a/master/doctrees/functionlib/dsplib/random_standard_normal.doctree and b/master/doctrees/functionlib/dsplib/random_standard_normal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/range.doctree b/master/doctrees/functionlib/dsplib/range.doctree index b1ef0afb..8d644d02 100644 Binary files a/master/doctrees/functionlib/dsplib/range.doctree and b/master/doctrees/functionlib/dsplib/range.doctree differ diff --git a/master/doctrees/functionlib/dsplib/rank.doctree b/master/doctrees/functionlib/dsplib/rank.doctree index 0337fa78..057d3377 100644 Binary files a/master/doctrees/functionlib/dsplib/rank.doctree and b/master/doctrees/functionlib/dsplib/rank.doctree differ diff --git a/master/doctrees/functionlib/dsplib/real_div.doctree b/master/doctrees/functionlib/dsplib/real_div.doctree index 85b3acec..e149d770 100644 Binary files a/master/doctrees/functionlib/dsplib/real_div.doctree and b/master/doctrees/functionlib/dsplib/real_div.doctree differ diff --git a/master/doctrees/functionlib/dsplib/reciprocal.doctree b/master/doctrees/functionlib/dsplib/reciprocal.doctree index 63f61063..43408275 100644 Binary files a/master/doctrees/functionlib/dsplib/reciprocal.doctree and b/master/doctrees/functionlib/dsplib/reciprocal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/reduce.doctree b/master/doctrees/functionlib/dsplib/reduce.doctree index e2e11379..a692057a 100644 Binary files a/master/doctrees/functionlib/dsplib/reduce.doctree and b/master/doctrees/functionlib/dsplib/reduce.doctree differ diff --git a/master/doctrees/functionlib/dsplib/reducescatter.doctree b/master/doctrees/functionlib/dsplib/reducescatter.doctree index e575c736..e32dd9dc 100644 Binary files a/master/doctrees/functionlib/dsplib/reducescatter.doctree and b/master/doctrees/functionlib/dsplib/reducescatter.doctree differ diff --git a/master/doctrees/functionlib/dsplib/reshape.doctree b/master/doctrees/functionlib/dsplib/reshape.doctree index f841f71d..92baff18 100644 Binary files a/master/doctrees/functionlib/dsplib/reshape.doctree and b/master/doctrees/functionlib/dsplib/reshape.doctree differ diff --git a/master/doctrees/functionlib/dsplib/resize.doctree b/master/doctrees/functionlib/dsplib/resize.doctree index 16710dea..4b8fe51d 100644 Binary files a/master/doctrees/functionlib/dsplib/resize.doctree and b/master/doctrees/functionlib/dsplib/resize.doctree differ diff --git a/master/doctrees/functionlib/dsplib/resizegrad.doctree b/master/doctrees/functionlib/dsplib/resizegrad.doctree index 4e15b6d6..6936227b 100644 Binary files a/master/doctrees/functionlib/dsplib/resizegrad.doctree and b/master/doctrees/functionlib/dsplib/resizegrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/reverse_sequence.doctree b/master/doctrees/functionlib/dsplib/reverse_sequence.doctree index 6f9a5e76..be5b930c 100644 Binary files a/master/doctrees/functionlib/dsplib/reverse_sequence.doctree and b/master/doctrees/functionlib/dsplib/reverse_sequence.doctree differ diff --git a/master/doctrees/functionlib/dsplib/reversev2.doctree b/master/doctrees/functionlib/dsplib/reversev2.doctree index ed505968..1592314c 100644 Binary files a/master/doctrees/functionlib/dsplib/reversev2.doctree and b/master/doctrees/functionlib/dsplib/reversev2.doctree differ diff --git a/master/doctrees/functionlib/dsplib/rfft.doctree b/master/doctrees/functionlib/dsplib/rfft.doctree index 2b86aeda..62d7258f 100644 Binary files a/master/doctrees/functionlib/dsplib/rfft.doctree and b/master/doctrees/functionlib/dsplib/rfft.doctree differ diff --git a/master/doctrees/functionlib/dsplib/roipooling.doctree b/master/doctrees/functionlib/dsplib/roipooling.doctree index ae18a129..809f8b9c 100644 Binary files a/master/doctrees/functionlib/dsplib/roipooling.doctree and b/master/doctrees/functionlib/dsplib/roipooling.doctree differ diff --git a/master/doctrees/functionlib/dsplib/round.doctree b/master/doctrees/functionlib/dsplib/round.doctree index d15ec8ec..bfa44964 100644 Binary files a/master/doctrees/functionlib/dsplib/round.doctree and b/master/doctrees/functionlib/dsplib/round.doctree differ diff --git a/master/doctrees/functionlib/dsplib/rsqrt.doctree b/master/doctrees/functionlib/dsplib/rsqrt.doctree index f7733fa6..d2e57a4f 100644 Binary files a/master/doctrees/functionlib/dsplib/rsqrt.doctree and b/master/doctrees/functionlib/dsplib/rsqrt.doctree differ diff --git a/master/doctrees/functionlib/dsplib/rsqrtgrad.doctree b/master/doctrees/functionlib/dsplib/rsqrtgrad.doctree index fd06d9d3..4c2f593b 100644 Binary files a/master/doctrees/functionlib/dsplib/rsqrtgrad.doctree and b/master/doctrees/functionlib/dsplib/rsqrtgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/scalefusion.doctree b/master/doctrees/functionlib/dsplib/scalefusion.doctree index a08a3458..85ba6c47 100644 Binary files a/master/doctrees/functionlib/dsplib/scalefusion.doctree and b/master/doctrees/functionlib/dsplib/scalefusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/scatter_elements.doctree b/master/doctrees/functionlib/dsplib/scatter_elements.doctree index ab3f0517..1a5485c0 100644 Binary files a/master/doctrees/functionlib/dsplib/scatter_elements.doctree and b/master/doctrees/functionlib/dsplib/scatter_elements.doctree differ diff --git a/master/doctrees/functionlib/dsplib/scatter_nd.doctree b/master/doctrees/functionlib/dsplib/scatter_nd.doctree index 60900892..70c514d2 100644 Binary files a/master/doctrees/functionlib/dsplib/scatter_nd.doctree and b/master/doctrees/functionlib/dsplib/scatter_nd.doctree differ diff --git a/master/doctrees/functionlib/dsplib/scatter_nd_update.doctree b/master/doctrees/functionlib/dsplib/scatter_nd_update.doctree index 50adf0b2..4988038b 100644 Binary files a/master/doctrees/functionlib/dsplib/scatter_nd_update.doctree and b/master/doctrees/functionlib/dsplib/scatter_nd_update.doctree differ diff --git a/master/doctrees/functionlib/dsplib/select.doctree b/master/doctrees/functionlib/dsplib/select.doctree index 2aaa9b5a..c04c90b8 100644 Binary files a/master/doctrees/functionlib/dsplib/select.doctree and b/master/doctrees/functionlib/dsplib/select.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sgd.doctree b/master/doctrees/functionlib/dsplib/sgd.doctree index 0f8f96ef..18db982b 100644 Binary files a/master/doctrees/functionlib/dsplib/sgd.doctree and b/master/doctrees/functionlib/dsplib/sgd.doctree differ diff --git a/master/doctrees/functionlib/dsplib/shape.doctree b/master/doctrees/functionlib/dsplib/shape.doctree index ff02fbc7..df17f2cc 100644 Binary files a/master/doctrees/functionlib/dsplib/shape.doctree and b/master/doctrees/functionlib/dsplib/shape.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sigmoidcrossentropwithlogitsgrad.doctree b/master/doctrees/functionlib/dsplib/sigmoidcrossentropwithlogitsgrad.doctree index 379df34e..3a4d7299 100644 Binary files a/master/doctrees/functionlib/dsplib/sigmoidcrossentropwithlogitsgrad.doctree and b/master/doctrees/functionlib/dsplib/sigmoidcrossentropwithlogitsgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sigmoidcrossentropywithlogits.doctree b/master/doctrees/functionlib/dsplib/sigmoidcrossentropywithlogits.doctree index d670a868..bf3935b0 100644 Binary files a/master/doctrees/functionlib/dsplib/sigmoidcrossentropywithlogits.doctree and b/master/doctrees/functionlib/dsplib/sigmoidcrossentropywithlogits.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sin.doctree b/master/doctrees/functionlib/dsplib/sin.doctree index 748f6cbb..a821decc 100644 Binary files a/master/doctrees/functionlib/dsplib/sin.doctree and b/master/doctrees/functionlib/dsplib/sin.doctree differ diff --git a/master/doctrees/functionlib/dsplib/size.doctree b/master/doctrees/functionlib/dsplib/size.doctree index 67240ede..0acf6799 100644 Binary files a/master/doctrees/functionlib/dsplib/size.doctree and b/master/doctrees/functionlib/dsplib/size.doctree differ diff --git a/master/doctrees/functionlib/dsplib/skipgram.doctree b/master/doctrees/functionlib/dsplib/skipgram.doctree index f3d899f4..8868521d 100644 Binary files a/master/doctrees/functionlib/dsplib/skipgram.doctree and b/master/doctrees/functionlib/dsplib/skipgram.doctree differ diff --git a/master/doctrees/functionlib/dsplib/slice.doctree b/master/doctrees/functionlib/dsplib/slice.doctree index 980d0896..4d83760d 100644 Binary files a/master/doctrees/functionlib/dsplib/slice.doctree and b/master/doctrees/functionlib/dsplib/slice.doctree differ diff --git a/master/doctrees/functionlib/dsplib/smooth1loss.doctree b/master/doctrees/functionlib/dsplib/smooth1loss.doctree index e1c28885..fd3fa87b 100644 Binary files a/master/doctrees/functionlib/dsplib/smooth1loss.doctree and b/master/doctrees/functionlib/dsplib/smooth1loss.doctree differ diff --git a/master/doctrees/functionlib/dsplib/smoothl1lossgrad.doctree b/master/doctrees/functionlib/dsplib/smoothl1lossgrad.doctree index 9d99e71c..3e22ba8a 100644 Binary files a/master/doctrees/functionlib/dsplib/smoothl1lossgrad.doctree and b/master/doctrees/functionlib/dsplib/smoothl1lossgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/softmax.doctree b/master/doctrees/functionlib/dsplib/softmax.doctree index 64b3f2b1..d8775290 100644 Binary files a/master/doctrees/functionlib/dsplib/softmax.doctree and b/master/doctrees/functionlib/dsplib/softmax.doctree differ diff --git a/master/doctrees/functionlib/dsplib/softmax_cross_entropy_with_logits.doctree b/master/doctrees/functionlib/dsplib/softmax_cross_entropy_with_logits.doctree index 9caa2772..a970c151 100644 Binary files a/master/doctrees/functionlib/dsplib/softmax_cross_entropy_with_logits.doctree and b/master/doctrees/functionlib/dsplib/softmax_cross_entropy_with_logits.doctree differ diff --git a/master/doctrees/functionlib/dsplib/spacetobatch.doctree b/master/doctrees/functionlib/dsplib/spacetobatch.doctree index d7bc9ce6..9c43a175 100644 Binary files a/master/doctrees/functionlib/dsplib/spacetobatch.doctree and b/master/doctrees/functionlib/dsplib/spacetobatch.doctree differ diff --git a/master/doctrees/functionlib/dsplib/spacetobatchnd.doctree b/master/doctrees/functionlib/dsplib/spacetobatchnd.doctree index 14e9bb42..7dccdc46 100644 Binary files a/master/doctrees/functionlib/dsplib/spacetobatchnd.doctree and b/master/doctrees/functionlib/dsplib/spacetobatchnd.doctree differ diff --git a/master/doctrees/functionlib/dsplib/spacetodepth.doctree b/master/doctrees/functionlib/dsplib/spacetodepth.doctree index 5c1db74f..0449799e 100644 Binary files a/master/doctrees/functionlib/dsplib/spacetodepth.doctree and b/master/doctrees/functionlib/dsplib/spacetodepth.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sparse_softmax_cross_entropy_with_logits.doctree b/master/doctrees/functionlib/dsplib/sparse_softmax_cross_entropy_with_logits.doctree index 3bca4459..046bcfef 100644 Binary files a/master/doctrees/functionlib/dsplib/sparse_softmax_cross_entropy_with_logits.doctree and b/master/doctrees/functionlib/dsplib/sparse_softmax_cross_entropy_with_logits.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sparsefillemptyrows.doctree b/master/doctrees/functionlib/dsplib/sparsefillemptyrows.doctree index 171eed2e..a437952f 100644 Binary files a/master/doctrees/functionlib/dsplib/sparsefillemptyrows.doctree and b/master/doctrees/functionlib/dsplib/sparsefillemptyrows.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sparsereshape.doctree b/master/doctrees/functionlib/dsplib/sparsereshape.doctree index 576d8700..8a4c56d4 100644 Binary files a/master/doctrees/functionlib/dsplib/sparsereshape.doctree and b/master/doctrees/functionlib/dsplib/sparsereshape.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sparsesegmentsum.doctree b/master/doctrees/functionlib/dsplib/sparsesegmentsum.doctree index 6337ae24..42c5bf7d 100644 Binary files a/master/doctrees/functionlib/dsplib/sparsesegmentsum.doctree and b/master/doctrees/functionlib/dsplib/sparsesegmentsum.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sparsetodense.doctree b/master/doctrees/functionlib/dsplib/sparsetodense.doctree index af41a6a9..ed38ca7f 100644 Binary files a/master/doctrees/functionlib/dsplib/sparsetodense.doctree and b/master/doctrees/functionlib/dsplib/sparsetodense.doctree differ diff --git a/master/doctrees/functionlib/dsplib/splice.doctree b/master/doctrees/functionlib/dsplib/splice.doctree index c1fbd881..af447e38 100644 Binary files a/master/doctrees/functionlib/dsplib/splice.doctree and b/master/doctrees/functionlib/dsplib/splice.doctree differ diff --git a/master/doctrees/functionlib/dsplib/split.doctree b/master/doctrees/functionlib/dsplib/split.doctree index 90975233..37d3ed7b 100644 Binary files a/master/doctrees/functionlib/dsplib/split.doctree and b/master/doctrees/functionlib/dsplib/split.doctree differ diff --git a/master/doctrees/functionlib/dsplib/split_with_overlap.doctree b/master/doctrees/functionlib/dsplib/split_with_overlap.doctree index 084ddd9a..cbb32ae5 100644 Binary files a/master/doctrees/functionlib/dsplib/split_with_overlap.doctree and b/master/doctrees/functionlib/dsplib/split_with_overlap.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sqrt.doctree b/master/doctrees/functionlib/dsplib/sqrt.doctree index be20d2d2..65dae3f4 100644 Binary files a/master/doctrees/functionlib/dsplib/sqrt.doctree and b/master/doctrees/functionlib/dsplib/sqrt.doctree differ diff --git a/master/doctrees/functionlib/dsplib/sqrtgrad.doctree b/master/doctrees/functionlib/dsplib/sqrtgrad.doctree index 4f4a3649..2ed5f445 100644 Binary files a/master/doctrees/functionlib/dsplib/sqrtgrad.doctree and b/master/doctrees/functionlib/dsplib/sqrtgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/square.doctree b/master/doctrees/functionlib/dsplib/square.doctree index 570882ca..f71115e7 100644 Binary files a/master/doctrees/functionlib/dsplib/square.doctree and b/master/doctrees/functionlib/dsplib/square.doctree differ diff --git a/master/doctrees/functionlib/dsplib/squaredifference.doctree b/master/doctrees/functionlib/dsplib/squaredifference.doctree index 921c6f5a..59800449 100644 Binary files a/master/doctrees/functionlib/dsplib/squaredifference.doctree and b/master/doctrees/functionlib/dsplib/squaredifference.doctree differ diff --git a/master/doctrees/functionlib/dsplib/squeeze.doctree b/master/doctrees/functionlib/dsplib/squeeze.doctree index b1912a05..c2d0b4cd 100644 Binary files a/master/doctrees/functionlib/dsplib/squeeze.doctree and b/master/doctrees/functionlib/dsplib/squeeze.doctree differ diff --git a/master/doctrees/functionlib/dsplib/stack.doctree b/master/doctrees/functionlib/dsplib/stack.doctree index bc1ec60f..a7359e41 100644 Binary files a/master/doctrees/functionlib/dsplib/stack.doctree and b/master/doctrees/functionlib/dsplib/stack.doctree differ diff --git a/master/doctrees/functionlib/dsplib/stridedslice.doctree b/master/doctrees/functionlib/dsplib/stridedslice.doctree index ceacd98f..0cc0fbfc 100644 Binary files a/master/doctrees/functionlib/dsplib/stridedslice.doctree and b/master/doctrees/functionlib/dsplib/stridedslice.doctree differ diff --git a/master/doctrees/functionlib/dsplib/stridedslicegrad.doctree b/master/doctrees/functionlib/dsplib/stridedslicegrad.doctree index 64af6c7f..64c4bc7c 100644 Binary files a/master/doctrees/functionlib/dsplib/stridedslicegrad.doctree and b/master/doctrees/functionlib/dsplib/stridedslicegrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/subfusion.doctree b/master/doctrees/functionlib/dsplib/subfusion.doctree index 03627ea7..524fb360 100644 Binary files a/master/doctrees/functionlib/dsplib/subfusion.doctree and b/master/doctrees/functionlib/dsplib/subfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/subgrad.doctree b/master/doctrees/functionlib/dsplib/subgrad.doctree index b7b06753..d1ed15d2 100644 Binary files a/master/doctrees/functionlib/dsplib/subgrad.doctree and b/master/doctrees/functionlib/dsplib/subgrad.doctree differ diff --git a/master/doctrees/functionlib/dsplib/switch.doctree b/master/doctrees/functionlib/dsplib/switch.doctree index e9cbf89a..8b99445e 100644 Binary files a/master/doctrees/functionlib/dsplib/switch.doctree and b/master/doctrees/functionlib/dsplib/switch.doctree differ diff --git a/master/doctrees/functionlib/dsplib/switchlayer.doctree b/master/doctrees/functionlib/dsplib/switchlayer.doctree index bc8f1294..5cd2d2ae 100644 Binary files a/master/doctrees/functionlib/dsplib/switchlayer.doctree and b/master/doctrees/functionlib/dsplib/switchlayer.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensor_scatter_add.doctree b/master/doctrees/functionlib/dsplib/tensor_scatter_add.doctree index c2a0ba32..9b166e17 100644 Binary files a/master/doctrees/functionlib/dsplib/tensor_scatter_add.doctree and b/master/doctrees/functionlib/dsplib/tensor_scatter_add.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorarray.doctree b/master/doctrees/functionlib/dsplib/tensorarray.doctree index a32dff86..3138cba0 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorarray.doctree and b/master/doctrees/functionlib/dsplib/tensorarray.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorarrayread.doctree b/master/doctrees/functionlib/dsplib/tensorarrayread.doctree index 44c2c80c..99dd2e80 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorarrayread.doctree and b/master/doctrees/functionlib/dsplib/tensorarrayread.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorarraywrite.doctree b/master/doctrees/functionlib/dsplib/tensorarraywrite.doctree index 860e6a05..e18483eb 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorarraywrite.doctree and b/master/doctrees/functionlib/dsplib/tensorarraywrite.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorlistfromtensor.doctree b/master/doctrees/functionlib/dsplib/tensorlistfromtensor.doctree index f21941e6..79576bf2 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorlistfromtensor.doctree and b/master/doctrees/functionlib/dsplib/tensorlistfromtensor.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorlistgetitem.doctree b/master/doctrees/functionlib/dsplib/tensorlistgetitem.doctree index 62124620..19417937 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorlistgetitem.doctree and b/master/doctrees/functionlib/dsplib/tensorlistgetitem.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorlistreserve.doctree b/master/doctrees/functionlib/dsplib/tensorlistreserve.doctree index 683aed40..43e91971 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorlistreserve.doctree and b/master/doctrees/functionlib/dsplib/tensorlistreserve.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorlistsetitem.doctree b/master/doctrees/functionlib/dsplib/tensorlistsetitem.doctree index bff5a94c..2ed6c23d 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorlistsetitem.doctree and b/master/doctrees/functionlib/dsplib/tensorlistsetitem.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tensorliststack.doctree b/master/doctrees/functionlib/dsplib/tensorliststack.doctree index 1f30cccd..233d32ae 100644 Binary files a/master/doctrees/functionlib/dsplib/tensorliststack.doctree and b/master/doctrees/functionlib/dsplib/tensorliststack.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tile.doctree b/master/doctrees/functionlib/dsplib/tile.doctree index fab96a5c..0bbf1a83 100644 Binary files a/master/doctrees/functionlib/dsplib/tile.doctree and b/master/doctrees/functionlib/dsplib/tile.doctree differ diff --git a/master/doctrees/functionlib/dsplib/topkfusion.doctree b/master/doctrees/functionlib/dsplib/topkfusion.doctree index 5ae36067..1c3caa72 100644 Binary files a/master/doctrees/functionlib/dsplib/topkfusion.doctree and b/master/doctrees/functionlib/dsplib/topkfusion.doctree differ diff --git a/master/doctrees/functionlib/dsplib/transpose.doctree b/master/doctrees/functionlib/dsplib/transpose.doctree index 8c89f8ec..030b8896 100644 Binary files a/master/doctrees/functionlib/dsplib/transpose.doctree and b/master/doctrees/functionlib/dsplib/transpose.doctree differ diff --git a/master/doctrees/functionlib/dsplib/tril.doctree b/master/doctrees/functionlib/dsplib/tril.doctree index c2960eef..920afee5 100644 Binary files a/master/doctrees/functionlib/dsplib/tril.doctree and b/master/doctrees/functionlib/dsplib/tril.doctree differ diff --git a/master/doctrees/functionlib/dsplib/triu.doctree b/master/doctrees/functionlib/dsplib/triu.doctree index 89061ec6..12f8430a 100644 Binary files a/master/doctrees/functionlib/dsplib/triu.doctree and b/master/doctrees/functionlib/dsplib/triu.doctree differ diff --git a/master/doctrees/functionlib/dsplib/uniform_real.doctree b/master/doctrees/functionlib/dsplib/uniform_real.doctree index 23a5ed7b..58a7a95e 100644 Binary files a/master/doctrees/functionlib/dsplib/uniform_real.doctree and b/master/doctrees/functionlib/dsplib/uniform_real.doctree differ diff --git a/master/doctrees/functionlib/dsplib/unique.doctree b/master/doctrees/functionlib/dsplib/unique.doctree index c9cc32c6..f34ca38a 100644 Binary files a/master/doctrees/functionlib/dsplib/unique.doctree and b/master/doctrees/functionlib/dsplib/unique.doctree differ diff --git a/master/doctrees/functionlib/dsplib/unsortedsegmentsum.doctree b/master/doctrees/functionlib/dsplib/unsortedsegmentsum.doctree index 6132ca64..c0d40a48 100644 Binary files a/master/doctrees/functionlib/dsplib/unsortedsegmentsum.doctree and b/master/doctrees/functionlib/dsplib/unsortedsegmentsum.doctree differ diff --git a/master/doctrees/functionlib/dsplib/unsqueeze.doctree b/master/doctrees/functionlib/dsplib/unsqueeze.doctree index d5477d43..c83704a4 100644 Binary files a/master/doctrees/functionlib/dsplib/unsqueeze.doctree and b/master/doctrees/functionlib/dsplib/unsqueeze.doctree differ diff --git a/master/doctrees/functionlib/dsplib/unstack.doctree b/master/doctrees/functionlib/dsplib/unstack.doctree index fea55867..bab2fca4 100644 Binary files a/master/doctrees/functionlib/dsplib/unstack.doctree and b/master/doctrees/functionlib/dsplib/unstack.doctree differ diff --git a/master/doctrees/functionlib/dsplib/where.doctree b/master/doctrees/functionlib/dsplib/where.doctree index caa19624..261e61fa 100644 Binary files a/master/doctrees/functionlib/dsplib/where.doctree and b/master/doctrees/functionlib/dsplib/where.doctree differ diff --git a/master/doctrees/functionlib/dsplib/zeroslike.doctree b/master/doctrees/functionlib/dsplib/zeroslike.doctree index 00714303..05641e0f 100644 Binary files a/master/doctrees/functionlib/dsplib/zeroslike.doctree and b/master/doctrees/functionlib/dsplib/zeroslike.doctree differ diff --git a/master/doctrees/functionlib/index.doctree b/master/doctrees/functionlib/index.doctree index 2731928d..adaa3a08 100644 Binary files a/master/doctrees/functionlib/index.doctree and b/master/doctrees/functionlib/index.doctree differ diff --git a/master/doctrees/functionlib/rstfiles.doctree b/master/doctrees/functionlib/rstfiles.doctree new file mode 100644 index 00000000..1cc67f23 Binary files /dev/null and b/master/doctrees/functionlib/rstfiles.doctree differ diff --git a/master/doctrees/functionlib/supported_op.doctree b/master/doctrees/functionlib/supported_op.doctree index 43539f47..beece370 100644 Binary files a/master/doctrees/functionlib/supported_op.doctree and b/master/doctrees/functionlib/supported_op.doctree differ diff --git a/master/doctrees/index.doctree b/master/doctrees/index.doctree index 8d94a979..15cb34ca 100644 Binary files a/master/doctrees/index.doctree and b/master/doctrees/index.doctree differ diff --git a/master/doctrees/quickstart/hellodsp.doctree b/master/doctrees/quickstart/hellodsp.doctree index 51abe470..3bb3c731 100644 Binary files a/master/doctrees/quickstart/hellodsp.doctree and b/master/doctrees/quickstart/hellodsp.doctree differ diff --git a/master/doctrees/quickstart/index.doctree b/master/doctrees/quickstart/index.doctree index fd9d21a1..e3e042aa 100644 Binary files a/master/doctrees/quickstart/index.doctree and b/master/doctrees/quickstart/index.doctree differ diff --git a/master/doctrees/quickstart/installation.doctree b/master/doctrees/quickstart/installation.doctree index 1fc6df37..0d1ba40b 100644 Binary files a/master/doctrees/quickstart/installation.doctree and b/master/doctrees/quickstart/installation.doctree differ diff --git a/master/doctrees/quickstart/overview.doctree b/master/doctrees/quickstart/overview.doctree index 7747897d..2fa8fbed 100644 Binary files a/master/doctrees/quickstart/overview.doctree and b/master/doctrees/quickstart/overview.doctree differ diff --git a/master/doctrees/refdoc/dsplib_description.doctree b/master/doctrees/refdoc/dsplib_description.doctree index d9c9ae1c..5846e94d 100644 Binary files a/master/doctrees/refdoc/dsplib_description.doctree and b/master/doctrees/refdoc/dsplib_description.doctree differ diff --git a/master/doctrees/refdoc/index.doctree b/master/doctrees/refdoc/index.doctree index 83af8720..ee72ec77 100644 Binary files a/master/doctrees/refdoc/index.doctree and b/master/doctrees/refdoc/index.doctree differ diff --git a/master/doctrees/refdoc/mindspore.doctree b/master/doctrees/refdoc/mindspore.doctree index de13e21d..56a1a703 100644 Binary files a/master/doctrees/refdoc/mindspore.doctree and b/master/doctrees/refdoc/mindspore.doctree differ diff --git a/master/doctrees/refdoc/signal_scheduling.doctree b/master/doctrees/refdoc/signal_scheduling.doctree index 8d780907..211b96a3 100644 Binary files a/master/doctrees/refdoc/signal_scheduling.doctree and b/master/doctrees/refdoc/signal_scheduling.doctree differ diff --git a/master/html/.buildinfo b/master/html/.buildinfo index a94959fb..665605cb 100644 --- a/master/html/.buildinfo +++ b/master/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 -# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. -config: b069d1b0fb764ab6af1ad8510b59d113 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: d4865a26b677e429623c88a17189e687 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/master/html/_sources/functionlib/dsplib/applymomentum.rst.txt b/master/html/_sources/functionlib/dsplib/apply_momentum.rst.txt similarity index 53% rename from master/html/_sources/functionlib/dsplib/applymomentum.rst.txt rename to master/html/_sources/functionlib/dsplib/apply_momentum.rst.txt index fe1f1f33..464f4b86 100644 --- a/master/html/_sources/functionlib/dsplib/applymomentum.rst.txt +++ b/master/html/_sources/functionlib/dsplib/apply_momentum.rst.txt @@ -18,11 +18,9 @@ ApplyMomentum - **weight** - å¾…æ›´æ–°æƒé‡å¼ é‡é¦–地å€ã€‚ - **accumulate** - 动é‡ç´¯ç§¯å¼ é‡é¦–地å€ã€‚ - **gradient** - 梯度张é‡é¦–地å€ã€‚ - - **learning_rate** - 学习率。 - - **moment** - 动é‡ç³»æ•°ã€‚ - **nesterov** - 是å¦å¯ç”¨ Nesterov 动é‡ã€‚ - - **start** - å‚与计算的起始索引(闭区间)。 - - **end** - å‚与计算的结æŸç´¢å¼•(开区间)。 + - **float_addr** - 浮点数地å€ï¼Œé•¿åº¦2个floatæ•°æ®ï¼Œç¬¬ä¸€ä¸ªæ•°æ®æ˜¯å­¦ä¹ çއ(learning_rate),第二个是动é‡ç³»æ•°(moment)。 + - **int_addr** - 整型地å€ï¼Œé•¿åº¦2个intæ•°æ®ï¼Œç¬¬ä¸€ä¸ªæ˜¯å‚与计算的起始索引(start),第二个是å‚与计算的结æŸç´¢å¼•(end)。其中start是闭区间,end是开区间。 - **core_mask(int, å¯é€‰)** - 核掩ç ï¼ˆä»…适用于共享存储版本)。 输出: @@ -40,15 +38,15 @@ ApplyMomentum **共享存储版本:** -.. c:function:: void hp_applymomentum_s(half *weight, half *accumulate, const half *gradient, float learning_rate, float moment, bool nesterov, int start, int end, int core_mask) -.. c:function:: void fp_applymomentum_s(float *weight, float *accumulate, const float *gradient, float learning_rate, float moment, bool nesterov, int start, int end, int core_mask) +.. c:function:: void hp_apply_momentum_s(half *weight, half *accumulate,const half *gradient, bool nesterov, float *float_addr, int *int_addr, int core_mask) +.. c:function:: void fp_apply_momentum_s(float *weight, float *accumulate,const float *gradient, bool nesterov, float *float_addr, int *int_addr, int core_mask) **C调用示例:** .. code-block:: c :linenos: - :emphasize-lines: 15-17 + :emphasize-lines: 21 // FT78NE 多核示例 #include @@ -58,29 +56,33 @@ ApplyMomentum float *weight = (float *)0xA0000000; // DDR 存储 float *accumulate = (float *)0xB0000000; float *gradient = (float *)0xC0000000; + float *float_addr = (float *)0xD0000000; + int *int_addr = (int *)0xD10000000; int start = 0; int end = 4096; + int_addr[0] = start; + int_addr[1] = end; int core_mask = 0xff; float learning_rate = 1e-2f; float moment = 0.99f; + float_addr[0] = learning_rate; + float_addr[1] = moment; bool nesterov = false; - fp_applymomentum_s(weight, accumulate, gradient, - learning_rate, moment, nesterov, - start, end, core_mask); + fp_apply_momentum_s(weight, accumulate, gradient, nesterov, float_addr, int_addr, core_mask); return 0; } **ç§æœ‰å­˜å‚¨ç‰ˆæœ¬:** -.. c:function:: void hp_applymomentum_p(half *weight, half *accumulate, const half *gradient, float learning_rate, float moment, bool nesterov, int length) -.. c:function:: void fp_applymomentum_p(float *weight, float *accumulate, const float *gradient, float learning_rate, float moment, bool nesterov, int length) +.. c:function:: void hp_apply_momentum_p(half *weight, half *accumulate,const half *gradient, bool nesterov, float *float_addr, int *int_addr) +.. c:function:: void fp_apply_momentum_p(float *weight, float *accumulate,const float *gradient, bool nesterov, float *float_addr, int *int_addr) **C调用示例:** .. code-block:: c :linenos: - :emphasize-lines: 13-15 + :emphasize-lines: 21 // MT7004 啿 ¸ç¤ºä¾‹ #include @@ -90,12 +92,18 @@ ApplyMomentum half *weight = (half *)0x10000000; // L2 存储 half *accumulate = (half *)0x10002000; half *gradient = (half *)0x10004000; - int length = 2048; - float learning_rate = 5e-3f; - float moment = 0.9f; + float *float_addr = (float *)0x10006000; + int *int_addr = (int *)0x10007000; + int start = 0; + int end = 4096; + int_addr[0] = start; + int_addr[1] = end; + int core_mask = 0xff; + float learning_rate = 1e-2f; + float moment = 0.99f; + float_addr[0] = learning_rate; + float_addr[1] = moment; bool nesterov = true; - hp_applymomentum_p(weight, accumulate, gradient, - learning_rate, moment, nesterov, - length); + hp_apply_momentum_p(weight, accumulate, gradient, nesterov, float_addr, int_addr); return 0; } diff --git a/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt b/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt index 2b214a17..05e69098 100644 --- a/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt +++ b/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt @@ -36,7 +36,7 @@ DSP Library C API Reference embeddinglookup eltwise adamweightdecay - applymomentum + apply_momentum avgpoolinggrad batchtospace batchtospacend diff --git a/master/html/_sources/functionlib/rstfiles.rst.txt b/master/html/_sources/functionlib/rstfiles.rst.txt new file mode 100644 index 00000000..3282db76 --- /dev/null +++ b/master/html/_sources/functionlib/rstfiles.rst.txt @@ -0,0 +1,7 @@ +ç®—å­åº“æ”¯æŒ +========== + +.. toctree:: + :maxdepth: 2 + + dsplib/dsplib_index \ No newline at end of file diff --git a/master/html/_static/basic.css b/master/html/_static/basic.css index 7ebbd6d0..cfc60b86 100644 --- a/master/html/_static/basic.css +++ b/master/html/_static/basic.css @@ -1,5 +1,12 @@ /* + * basic.css + * ~~~~~~~~~ + * * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * */ /* -- main layout ----------------------------------------------------------- */ @@ -108,11 +115,15 @@ img { /* -- search page ----------------------------------------------------------- */ ul.search { - margin-top: 10px; + margin: 10px 0 0 20px; + padding: 0; } ul.search li { - padding: 5px 0; + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; } ul.search li a { @@ -226,10 +237,6 @@ a.headerlink { visibility: hidden; } -a:visited { - color: #551A8B; -} - h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, diff --git a/master/html/_static/doctools.js b/master/html/_static/doctools.js index 0398ebb9..d06a71d7 100644 --- a/master/html/_static/doctools.js +++ b/master/html/_static/doctools.js @@ -1,5 +1,12 @@ /* + * doctools.js + * ~~~~~~~~~~~ + * * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * */ "use strict"; diff --git a/master/html/_static/documentation_options.js b/master/html/_static/documentation_options.js index 5e92741a..27e5d787 100644 --- a/master/html/_static/documentation_options.js +++ b/master/html/_static/documentation_options.js @@ -1,4 +1,5 @@ -const DOCUMENTATION_OPTIONS = { +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), VERSION: 'alpha', LANGUAGE: 'zh-CN', COLLAPSE_INDEX: false, diff --git a/master/html/_static/hrrp/FFT4f.cpp b/master/html/_static/hrrp/FFT4f.cpp new file mode 100644 index 00000000..08077859 --- /dev/null +++ b/master/html/_static/hrrp/FFT4f.cpp @@ -0,0 +1,2637 @@ +#include "FFT4f.h" +#include "math.h" +#include + +void FFT4f(float *Sr, float *Si, int n, int shift) +{ + int i, j, k, p; + int Space; + int Stride; + double WR[3], WI[3], StepR, StepI, CoffR, CoffI; + double R[4], I[4], temp, temp1, temp2, temp3; + float *Sr0, *Si0, *Sr1, *Si1, *Sr2, *Si2, *Sr3, *Si3; + float *SR0, *SI0, *SR1, *SI1, *SR2, *SI2, *SR3, *SI3; + double OutR[4], OutI[4]; + double WeightR[16], WeightI[16]; + int Reverse[16384]; + int nn = 65536 * 4; + for (i = 0; i < 16; i++) + { + WeightR[i] = cos(-2 * PI * 1.0 / nn); + WeightI[i] = sin(-2 * PI * 1.0 / nn); + nn = nn / 2; + } + + int r = 7; + for (i = 0; i < 16384; i++) + { + int k = 0; + int l = 4096; + int p = i; + for (int j = 0; j < r; j++) + { + if (p == 0) + break; + else + { + k = k + (p % 4) * l; + p = p / 4; + } + l = l / 4; + } + Reverse[i] = k; + } + + i = 1; + r = 0; + while (i < n) + { + i = i * 2; + r = r + 1; + } + + if (r % 2 == 0) // »ù4Ëã·¨ + { + Space = n / 4; + Stride = n; + Sr0 = Sr; + Si0 = Si; + + for (i = 0; i < r - 2; i = i + 2) // ½×Êý + { + CoffR = WeightR[18 - r + i]; + CoffI = WeightI[18 - r + i]; + StepR = CoffR; + StepI = CoffI; + Sr1 = Sr0 + Space; + Si1 = Si0 + Space; + Sr2 = Sr1 + Space; + Si2 = Si1 + Space; + Sr3 = Sr2 + Space; + Si3 = Si2 + Space; + for (k = 0; k < Space; k++) // ÿһ¼¶ÄÚµûʽÔËËãÊýÄ¿(n/4,n/16,n/32...) + { + if (k == 0) + { + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + R[0] = Sr0[j]; + R[1] = Sr1[j]; + R[2] = Sr2[j]; + R[3] = Sr3[j]; + I[0] = Si0[j]; + I[1] = Si1[j]; + I[2] = Si2[j]; + I[3] = Si3[j]; + + Sr0[j] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr1[j] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr2[j] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr3[j] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[j] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si1[j] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si2[j] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si3[j] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } // end of stages + } + else + { + WR[0] = CoffR; + WI[0] = CoffI; + WR[1] = WR[0] * CoffR - WI[0] * CoffI; + WI[1] = WR[0] * CoffI + WI[0] * CoffR; + WR[2] = WR[1] * CoffR - WI[1] * CoffI; + WI[2] = WR[1] * CoffI + WI[1] * CoffR; + temp = CoffR * StepR - CoffI * StepI; + CoffI = CoffR * StepI + CoffI * StepR; + CoffR = temp; + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + p = j + k; + R[0] = Sr0[p]; + R[1] = Sr1[p]; + R[2] = Sr2[p]; + R[3] = Sr3[p]; + I[0] = Si0[p]; + I[1] = Si1[p]; + I[2] = Si2[p]; + I[3] = Si3[p]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[p] = OutR[0]; + Si0[p] = OutI[0]; + Sr1[p] = OutR[1] * WR[0] - OutI[1] * WI[0]; + Si1[p] = OutR[1] * WI[0] + OutI[1] * WR[0]; + Sr2[p] = OutR[2] * WR[1] - OutI[2] * WI[1]; + Si2[p] = OutR[2] * WI[1] + OutI[2] * WR[1]; + Sr3[p] = OutR[3] * WR[2] - OutI[3] * WI[2]; + Si3[p] = OutR[3] * WI[2] + OutI[3] * WR[2]; + } // end of stages + } + } // end of spaces + Space = Space / 4; + Stride = Stride / 4; + } + + for (i = 0; i < n; i = i + 4) + { + R[0] = Sr0[i]; + R[1] = Sr0[i + 1]; + R[2] = Sr0[i + 2]; + R[3] = Sr0[i + 3]; + I[0] = Si0[i]; + I[1] = Si0[i + 1]; + I[2] = Si0[i + 2]; + I[3] = Si0[i + 3]; + + Sr0[i] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr0[i + 1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr0[i + 2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr0[i + 3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[i] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si0[i + 1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si0[i + 2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si0[i + 3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } + + // ÄæÐò + n = n / 4; + r = r / 2; + Sr1 = Sr0 + n; + Si1 = Si0 + n; + Sr2 = Sr1 + n; + Si2 = Si1 + n; + Sr3 = Sr2 + n; + Si3 = Si2 + n; + + if (shift) + { + if (r == 9) + { + for (i = 0, j = 0; j < n; i++, j = j + 4) + { + p = Reverse[i] << 2; + if (j < p) + { + temp = Sr0[j]; + temp1 = Sr0[j + 2]; + temp2 = Sr2[j]; + temp3 = Sr2[j + 2]; + Sr0[j] = Sr0[p + 2]; + Sr0[j + 2] = Sr2[p + 2]; + Sr2[j] = Sr0[p]; + Sr2[j + 2] = Sr2[p]; + Sr0[p + 2] = temp3; + Sr2[p + 2] = temp2; + Sr0[p] = temp1; + Sr2[p] = temp; + + temp = Si0[j]; + temp1 = Si0[j + 2]; + temp2 = Si2[j]; + temp3 = Si2[j + 2]; + Si0[j] = Si0[p + 2]; + Si[j + 2] = Si2[p + 2]; + Si2[j] = Si0[p]; + Si2[j + 2] = Si2[p]; + Si0[p + 2] = temp3; + Si2[p + 2] = temp2; + Si0[p] = temp1; + Si2[p] = temp; + + temp = Sr0[j + 1]; + temp1 = Sr0[j + 3]; + temp2 = Sr2[j + 1]; + temp3 = Sr2[j + 3]; + Sr0[j + 1] = Sr1[p + 2]; + Sr0[j + 3] = Sr3[p + 2]; + Sr2[j + 1] = Sr1[p]; + Sr2[j + 3] = Sr3[p]; + Sr1[p + 2] = temp3; + Sr3[p + 2] = temp2; + Sr1[p] = temp1; + Sr3[p] = temp; + + temp = Si0[j + 1]; + temp1 = Si0[j + 3]; + temp2 = Si2[j + 1]; + temp3 = Si2[j + 3]; + Si0[j + 1] = Si1[p + 2]; + Si0[j + 3] = Si3[p + 2]; + Si2[j + 1] = Si1[p]; + Si2[j + 3] = Si3[p]; + Si1[p + 2] = temp3; + Si3[p + 2] = temp2; + Si1[p] = temp1; + Si3[p] = temp; + + temp = Sr1[j]; + temp1 = Sr1[j + 2]; + temp2 = Sr3[j]; + temp3 = Sr3[j + 2]; + Sr1[j] = Sr[p + 3]; + Sr1[j + 2] = Sr2[p + 3]; + Sr3[j] = Sr[p + 1]; + Sr3[j + 2] = Sr2[p + 1]; + Sr[p + 3] = temp3; + Sr2[p + 3] = temp2; + Sr0[p + 1] = temp1; + Sr2[p + 1] = temp; + + temp = Si1[j]; + temp1 = Si1[j + 2]; + temp2 = Si3[j]; + temp3 = Si3[j + 2]; + Si1[j] = Si[p + 3]; + Si1[j + 2] = Si2[p + 3]; + Si3[j] = Si[p + 1]; + Si3[j + 2] = Si2[p + 1]; + Si[p + 3] = temp3; + Si2[p + 3] = temp2; + Si0[p + 1] = temp1; + Si2[p + 1] = temp; + + temp = Sr1[j + 1]; + temp1 = Sr1[j + 3]; + temp2 = Sr3[j + 1]; + temp3 = Sr3[j + 3]; + Sr1[j + 1] = Sr1[p + 3]; + Sr1[j + 3] = Sr3[p + 3]; + Sr3[j + 1] = Sr1[p + 1]; + Sr3[j + 3] = Sr3[p + 1]; + Sr1[p + 3] = temp3; + Sr3[p + 3] = temp2; + Sr1[p + 1] = temp1; + Sr3[p + 1] = temp; + + temp = Si1[j + 1]; + temp1 = Si1[j + 3]; + temp2 = Si3[j + 1]; + temp3 = Si3[j + 3]; + Si1[j + 1] = Si1[p + 3]; + Si1[j + 3] = Si3[p + 3]; + Si3[j + 1] = Si1[p + 1]; + Si3[j + 3] = Si3[p + 1]; + Si1[p + 3] = temp3; + Si3[p + 3] = temp2; + Si1[p + 1] = temp1; + Si3[p + 1] = temp; + } + else if (j == p) + { + temp = Sr0[j]; + temp1 = Sr0[j + 2]; + temp2 = Sr2[j]; + temp3 = Sr2[j + 2]; + Sr0[j] = temp1; + Sr0[j + 2] = temp3; + Sr2[j] = temp; + Sr2[j + 2] = temp2; + temp = Si0[j]; + temp1 = Si0[j + 2]; + temp2 = Si2[j]; + temp3 = Si2[j + 2]; + Si0[j] = temp1; + Si0[j + 2] = temp3; + Si2[j] = temp; + Si2[j + 2] = temp2; + + temp = Sr0[j + 1]; + temp1 = Sr1[j + 2]; + temp2 = Sr2[j + 3]; + temp3 = Sr3[j]; + Sr0[j + 1] = temp1; + Sr1[j + 2] = temp2; + Sr2[j + 3] = temp3; + Sr3[j] = temp; + temp = Si0[j + 1]; + temp1 = Si1[j + 2]; + temp2 = Si2[j + 3]; + temp3 = Si3[j]; + Si0[j + 1] = temp1; + Si1[j + 2] = temp2; + Si2[j + 3] = temp3; + Si3[j] = temp; + + temp = Sr0[j + 3]; + temp1 = Sr1[j]; + temp2 = Sr2[j + 1]; + temp3 = Sr3[j + 2]; + Sr0[j + 3] = temp3; + Sr1[j] = temp; + Sr2[j + 1] = temp1; + Sr3[j + 2] = temp2; + temp = Si0[j + 3]; + temp1 = Si1[j]; + temp2 = Si2[j + 1]; + temp3 = Si3[j + 2]; + Si0[j + 3] = temp3; + Si1[j] = temp; + Si2[j + 1] = temp1; + Si3[j + 2] = temp2; + + temp = Sr1[j + 1]; + temp1 = Sr1[j + 3]; + temp2 = Sr3[j + 1]; + temp3 = Sr3[j + 3]; + Sr1[j + 1] = temp1; + Sr1[j + 3] = temp3; + Sr3[j + 1] = temp; + Sr3[j + 3] = temp2; + temp = Si1[j + 1]; + temp1 = Si1[j + 3]; + temp2 = Si3[j + 1]; + temp3 = Si3[j + 3]; + Si1[j + 1] = temp1; + Si1[j + 3] = temp3; + Si3[j + 1] = temp; + Si3[j + 3] = temp2; + } + } + } // endof if(r==9) + else + { + r = (8 - r) * 2; + for (i = 0, j = 0; j < n; i++, j = j + 4) + { + p = Reverse[i] >> r; + if (j < p) + { + temp = Sr0[j]; + temp1 = Sr0[j + 2]; + temp2 = Sr2[j]; + temp3 = Sr2[j + 2]; + Sr0[j] = Sr0[p + 2]; + Sr0[j + 2] = Sr2[p + 2]; + Sr2[j] = Sr0[p]; + Sr2[j + 2] = Sr2[p]; + Sr0[p + 2] = temp3; + Sr2[p + 2] = temp2; + Sr0[p] = temp1; + Sr2[p] = temp; + + temp = Si0[j]; + temp1 = Si0[j + 2]; + temp2 = Si2[j]; + temp3 = Si2[j + 2]; + Si0[j] = Si0[p + 2]; + Si0[j + 2] = Si2[p + 2]; + Si2[j] = Si0[p]; + Si2[j + 2] = Si2[p]; + Si0[p + 2] = temp3; + Si2[p + 2] = temp2; + Si0[p] = temp1; + Si2[p] = temp; + + temp = Sr0[j + 1]; + temp1 = Sr0[j + 3]; + temp2 = Sr2[j + 1]; + temp3 = Sr2[j + 3]; + Sr0[j + 1] = Sr1[p + 2]; + Sr0[j + 3] = Sr3[p + 2]; + Sr2[j + 1] = Sr1[p]; + Sr2[j + 3] = Sr3[p]; + Sr1[p + 2] = temp3; + Sr3[p + 2] = temp2; + Sr1[p] = temp1; + Sr3[p] = temp; + + temp = Si0[j + 1]; + temp1 = Si0[j + 3]; + temp2 = Si2[j + 1]; + temp3 = Si2[j + 3]; + Si0[j + 1] = Si1[p + 2]; + Si0[j + 3] = Si3[p + 2]; + Si2[j + 1] = Si1[p]; + Si2[j + 3] = Si3[p]; + Si1[p + 2] = temp3; + Si3[p + 2] = temp2; + Si1[p] = temp1; + Si3[p] = temp; + + temp = Sr1[j]; + temp1 = Sr1[j + 2]; + temp2 = Sr3[j]; + temp3 = Sr3[j + 2]; + Sr1[j] = Sr0[p + 3]; + Sr1[j + 2] = Sr2[p + 3]; + Sr3[j] = Sr0[p + 1]; + Sr3[j + 2] = Sr2[p + 1]; + Sr0[p + 3] = temp3; + Sr2[p + 3] = temp2; + Sr0[p + 1] = temp1; + Sr2[p + 1] = temp; + + temp = Si1[j]; + temp1 = Si1[j + 2]; + temp2 = Si3[j]; + temp3 = Si3[j + 2]; + Si1[j] = Si0[p + 3]; + Si1[j + 2] = Si2[p + 3]; + Si3[j] = Si0[p + 1]; + Si3[j + 2] = Si2[p + 1]; + Si0[p + 3] = temp3; + Si2[p + 3] = temp2; + Si0[p + 1] = temp1; + Si2[p + 1] = temp; + + temp = Sr1[j + 1]; + temp1 = Sr1[j + 3]; + temp2 = Sr3[j + 1]; + temp3 = Sr3[j + 3]; + Sr1[j + 1] = Sr1[p + 3]; + Sr1[j + 3] = Sr3[p + 3]; + Sr3[j + 1] = Sr1[p + 1]; + Sr3[j + 3] = Sr3[p + 1]; + Sr1[p + 3] = temp3; + Sr3[p + 3] = temp2; + Sr1[p + 1] = temp1; + Sr3[p + 1] = temp; + + temp = Si1[j + 1]; + temp1 = Si1[j + 3]; + temp2 = Si3[j + 1]; + temp3 = Si3[j + 3]; + Si1[j + 1] = Si1[p + 3]; + Si1[j + 3] = Si3[p + 3]; + Si3[j + 1] = Si1[p + 1]; + Si3[j + 3] = Si3[p + 1]; + Si1[p + 3] = temp3; + Si3[p + 3] = temp2; + Si1[p + 1] = temp1; + Si3[p + 1] = temp; + } + else if (j == p) + { + temp = Sr0[j]; + temp1 = Sr0[j + 2]; + temp2 = Sr2[j]; + temp3 = Sr2[j + 2]; + Sr0[j] = temp1; + Sr0[j + 2] = temp3; + Sr2[j] = temp; + Sr2[j + 2] = temp2; + temp = Si0[j]; + temp1 = Si0[j + 2]; + temp2 = Si2[j]; + temp3 = Si2[j + 2]; + Si0[j] = temp1; + Si0[j + 2] = temp3; + Si2[j] = temp; + Si2[j + 2] = temp2; + + temp = Sr0[j + 1]; + temp1 = Sr1[j + 2]; + temp2 = Sr2[j + 3]; + temp3 = Sr3[j]; + Sr0[j + 1] = temp1; + Sr1[j + 2] = temp2; + Sr2[j + 3] = temp3; + Sr3[j] = temp; + temp = Si0[j + 1]; + temp1 = Si1[j + 2]; + temp2 = Si2[j + 3]; + temp3 = Si3[j]; + Si0[j + 1] = temp1; + Si1[j + 2] = temp2; + Si2[j + 3] = temp3; + Si3[j] = temp; + + temp = Sr0[j + 3]; + temp1 = Sr1[j]; + temp2 = Sr2[j + 1]; + temp3 = Sr3[j + 2]; + Sr0[j + 3] = temp3; + Sr1[j] = temp; + Sr2[j + 1] = temp1; + Sr3[j + 2] = temp2; + temp = Si0[j + 3]; + temp1 = Si1[j]; + temp2 = Si2[j + 1]; + temp3 = Si3[j + 2]; + Si0[j + 3] = temp3; + Si1[j] = temp; + Si2[j + 1] = temp1; + Si3[j + 2] = temp2; + + temp = Sr1[j + 1]; + temp1 = Sr1[j + 3]; + temp2 = Sr3[j + 1]; + temp3 = Sr3[j + 3]; + Sr1[j + 1] = temp1; + Sr1[j + 3] = temp3; + Sr3[j + 1] = temp; + Sr3[j + 3] = temp2; + temp = Si1[j + 1]; + temp1 = Si1[j + 3]; + temp2 = Si3[j + 1]; + temp3 = Si3[j + 3]; + Si1[j + 1] = temp1; + Si1[j + 3] = temp3; + Si3[j + 1] = temp; + Si3[j + 3] = temp2; + } + } + } // endof else(r!=9) + } // endof if(Shift) + else + { + if (r == 9) + { + for (i = 0, j = 0; j < n; i++, j = j + 4) + { + p = Reverse[i] << 2; + if (j < p) + { + temp = Sr0[j]; + Sr0[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j]; + Si0[j] = Si0[p]; + Si0[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j]; + Sr1[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr1[j + 1]; + Sr1[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j]; + Si1[j] = Si0[p]; + Si0[p] = temp; + temp = Si1[j + 1]; + Si1[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j]; + Sr2[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr2[j + 1]; + Sr2[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr2[j + 2]; + Sr2[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j]; + Si2[j] = Si0[p]; + Si0[p] = temp; + temp = Si2[j + 1]; + Si2[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si2[j + 2]; + Si2[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr3[j]; + Sr3[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr3[j + 1]; + Sr3[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr3[j + 2]; + Sr3[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr3[j + 3]; + Sr3[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si3[j]; + Si3[j] = Si0[p]; + Si0[p] = temp; + temp = Si3[j + 1]; + Si3[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si3[j + 2]; + Si3[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si3[j + 3]; + Si3[j + 3] = Si3[p]; + Si3[p] = temp; + } + else if (j == p) + { + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + } + } + } + else + { + r = (8 - r) * 2; + for (i = 0, j = 0; j < n; i++, j = j + 4) + { + p = Reverse[i] >> r; + if (j < p) + { + temp = Sr0[j]; + Sr0[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j]; + Si0[j] = Si0[p]; + Si0[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j]; + Sr1[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr1[j + 1]; + Sr1[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j]; + Si1[j] = Si0[p]; + Si0[p] = temp; + temp = Si1[j + 1]; + Si1[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j]; + Sr2[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr2[j + 1]; + Sr2[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr2[j + 2]; + Sr2[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j]; + Si2[j] = Si0[p]; + Si0[p] = temp; + temp = Si2[j + 1]; + Si2[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si2[j + 2]; + Si2[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr3[j]; + Sr3[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr3[j + 1]; + Sr3[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr3[j + 2]; + Sr3[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr3[j + 3]; + Sr3[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si3[j]; + Si3[j] = Si0[p]; + Si0[p] = temp; + temp = Si3[j + 1]; + Si3[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si3[j + 2]; + Si3[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si3[j + 3]; + Si3[j + 3] = Si3[p]; + Si3[p] = temp; + } + else if (j == p) + { + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + } + } + } + } // end of else(Shift) + } + else // 2-4»ìºÏ»ùËã·¨ + { + CoffR = WeightR[18 - r]; + CoffI = WeightI[18 - r]; + WR[0] = 1; + WI[0] = 0; + Space = n / 2; + Sr0 = Sr; + SR0 = Si; + Si0 = Sr + Space; + SI0 = Si + Space; + if (shift) + { + // ÏÈ×öÒ»¼¶»ù2Ëã·¨ + for (i = 0; i < Space; i++) + { + R[0] = Sr0[i] + Si0[i]; + R[1] = Sr0[i] - Si0[i]; + I[0] = SR0[i] + SI0[i]; + I[1] = SR0[i] - SI0[i]; + Sr0[i] = R[0]; + SR0[i] = R[1] * WR[0] - I[1] * WI[0]; + + Si0[i] = I[0]; + SI0[i] = R[1] * WI[0] + I[1] * WR[0]; + + temp = WR[0] * CoffR - WI[0] * CoffI; + WI[0] = WR[0] * CoffI + WI[0] * CoffR; + WR[0] = temp; + + i = i + 1; + R[0] = Sr0[i] + Si0[i]; + R[1] = Sr0[i] - Si0[i]; + I[0] = SR0[i] + SI0[i]; + I[1] = SR0[i] - SI0[i]; + Sr0[i] = -R[0]; + SR0[i] = -R[1] * WR[0] + I[1] * WI[0]; + + Si0[i] = -I[0]; + SI0[i] = -R[1] * WI[0] - I[1] * WR[0]; + + temp = WR[0] * CoffR - WI[0] * CoffI; + WI[0] = WR[0] * CoffI + WI[0] * CoffR; + WR[0] = temp; + } + } + + else + { + // ÏÈ×öÒ»¼¶»ù2Ëã·¨ + for (i = 0; i < Space; i++) + { + R[0] = Sr0[i] + Si0[i]; + R[1] = Sr0[i] - Si0[i]; + I[0] = SR0[i] + SI0[i]; + I[1] = SR0[i] - SI0[i]; + Sr0[i] = R[0]; + SR0[i] = R[1] * WR[0] - I[1] * WI[0]; + + Si0[i] = I[0]; + SI0[i] = R[1] * WI[0] + I[1] * WR[0]; + + temp = WR[0] * CoffR - WI[0] * CoffI; + WI[0] = WR[0] * CoffI + WI[0] * CoffR; + WR[0] = temp; + } + } + + r = r - 1; + // ¿ªÊ¼½øÐлù4Ëã·¨ + for (i = 0; i < r - 2; i = i + 2) + { + CoffR = WeightR[18 - r + i]; + CoffI = WeightI[18 - r + i]; + Si0 = Sr + Space; + SI0 = Si + Space; + + Stride = Space * 2; + Space = Space / 4; + StepR = CoffR; + StepI = CoffI; + + Sr1 = Sr0 + Space; + Si1 = Si0 + Space; + SR1 = SR0 + Space; + SI1 = SI0 + Space; + Sr2 = Sr1 + Space; + Si2 = Si1 + Space; + SR2 = SR1 + Space; + SI2 = SI1 + Space; + Sr3 = Sr2 + Space; + Si3 = Si2 + Space; + SR3 = SR2 + Space; + SI3 = SI2 + Space; + + for (k = 0; k < Space; k++) // ÿһ¼¶ÄÚµûʽÔËËãÊýÄ¿(n/4,n/16,n/32...) + { + if (k == 0) + { + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + R[0] = Sr0[j]; + R[1] = Sr1[j]; + R[2] = Sr2[j]; + R[3] = Sr3[j]; + I[0] = Si0[j]; + I[1] = Si1[j]; + I[2] = Si2[j]; + I[3] = Si3[j]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[j] = OutR[0]; + Sr1[j] = OutI[0]; + Sr2[j] = OutR[1]; + Sr3[j] = OutI[1]; + Si0[j] = OutR[2]; + Si1[j] = OutI[2]; + Si2[j] = OutR[3]; + Si3[j] = OutI[3]; + + R[0] = SR0[j]; + R[1] = SR1[j]; + R[2] = SR2[j]; + R[3] = SR3[j]; + I[0] = SI0[j]; + I[1] = SI1[j]; + I[2] = SI2[j]; + I[3] = SI3[j]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + SR0[j] = OutR[0]; + SR1[j] = OutI[0]; + SR2[j] = OutR[1]; + SR3[j] = OutI[1]; + SI0[j] = OutR[2]; + SI1[j] = OutI[2]; + SI2[j] = OutR[3]; + SI3[j] = OutI[3]; + } // end of stages + } + else + { + WR[0] = CoffR; + WI[0] = CoffI; + WR[1] = WR[0] * CoffR - WI[0] * CoffI; + WI[1] = WR[0] * CoffI + WI[0] * CoffR; + WR[2] = WR[1] * CoffR - WI[1] * CoffI; + WI[2] = WR[1] * CoffI + WI[1] * CoffR; + temp = CoffR * StepR - CoffI * StepI; + CoffI = CoffR * StepI + CoffI * StepR; + CoffR = temp; + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + p = j + k; + R[0] = Sr0[p]; + R[1] = Sr1[p]; + R[2] = Sr2[p]; + R[3] = Sr3[p]; + I[0] = Si0[p]; + I[1] = Si1[p]; + I[2] = Si2[p]; + I[3] = Si3[p]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[p] = OutR[0]; + Sr1[p] = OutI[0]; + Sr2[p] = OutR[1] * WR[0] - OutI[1] * WI[0]; + Sr3[p] = OutR[1] * WI[0] + OutI[1] * WR[0]; + Si0[p] = OutR[2] * WR[1] - OutI[2] * WI[1]; + Si1[p] = OutR[2] * WI[1] + OutI[2] * WR[1]; + Si2[p] = OutR[3] * WR[2] - OutI[3] * WI[2]; + Si3[p] = OutR[3] * WI[2] + OutI[3] * WR[2]; + + R[0] = SR0[p]; + R[1] = SR1[p]; + R[2] = SR2[p]; + R[3] = SR3[p]; + I[0] = SI0[p]; + I[1] = SI1[p]; + I[2] = SI2[p]; + I[3] = SI3[p]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + SR0[p] = OutR[0]; + SR1[p] = OutI[0]; + SR2[p] = OutR[1] * WR[0] - OutI[1] * WI[0]; + SR3[p] = OutR[1] * WI[0] + OutI[1] * WR[0]; + SI0[p] = OutR[2] * WR[1] - OutI[2] * WI[1]; + SI1[p] = OutR[2] * WI[1] + OutI[2] * WR[1]; + SI2[p] = OutR[3] * WR[2] - OutI[3] * WI[2]; + SI3[p] = OutR[3] * WI[2] + OutI[3] * WR[2]; + } // end of stages + } + } // end of spaces + } + + Si0 = Sr + Space; + SI0 = Si + Space; + for (i = 0; i < n; i = i + 8) + { + R[0] = Sr0[i]; + R[1] = Sr0[i + 1]; + R[2] = Sr0[i + 2]; + R[3] = Sr0[i + 3]; + I[0] = Si0[i]; + I[1] = Si0[i + 1]; + I[2] = Si0[i + 2]; + I[3] = Si0[i + 3]; + + Sr0[i] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr0[i + 1] = I[0] + I[1] + I[2] + I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr0[i + 2] = R[0] + I[1] - R[2] - I[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr0[i + 3] = I[0] - R[1] - I[2] + R[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[i] = R[0] - R[1] + R[2] - R[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si0[i + 1] = I[0] - I[1] + I[2] - I[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si0[i + 2] = R[0] - I[1] - R[2] + I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si0[i + 3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + R[0] = SR0[i]; + R[1] = SR0[i + 1]; + R[2] = SR0[i + 2]; + R[3] = SR0[i + 3]; + I[0] = SI0[i]; + I[1] = SI0[i + 1]; + I[2] = SI0[i + 2]; + I[3] = SI0[i + 3]; + + SR0[i] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + SR0[i + 1] = I[0] + I[1] + I[2] + I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + SR0[i + 2] = R[0] + I[1] - R[2] - I[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + SR0[i + 3] = I[0] - R[1] - I[2] + R[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + SI0[i] = R[0] - R[1] + R[2] - R[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + SI0[i + 1] = I[0] - I[1] + I[2] - I[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + SI0[i + 2] = R[0] - I[1] - R[2] + I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + SI0[i + 3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } + + // ÄæÐò + r = r / 2; + if (r == 8) // n=16384 + { + for (j = 0; j < 16384; j++) + { + k = Reverse[j] << 2; + i = j; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + + i = j + 16384; + k = k + 1; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + + i = j + 32768; + k = k + 1; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + + i = j + 49152; + k = k + 1; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + } + } // endof if(r==8) + else if (r == 7) // n=4096 + { + for (i = 0; i < 16384; i++) + { + k = Reverse[i]; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + } + } + else + { + r = (7 - r) * 2; + for (i = 0; i < n; i++) + { + k = Reverse[i] >> r; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + } + } + } +} +void IFFT4f(float *Sr, float *Si, int n, int shift) +{ + int i, j, k, r, p; + int Space; + int Stride; + double WR[3], WI[3], StepR, StepI, CoffR, CoffI; + double R[4], I[4], temp; + float *Sr0, *Si0, *Sr1, *Si1, *Sr2, *Si2, *Sr3, *Si3; + float *SR0, *SI0, *SR1, *SI1, *SR2, *SI2, *SR3, *SI3; + double OutR[4], OutI[4]; + double WeightR[16], WeightI[16]; + int Reverse[16384]; + int nn = 65536 * 4; + for (i = 0; i < 16; i++) + { + WeightR[i] = cos(-2 * PI * 1.0 / nn); + WeightI[i] = sin(-2 * PI * 1.0 / nn); + nn = nn / 2; + } + + r = 7; + for (i = 0; i < 16384; i++) + { + int k = 0; + int l = 4096; + int p = i; + for (int j = 0; j < r; j++) + { + if (p == 0) + break; + else + { + k = k + (p % 4) * l; + p = p / 4; + } + l = l / 4; + } + Reverse[i] = k; + } + + i = 1; + r = 0; + while (i < n) + { + i = i * 2; + r = r + 1; + } + + if (r % 2 == 0) // »ù4Ëã·¨ + { + Space = n / 4; + Stride = n; + Sr0 = Sr; + Si0 = Si; + if (shift == -1) + { + CoffR = WeightR[18 - r]; + CoffI = -WeightI[18 - r]; + StepR = CoffR; + StepI = CoffI; + Sr1 = Sr0 + Space; + Si1 = Si0 + Space; + Sr2 = Sr1 + Space; + Si2 = Si1 + Space; + Sr3 = Sr2 + Space; + Si3 = Si2 + Space; + for (k = 0; k < Space; k++) // ÿһ¼¶ÄÚµûʽÔËËãÊýÄ¿(n/4,n/16,n/32...) + { + if (k == 0) + { + R[2] = Sr0[0]; + R[3] = Sr1[0]; + R[0] = Sr2[0]; + R[1] = Sr3[0]; + I[2] = Si0[0]; + I[3] = Si1[0]; + I[0] = Si2[0]; + I[1] = Si3[0]; + + Sr0[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr3[0] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr2[0] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr1[0] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si3[0] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si2[0] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si1[0] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } + else + { + WR[0] = CoffR; + WI[0] = CoffI; + WR[1] = WR[0] * CoffR - WI[0] * CoffI; + WI[1] = WR[0] * CoffI + WI[0] * CoffR; + WR[2] = WR[1] * CoffR - WI[1] * CoffI; + WI[2] = WR[1] * CoffI + WI[1] * CoffR; + temp = CoffR * StepR - CoffI * StepI; + CoffI = CoffR * StepI + CoffI * StepR; + CoffR = temp; + R[2] = Sr0[k]; + R[3] = Sr1[k]; + R[0] = Sr2[k]; + R[1] = Sr3[k]; + I[2] = Si0[k]; + I[3] = Si1[k]; + I[0] = Si2[k]; + I[1] = Si3[k]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[3] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[1] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[3] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[1] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[k] = OutR[0]; + Si0[k] = OutI[0]; + Sr1[k] = OutR[1] * WR[0] - OutI[1] * WI[0]; + Si1[k] = OutR[1] * WI[0] + OutI[1] * WR[0]; + Sr2[k] = OutR[2] * WR[1] - OutI[2] * WI[1]; + Si2[k] = OutR[2] * WI[1] + OutI[2] * WR[1]; + Sr3[k] = OutR[3] * WR[2] - OutI[3] * WI[2]; + Si3[k] = OutR[3] * WI[2] + OutI[3] * WR[2]; + } + } // end of spaces + Space = Space / 4; + Stride = Stride / 4; + } + else if (shift == 1) + { + CoffR = WeightR[18 - r]; + CoffI = -WeightI[18 - r]; + StepR = CoffR; + StepI = CoffI; + Sr1 = Sr0 + Space; + Si1 = Si0 + Space; + Sr2 = Sr1 + Space; + Si2 = Si1 + Space; + Sr3 = Sr2 + Space; + Si3 = Si2 + Space; + for (k = 0; k < Space; k++) // ÿһ¼¶ÄÚµûʽÔËËãÊýÄ¿(n/4,n/16,n/32...) + { + if (k == 0) + { + R[0] = Sr0[0]; + R[1] = Sr1[0]; + R[2] = Sr2[0]; + R[3] = Sr3[0]; + I[0] = Si0[0]; + I[1] = Si1[0]; + I[2] = Si2[0]; + I[3] = Si3[0]; + + Sr0[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr3[0] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr2[0] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr1[0] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si3[0] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si2[0] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si1[0] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } + else + { + WR[0] = CoffR; + WI[0] = CoffI; + WR[1] = WR[0] * CoffR - WI[0] * CoffI; + WI[1] = WR[0] * CoffI + WI[0] * CoffR; + WR[2] = WR[1] * CoffR - WI[1] * CoffI; + WI[2] = WR[1] * CoffI + WI[1] * CoffR; + temp = CoffR * StepR - CoffI * StepI; + CoffI = CoffR * StepI + CoffI * StepR; + CoffR = temp; + if (k % 2 == 0) + { + R[0] = Sr0[k]; + R[1] = Sr1[k]; + R[2] = Sr2[k]; + R[3] = Sr3[k]; + I[0] = Si0[k]; + I[1] = Si1[k]; + I[2] = Si2[k]; + I[3] = Si3[k]; + } + else + { + R[0] = -Sr0[k]; + R[1] = -Sr1[k]; + R[2] = -Sr2[k]; + R[3] = -Sr3[k]; + I[0] = -Si0[k]; + I[1] = -Si1[k]; + I[2] = -Si2[k]; + I[3] = -Si3[k]; + } + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[3] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[1] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[3] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[1] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[k] = OutR[0]; + Si0[k] = OutI[0]; + Sr1[k] = OutR[1] * WR[0] - OutI[1] * WI[0]; + Si1[k] = OutR[1] * WI[0] + OutI[1] * WR[0]; + Sr2[k] = OutR[2] * WR[1] - OutI[2] * WI[1]; + Si2[k] = OutR[2] * WI[1] + OutI[2] * WR[1]; + Sr3[k] = OutR[3] * WR[2] - OutI[3] * WI[2]; + Si3[k] = OutR[3] * WI[2] + OutI[3] * WR[2]; + } + } // end of spaces + Space = Space / 4; + Stride = Stride / 4; + } + else + { + CoffR = WeightR[18 - r]; + CoffI = -WeightI[18 - r]; + StepR = CoffR; + StepI = CoffI; + Sr1 = Sr0 + Space; + Si1 = Si0 + Space; + Sr2 = Sr1 + Space; + Si2 = Si1 + Space; + Sr3 = Sr2 + Space; + Si3 = Si2 + Space; + for (k = 0; k < Space; k++) // ÿһ¼¶ÄÚµûʽÔËËãÊýÄ¿(n/4,n/16,n/32...) + { + if (k == 0) + { + R[0] = Sr0[0]; + R[1] = Sr1[0]; + R[2] = Sr2[0]; + R[3] = Sr3[0]; + I[0] = Si0[0]; + I[1] = Si1[0]; + I[2] = Si2[0]; + I[3] = Si3[0]; + + Sr0[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr3[0] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr2[0] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr1[0] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si3[0] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si2[0] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si1[0] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } + else + { + WR[0] = CoffR; + WI[0] = CoffI; + WR[1] = WR[0] * CoffR - WI[0] * CoffI; + WI[1] = WR[0] * CoffI + WI[0] * CoffR; + WR[2] = WR[1] * CoffR - WI[1] * CoffI; + WI[2] = WR[1] * CoffI + WI[1] * CoffR; + temp = CoffR * StepR - CoffI * StepI; + CoffI = CoffR * StepI + CoffI * StepR; + CoffR = temp; + R[0] = Sr0[k]; + R[1] = Sr1[k]; + R[2] = Sr2[k]; + R[3] = Sr3[k]; + I[0] = Si0[k]; + I[1] = Si1[k]; + I[2] = Si2[k]; + I[3] = Si3[k]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[3] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[1] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[3] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[1] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[k] = OutR[0]; + Si0[k] = OutI[0]; + Sr1[k] = OutR[1] * WR[0] - OutI[1] * WI[0]; + Si1[k] = OutR[1] * WI[0] + OutI[1] * WR[0]; + Sr2[k] = OutR[2] * WR[1] - OutI[2] * WI[1]; + Si2[k] = OutR[2] * WI[1] + OutI[2] * WR[1]; + Sr3[k] = OutR[3] * WR[2] - OutI[3] * WI[2]; + Si3[k] = OutR[3] * WI[2] + OutI[3] * WR[2]; + } + } // end of spaces + Space = Space / 4; + Stride = Stride / 4; + } + + for (i = 2; i < r - 2; i = i + 2) // ½×Êý + { + CoffR = WeightR[18 - r + i]; + CoffI = -WeightI[18 - r + i]; + StepR = CoffR; + StepI = CoffI; + Sr1 = Sr0 + Space; + Si1 = Si0 + Space; + Sr2 = Sr1 + Space; + Si2 = Si1 + Space; + Sr3 = Sr2 + Space; + Si3 = Si2 + Space; + for (k = 0; k < Space; k++) // ÿһ¼¶ÄÚµûʽÔËËãÊýÄ¿(n/4,n/16,n/32...) + { + if (k == 0) + { + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + R[0] = Sr0[j]; + R[1] = Sr1[j]; + R[2] = Sr2[j]; + R[3] = Sr3[j]; + I[0] = Si0[j]; + I[1] = Si1[j]; + I[2] = Si2[j]; + I[3] = Si3[j]; + + Sr0[j] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr3[j] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr2[j] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr1[j] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[j] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si3[j] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si2[j] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si1[j] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } // end of stages + } + else + { + WR[0] = CoffR; + WI[0] = CoffI; + WR[1] = WR[0] * CoffR - WI[0] * CoffI; + WI[1] = WR[0] * CoffI + WI[0] * CoffR; + WR[2] = WR[1] * CoffR - WI[1] * CoffI; + WI[2] = WR[1] * CoffI + WI[1] * CoffR; + temp = CoffR * StepR - CoffI * StepI; + CoffI = CoffR * StepI + CoffI * StepR; + CoffR = temp; + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + p = j + k; + R[0] = Sr0[p]; + R[1] = Sr1[p]; + R[2] = Sr2[p]; + R[3] = Sr3[p]; + I[0] = Si0[p]; + I[1] = Si1[p]; + I[2] = Si2[p]; + I[3] = Si3[p]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[3] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[1] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[3] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[1] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[p] = OutR[0]; + Si0[p] = OutI[0]; + Sr1[p] = OutR[1] * WR[0] - OutI[1] * WI[0]; + Si1[p] = OutR[1] * WI[0] + OutI[1] * WR[0]; + Sr2[p] = OutR[2] * WR[1] - OutI[2] * WI[1]; + Si2[p] = OutR[2] * WI[1] + OutI[2] * WR[1]; + Sr3[p] = OutR[3] * WR[2] - OutI[3] * WI[2]; + Si3[p] = OutR[3] * WI[2] + OutI[3] * WR[2]; + } // end of stages + } + } // end of spaces + Space = Space / 4; + Stride = Stride / 4; + } + + for (i = 0; i < n; i = i + 4) + { + R[0] = Sr0[i] / n; + R[1] = Sr0[i + 1] / n; + R[2] = Sr0[i + 2] / n; + R[3] = Sr0[i + 3] / n; + I[0] = Si0[i] / n; + I[1] = Si0[i + 1] / n; + I[2] = Si0[i + 2] / n; + I[3] = Si0[i + 3] / n; + + Sr0[i] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr0[i + 3] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr0[i + 2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr0[i + 1] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[i] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si0[i + 3] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si0[i + 2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si0[i + 1] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } + + // ÄæÐò + n = n / 4; + r = r / 2; + Sr1 = Sr0 + n; + Si1 = Si0 + n; + Sr2 = Sr1 + n; + Si2 = Si1 + n; + Sr3 = Sr2 + n; + Si3 = Si2 + n; + if (r == 9) + { + for (i = 0, j = 0; j < n; i++, j = j + 4) + { + p = Reverse[i] << 2; + if (j < p) + { + temp = Sr0[j]; + Sr0[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j]; + Si0[j] = Si0[p]; + Si0[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j]; + Sr1[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr1[j + 1]; + Sr1[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j]; + Si1[j] = Si0[p]; + Si0[p] = temp; + temp = Si1[j + 1]; + Si1[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j]; + Sr2[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr2[j + 1]; + Sr2[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr2[j + 2]; + Sr2[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j]; + Si2[j] = Si0[p]; + Si0[p] = temp; + temp = Si2[j + 1]; + Si2[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si2[j + 2]; + Si2[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr3[j]; + Sr3[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr3[j + 1]; + Sr3[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr3[j + 2]; + Sr3[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr3[j + 3]; + Sr3[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si3[j]; + Si3[j] = Si0[p]; + Si0[p] = temp; + temp = Si3[j + 1]; + Si3[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si3[j + 2]; + Si3[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si3[j + 3]; + Si3[j + 3] = Si3[p]; + Si3[p] = temp; + } + else if (j == p) + { + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + } + } + } + else + { + r = (8 - r) * 2; + for (i = 0, j = 0; j < n; i++, j = j + 4) + { + p = Reverse[i] >> r; + if (j < p) + { + temp = Sr0[j]; + Sr0[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j]; + Si0[j] = Si0[p]; + Si0[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j]; + Sr1[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr1[j + 1]; + Sr1[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j]; + Si1[j] = Si0[p]; + Si0[p] = temp; + temp = Si1[j + 1]; + Si1[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j]; + Sr2[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr2[j + 1]; + Sr2[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr2[j + 2]; + Sr2[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j]; + Si2[j] = Si0[p]; + Si0[p] = temp; + temp = Si2[j + 1]; + Si2[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si2[j + 2]; + Si2[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr3[j]; + Sr3[j] = Sr0[p]; + Sr0[p] = temp; + temp = Sr3[j + 1]; + Sr3[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr3[j + 2]; + Sr3[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr3[j + 3]; + Sr3[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si3[j]; + Si3[j] = Si0[p]; + Si0[p] = temp; + temp = Si3[j + 1]; + Si3[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si3[j + 2]; + Si3[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si3[j + 3]; + Si3[j + 3] = Si3[p]; + Si3[p] = temp; + } + else if (j == p) + { + temp = Sr0[j + 1]; + Sr0[j + 1] = Sr1[p]; + Sr1[p] = temp; + temp = Sr0[j + 2]; + Sr0[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr0[j + 3]; + Sr0[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si0[j + 1]; + Si0[j + 1] = Si1[p]; + Si1[p] = temp; + temp = Si0[j + 2]; + Si0[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si0[j + 3]; + Si0[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr1[j + 2]; + Sr1[j + 2] = Sr2[p]; + Sr2[p] = temp; + temp = Sr1[j + 3]; + Sr1[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si1[j + 2]; + Si1[j + 2] = Si2[p]; + Si2[p] = temp; + temp = Si1[j + 3]; + Si1[j + 3] = Si3[p]; + Si3[p] = temp; + + p = p + 1; + temp = Sr2[j + 3]; + Sr2[j + 3] = Sr3[p]; + Sr3[p] = temp; + temp = Si2[j + 3]; + Si2[j + 3] = Si3[p]; + Si3[p] = temp; + } + } + } + } + else // 2-4»ìºÏ»ùËã·¨ + { + CoffR = WeightR[18 - r]; + CoffI = WeightI[18 - r]; + WR[0] = 1; + WI[0] = 0; + Space = n / 2; + Sr0 = Sr; + SR0 = Si; + Si0 = Sr + Space; + SI0 = Si + Space; + + if (shift == -1) + { + // ÏÈ×öÒ»¼¶»ù2Ëã·¨ + for (i = 0; i < Space; i++) + { + R[0] = Si0[i] + Sr0[i]; + R[1] = Si0[i] - Sr0[i]; + I[0] = SI0[i] + SR0[i]; + I[1] = SI0[i] - SR0[i]; + Sr0[i] = R[0]; + SR0[i] = R[1] * WR[0] + I[1] * WI[0]; + + Si0[i] = -I[0]; + SI0[i] = R[1] * WI[0] - I[1] * WR[0]; + + temp = WR[0] * CoffR - WI[0] * CoffI; + WI[0] = WR[0] * CoffI + WI[0] * CoffR; + WR[0] = temp; + } + } + else if (shift == 1) + { + // ÏÈ×öÒ»¼¶»ù2Ëã·¨ + for (i = 0; i < Space; i++) + { + R[0] = Sr0[i] + Si0[i]; + R[1] = Sr0[i] - Si0[i]; + I[0] = SR0[i] + SI0[i]; + I[1] = SR0[i] - SI0[i]; + Sr0[i] = R[0]; + SR0[i] = R[1] * WR[0] + I[1] * WI[0]; + + Si0[i] = -I[0]; + SI0[i] = R[1] * WI[0] - I[1] * WR[0]; + + temp = WR[0] * CoffR - WI[0] * CoffI; + WI[0] = WR[0] * CoffI + WI[0] * CoffR; + WR[0] = temp; + + i = i + 1; + R[0] = Sr0[i] + Si0[i]; + R[1] = Si0[i] - Sr0[i]; + I[0] = SR0[i] + SI0[i]; + I[1] = SI0[i] - SR0[i]; + Sr0[i] = -R[0]; + SR0[i] = R[1] * WR[0] + I[1] * WI[0]; + + Si0[i] = I[0]; + SI0[i] = R[1] * WI[0] - I[1] * WR[0]; + + temp = WR[0] * CoffR - WI[0] * CoffI; + WI[0] = WR[0] * CoffI + WI[0] * CoffR; + WR[0] = temp; + } + } + + else + { + // ÏÈ×öÒ»¼¶»ù2Ëã·¨ + for (i = 0; i < Space; i++) + { + R[0] = Sr0[i] + Si0[i]; + R[1] = Sr0[i] - Si0[i]; + I[0] = SR0[i] + SI0[i]; + I[1] = SR0[i] - SI0[i]; + Sr0[i] = R[0]; + SR0[i] = R[1] * WR[0] + I[1] * WI[0]; + + Si0[i] = -I[0]; + SI0[i] = R[1] * WI[0] - I[1] * WR[0]; + + temp = WR[0] * CoffR - WI[0] * CoffI; + WI[0] = WR[0] * CoffI + WI[0] * CoffR; + WR[0] = temp; + } + } + + r = r - 1; + // ¿ªÊ¼½øÐлù4Ëã·¨ + for (i = 0; i < r - 2; i = i + 2) + { + CoffR = WeightR[18 - r + i]; + CoffI = WeightI[18 - r + i]; + Si0 = Sr + Space; + SI0 = Si + Space; + Stride = Space * 2; + Space = Space / 4; + StepR = CoffR; + StepI = CoffI; + + Sr1 = Sr0 + Space; + Si1 = Si0 + Space; + SR1 = SR0 + Space; + SI1 = SI0 + Space; + Sr2 = Sr1 + Space; + Si2 = Si1 + Space; + SR2 = SR1 + Space; + SI2 = SI1 + Space; + Sr3 = Sr2 + Space; + Si3 = Si2 + Space; + SR3 = SR2 + Space; + SI3 = SI2 + Space; + + for (k = 0; k < Space; k++) // ÿһ¼¶ÄÚµûʽÔËËãÊýÄ¿(n/4,n/16,n/32...) + { + if (k == 0) + { + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + R[0] = Sr0[j]; + R[1] = Sr1[j]; + R[2] = Sr2[j]; + R[3] = Sr3[j]; + I[0] = Si0[j]; + I[1] = Si1[j]; + I[2] = Si2[j]; + I[3] = Si3[j]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[j] = OutR[0]; + Sr1[j] = OutI[0]; + Sr2[j] = OutR[1]; + Sr3[j] = OutI[1]; + Si0[j] = OutR[2]; + Si1[j] = OutI[2]; + Si2[j] = OutR[3]; + Si3[j] = OutI[3]; + + R[0] = SR0[j]; + R[1] = SR1[j]; + R[2] = SR2[j]; + R[3] = SR3[j]; + I[0] = SI0[j]; + I[1] = SI1[j]; + I[2] = SI2[j]; + I[3] = SI3[j]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + SR0[j] = OutR[0]; + SR1[j] = OutI[0]; + SR2[j] = OutR[1]; + SR3[j] = OutI[1]; + SI0[j] = OutR[2]; + SI1[j] = OutI[2]; + SI2[j] = OutR[3]; + SI3[j] = OutI[3]; + } // end of stages + } + else + { + WR[0] = CoffR; + WI[0] = CoffI; + WR[1] = WR[0] * CoffR - WI[0] * CoffI; + WI[1] = WR[0] * CoffI + WI[0] * CoffR; + WR[2] = WR[1] * CoffR - WI[1] * CoffI; + WI[2] = WR[1] * CoffI + WI[1] * CoffR; + temp = CoffR * StepR - CoffI * StepI; + CoffI = CoffR * StepI + CoffI * StepR; + CoffR = temp; + for (j = 0; j < n; j += Stride) // ÿһ½×ÄÚÔËËã¼¶Êý(1,4,8,16...) + { + p = j + k; + R[0] = Sr0[p]; + R[1] = Sr1[p]; + R[2] = Sr2[p]; + R[3] = Sr3[p]; + I[0] = Si0[p]; + I[1] = Si1[p]; + I[2] = Si2[p]; + I[3] = Si3[p]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + Sr0[p] = OutR[0]; + Sr1[p] = OutI[0]; + Sr2[p] = OutR[1] * WR[0] - OutI[1] * WI[0]; + Sr3[p] = OutR[1] * WI[0] + OutI[1] * WR[0]; + Si0[p] = OutR[2] * WR[1] - OutI[2] * WI[1]; + Si1[p] = OutR[2] * WI[1] + OutI[2] * WR[1]; + Si2[p] = OutR[3] * WR[2] - OutI[3] * WI[2]; + Si3[p] = OutR[3] * WI[2] + OutI[3] * WR[2]; + + R[0] = SR0[p]; + R[1] = SR1[p]; + R[2] = SR2[p]; + R[3] = SR3[p]; + I[0] = SI0[p]; + I[1] = SI1[p]; + I[2] = SI2[p]; + I[3] = SI3[p]; + + OutR[0] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + OutR[1] = R[0] + I[1] - R[2] - I[3]; // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + OutR[2] = R[0] - R[1] + R[2] - R[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + OutR[3] = R[0] - I[1] - R[2] + I[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + OutI[0] = I[0] + I[1] + I[2] + I[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + OutI[1] = I[0] - R[1] - I[2] + R[3]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + OutI[2] = I[0] - I[1] + I[2] - I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + OutI[3] = I[0] + R[1] - I[2] - R[3]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + SR0[p] = OutR[0]; + SR1[p] = OutI[0]; + SR2[p] = OutR[1] * WR[0] - OutI[1] * WI[0]; + SR3[p] = OutR[1] * WI[0] + OutI[1] * WR[0]; + SI0[p] = OutR[2] * WR[1] - OutI[2] * WI[1]; + SI1[p] = OutR[2] * WI[1] + OutI[2] * WR[1]; + SI2[p] = OutR[3] * WR[2] - OutI[3] * WI[2]; + SI3[p] = OutR[3] * WI[2] + OutI[3] * WR[2]; + } // end of stages + } + } // end of spaces + } + + Si0 = Sr + Space; + SI0 = Si + Space; + for (i = 0; i < n; i = i + 8) + { + R[0] = Sr0[i] / n; + R[1] = Sr0[i + 1] / n; + R[2] = Sr0[i + 2] / n; + R[3] = Sr0[i + 3] / n; + I[0] = Si0[i] / n; + I[1] = Si0[i + 1] / n; + I[2] = Si0[i + 2] / n; + I[3] = Si0[i + 3] / n; + + Sr0[i] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + Sr0[i + 1] = -(I[0] + I[1] + I[2] + I[3]); // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + Sr0[i + 2] = R[0] + I[1] - R[2] - I[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + Sr0[i + 3] = R[1] - I[0] + I[2] - R[3]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + Si0[i] = R[0] - R[1] + R[2] - R[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + Si0[i + 1] = I[1] - I[0] + I[3] - I[2]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + Si0[i + 2] = R[0] - I[1] - R[2] + I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + Si0[i + 3] = I[2] + R[3] - I[0] - R[1]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + + R[0] = SR0[i] / n; + R[1] = SR0[i + 1] / n; + R[2] = SR0[i + 2] / n; + R[3] = SR0[i + 3] / n; + I[0] = SI0[i] / n; + I[1] = SI0[i + 1] / n; + I[2] = SI0[i + 2] / n; + I[3] = SI0[i + 3] / n; + + SR0[i] = R[0] + R[1] + R[2] + R[3]; // OutR[0]=(R[0]+R[2])+(R[1]+R[3]); + SR0[i + 1] = -(I[0] + I[1] + I[2] + I[3]); // OutR[1]=(R[0]-R[2])+(I[1]-I[3]); + SR0[i + 2] = R[0] + I[1] - R[2] - I[3]; // OutR[2]=(R[0]+R[2])-(R[1]+R[3]); + SR0[i + 3] = I[2] - R[3] - I[0] + R[1]; // OutR[3]=(R[0]-R[2])-(I[1]-I[3]); + + SI0[i] = R[0] - R[1] + R[2] - R[3]; // OutI[0]=(I[0]+I[2])+(I[1]+I[3]); + SI0[i + 1] = I[1] - I[0] + I[3] - I[2]; // OutI[1]=(I[0]-I[2])-(R[1]-R[3]); + SI0[i + 2] = R[0] - I[1] - R[2] + I[3]; // OutI[2]=(I[0]+I[2])-(I[1]+I[3]); + SI0[i + 3] = I[2] + R[3] - I[0] - R[1]; // OutI[3]=(I[0]-I[2])+(R[1]-R[3]); + } + + // ÄæÐò + r = r / 2; + if (r == 8) // n=16384 + { + for (j = 0; j < 16384; j++) + { + k = Reverse[j] << 2; + i = j; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + + i = j + 16384; + k = k + 1; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + + i = j + 32768; + k = k + 1; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + + i = j + 49152; + k = k + 1; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + } + } // endof if(r==8) + else if (r == 7) // n=4096 + { + for (i = 0; i < 16384; i++) + { + k = Reverse[i]; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + } + } + else + { + r = (7 - r) * 2; + for (i = 0; i < n; i++) + { + k = Reverse[i] >> r; + if (i < k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[1] = Sr[2 * k]; + I[1] = Sr[2 * k + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + R[3] = Si[2 * k]; + I[3] = Si[2 * k + 1]; + + Sr[2 * i] = R[1]; + Sr[2 * i + 1] = R[3]; + Sr[2 * k] = R[0]; + Sr[2 * k + 1] = R[2]; + Si[2 * i] = I[1]; + Si[2 * i + 1] = I[3]; + Si[2 * k] = I[0]; + Si[2 * k + 1] = I[2]; + } + else if (i == k) + { + R[0] = Sr[2 * i]; + I[0] = Sr[2 * i + 1]; + R[2] = Si[2 * i]; + I[2] = Si[2 * i + 1]; + Sr[2 * i] = R[0]; + Sr[2 * i + 1] = R[2]; + Si[2 * i] = I[0]; + Si[2 * i + 1] = I[2]; + } + } + } + } +} +// Ñ­»·Æ«ÒÆ£¬Æ«ÒÆÁ¿Îªpianyi£¬ÕýÓÒÒÆ£¬¸º×óÒÆ +void cirshift(float *data_r, float *data_i, int length, int pianyi) +{ + int i, j; + float *temp; + temp = new float[length]; + for (i = 0; i < length; i++) + { + temp[i] = data_r[i]; + } + for (i = 0; i < length; i++) + { + j = i - pianyi; + j = ((j + length) % length); // Ñ­»· + data_r[i] = temp[j]; + } + for (i = 0; i < length; i++) + { + temp[i] = data_i[i]; + } + for (i = 0; i < length; i++) + { + j = i - pianyi; + j = ((j + length) % length); // Ñ­»· + data_i[i] = temp[j]; + } + + delete[] temp; +} \ No newline at end of file diff --git a/master/html/_static/hrrp/FFT4f.h b/master/html/_static/hrrp/FFT4f.h new file mode 100644 index 00000000..b7706318 --- /dev/null +++ b/master/html/_static/hrrp/FFT4f.h @@ -0,0 +1,12 @@ +#ifndef FFT4F_H +#define FFT4F_H + +#define PI 3.1415926535897 +#define LC 299.792458 + +#define UINT64 double + +void FFT4f(float *Sr, float *Si, int n, int shift); +void IFFT4f(float *Sr, float *Si, int n, int shift); +void cirshift(float *data_r,float *data_i,int length,int pianyi); +#endif diff --git a/master/html/_static/hrrp/Keystone.cpp b/master/html/_static/hrrp/Keystone.cpp new file mode 100644 index 00000000..4b4ad377 --- /dev/null +++ b/master/html/_static/hrrp/Keystone.cpp @@ -0,0 +1,908 @@ + +// KeystoneDlg.cpp : ?????? +// +#include "stdlib.h" +#include "math.h" +#include "stdio.h" +#include "string.h" +#include "FFT4f.h" + +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// ????????Keystone??? ??? +int Get2intm(int intnumb) +{ + float nn= ceilf(log10(float(intnumb))/log10(2.0)); + return(pow(float(2.0),float(nn))); +} +void stoltsun(float *a_in, float *a_value, int a_size, float *b_in, int b_size, float *b_value) +{ + + int n,m,m1,n1,n2,i,j,k; + float z,h1,h2,h3,h4; + float *b,*h,*dy,*s2,*s,*e; + m=b_size; + while (b_in[0]a_in[a_size-1]) + { + m=m-1; + } + //m2=m;//m??????????????? + n=a_size; + n1=n-1; + n2=n-2; + + + h=new float[n1]; + dy=new float[n1]; + s2=new float[n]; + s=new float[n1]; + e=new float[n2]; + + + for( i=0;i0;i--) + { + k=i-1; + s2[i]=s[k]*s2[i+1]+e[k]; + } + + + for( i=0;ia_in[i]) + { + k=i;i=i+1; + } + h1=b_in[j]-a_in[k]; + h2=b_in[j]-a_in[i]; + h3=h1*h2; + h4=s2[k]+h1*s[k]; + z=(s2[i]+s2[k]+h4)/6.0; + + b_value[j+m1]=a_value[k]+h1*dy[k]+h3*z; + } + + for( i=0;i a_in[a_size - 1]) + { + m = m - 1; + } + //m2=m;//m??????????????? + n = a_size; + n1 = n - 1; + n2 = n - 2; + + + h = new float[n1]; + dy = new float[n1]; + s2 = new float[n]; + s = new float[n1]; + e = new float[n2]; + + + for (i = 0; i < n1; i++) + { + h[i] = a_in[i + 1] - a_in[i]; + dy[i] = (a_value[i + 1] - a_value[i]) / h[i]; + } + s2[0] = 0; + s2[n - 1] = 0; + for (i = 1; i < n1; i++) + { + s2[i] = 6.0 * (dy[i] - dy[i - 1]); + } + z = 0.5 / (h[0] + h[1]); + s[0] = -h[1] * z; + e[0] = s2[1] * z; + for (i = 1; i < n2; i++) + { + k = i - 1; + j = i + 1; + z = 1 / (2 * (h[i] + h[j]) + h[i] * s[k]); + s[i] = -h[j] * z; + e[i] = (s2[j] - h[i] * e[k]) * z; + } + s2[n1 - 1] = e[n2 - 1]; + for (i = n2 - 1; i > 0; i--) + { + k = i - 1; + s2[i] = s[k] * s2[i + 1] + e[k]; + } + + //if(num==200) + //{ + // FILE* datar; + // datar = fopen("E:\\7004\\6678\\S2.dat", "wb"); + + // fwrite(s2, 4, a_size, datar); + + // fclose(datar);//gqy + + //} + + + for (i = 0; i < n1; i++) + { + s[i] = (s2[i + 1] - s2[i]) / (a_in[i + 1] - a_in[i]); + } + + i = 1; k = 0; + + for (j = 0; j < m; j++) + { + while (b_in[j] > a_in[i]) + { + k = i; i = i + 1; + } + h1 = b_in[j] - a_in[k]; + h2 = b_in[j] - a_in[i]; + h3 = h1 * h2; + h4 = s2[k] + h1 * (s2[i] - s2[k]) / (a_in[i] - a_in[k]); + z = (s2[i] + s2[k] + h4) / 6.0; + + b_value[j + m1] = a_value[k] + h1 * (a_value[i] - a_value[k]) / (a_in[i] - a_in[k]) + h3 * z; + } + + for (i = 0; i < m1; i++) + b_value[i] = 0; + + for (i = m1 + m; i < b_size; i++) + b_value[i] = 0; + + delete[]h; + delete[]dy; + delete[]s2; + delete[]s; + delete[]e; +} +// data?????????????????(?§Ö???????2????)?????????(?§Ö??????????2????? +void Keystone_interp(float **data_r,float **data_i,int fwn,int jln, float f0,float fs,float B,int moshuzhouqishu) +{ + int i,j,k; + int rnfft; + double sigma; + int wuxiaodiansujl; + float *tempr,*tempi,*tempf; + float *xold,*xnew; + int fwn_8; + fwn_8=(fwn+7)/8*8; + xold = new float[fwn_8]; + xnew = new float[fwn_8]; + + + rnfft=Get2intm(jln); + + //?????? + tempr = new float[fwn_8]; + tempi = new float[fwn_8]; + tempf = new float[fwn_8]; + + //???§Ò????????? + if (rnfft>jln) + { + for (i=0;i>3)<<3;//?????DSP??? + if(wuxiaodiansujl<0) wuxiaodiansujl=0; + double angle[400]; + double br[400]; + double bi[400]; + /*double angle[525]; + double br[525]; + double bi[525];*/ + //wuxiaodiansujl=504; + for (i = wuxiaodiansujl; i < rnfft - wuxiaodiansujl; i++)//?????????? + { + double pindian = (i - 0.5 * rnfft) * fs / rnfft; + for (j = 0; j < fwn; j++) + { + angle[j] = -2 * PI * moshuzhouqishu * j * pindian / f0; + br[j] = cos(angle[j]); + bi[j] = sin(angle[j]); + tempr[j] = br[j] * data_r[j][i] - bi[j] * data_i[j][i]; + tempi[j] = br[j] * data_i[j][i] + bi[j] * data_r[j][i]; + } + for (j = fwn; j < fwn_8; j++) + { + tempr[j] = 0; + tempi[j] = 0; + } + + + sigma = (f0 + (i - rnfft * 0.5) * fs / rnfft) / f0; // + + // real + for (j=0;ja[i]) + { + fmax=a[i]; + maxpos=i; + } + } + return maxpos; +} + +// ???hrrp??????? +float Gethrrp_v2shang(float *x,int n) +{ + double sum=0; + for (int i = 0; i < n; i++) + { + sum = sum + x[i]*x[i]; + } + if (sum>1e-10) + { + double shang = 0; + for (int i = 0; i < n; i++) + { + double t = x[i]/sum; + shang = shang -t*log(t); + } + return shang; + } + else + { + return 0; + } +} + +/************????float???**************************/ +float Getmean_float(float *x, int n) +{ + if (n > 0) + { + /*??????*/ + double y = 1.0 / (double)(n); + /*???*/ + double z = 0; + for (int i = 0; i < n; i++) + { + z = z + y * x[i]; + } + /*????*/ + return (float)z; + } + /*??????*/ + else + { + return 301; + } +} + +/*/ *h ??????????*/ +/*/ *N ???????*/ +/*/ param2 ??????? ??? 20 ~50 */ +void TaiLeWindow(float *h, int N, float param2) +{ + N = N>0?N:1; + int i; + int nLevel; + float nsll; + nLevel = 5; + /*??????*/ + if (param2 <13.0) + { + nsll = 45; + } + else + { + nsll = param2; + } + /*??????*/ + float *m_dFm; + /*???????*/ + double mB = pow(10.0, nsll / 20.0); + double mA = log(mB + sqrt(mB * mB - 1.0)) / PI; + double msquaQ = nLevel * nLevel / (mA * mA + (nLevel - 0.5) * (nLevel - 0.5)); + m_dFm = (float *)calloc(nLevel, sizeof(float)); + double mtmpa; + double mtmpb; + /*????????*/ + for (int m = 0; m < nLevel - 1; m++) + { + mtmpa = 1; + mtmpb = 1; + for (i = 0; i < nLevel - 1; i++) + { + mtmpa *= (1 - (m + 1.0) * (m + 1.0) / (msquaQ * (mA * mA + (i + 0.5) * (i + 0.5)))); + if (m == i) + continue; + mtmpb *= (1 - (m + 1) * (m + 1) / ((i + 1.0) * (i + 1.0))); + } + /*?????????*/ + m_dFm[m] = (float)(pow((-1.0), (m + 2.0)) * mtmpa / (2.0 * mtmpb)); + } + /*???????*/ + for (i = 0; i < N; i++) + { + double dwin = 0; + for (int m = 0; m < nLevel - 1; m++) + { + dwin += m_dFm[m] * cos(2.0 * PI * (m + 1) * (i - N / 2.0 + 0.5) / (float)(N)); //..(i+1-N/2.0+0.5)/N) + } + h[i] = (float)(1 + 2.0 * dwin); + } + /*??????*/ + free(m_dFm); + m_dFm = NULL; + /*???*/ + float mean = Getmean_float(h, N); + //float fMax=GetMaxValue(h, N); + /*?????*/ + if (fabs(mean)<1e-15) + { + + } + else + { + for (i = 0; i < N; i++) + { + h[i] = h[i] / mean; + } + } +} + +// ??????????hrrp?? +// ?????????????????? ????? +void Gethrrp_v3(float **dr,float **di,int hangmc,int liejln,float *hrrp) +{ + float *ar,*ai; + float *fd; + float *mchtr; + mchtr = new float[hangmc]; + int afftn = Get2intm(hangmc); + ar = new float[afftn]; + ai = new float[afftn]; + fd = new float[afftn]; +/////////////???4 ????¦Ë??hrrp + TaiLeWindow(mchtr,hangmc,50); + + for (int i = 0; i < liejln; i++) + { + for (int j=0;j { - const [docname, title, anchor, descr, score, filename, kind] = result + const [docname, title, anchor, descr, score, filename] = result return score }, */ @@ -40,14 +47,6 @@ if (typeof Scorer === "undefined") { }; } -// Global search result kind enum, used by themes to style search results. -class SearchResultKind { - static get index() { return "index"; } - static get object() { return "object"; } - static get text() { return "text"; } - static get title() { return "title"; } -} - const _removeChildren = (element) => { while (element && element.lastChild) element.removeChild(element.lastChild); }; @@ -58,20 +57,16 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, searchTerms, highlightTerms) => { +const _displayItem = (item, searchTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; - const contentRoot = document.documentElement.dataset.content_root; - const [docName, title, anchor, descr, score, _filename, kind] = item; + const [docName, title, anchor, descr, score, _filename] = item; let listItem = document.createElement("li"); - // Add a class representing the item's type: - // can be used by a theme's CSS selector for styling - // See SearchResultKind for the class names. - listItem.classList.add(`kind-${kind}`); let requestUrl; let linkUrl; if (docBuilder === "dirhtml") { @@ -80,35 +75,28 @@ const _displayItem = (item, searchTerms, highlightTerms) => { if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; - requestUrl = contentRoot + dirname; + requestUrl = docUrlRoot + dirname; linkUrl = requestUrl; } else { // normal html builders - requestUrl = contentRoot + docName + docFileSuffix; + requestUrl = docUrlRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; - if (descr) { + if (descr) listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; - // highlight search terms in the description - if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js - highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); - } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms, anchor) + Search.makeSearchSummary(data, searchTerms) ); - // highlight search terms in the summary - if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js - highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; @@ -120,46 +108,27 @@ const _finishSearch = (resultCount) => { "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." ); else - Search.status.innerText = Documentation.ngettext( - "Search finished, found one page matching the search query.", - "Search finished, found ${resultCount} pages matching the search query.", - resultCount, - ).replace('${resultCount}', resultCount); + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); }; const _displayNextItem = ( results, resultCount, - searchTerms, - highlightTerms, + searchTerms ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), searchTerms, highlightTerms); + _displayItem(results.pop(), searchTerms); setTimeout( - () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + () => _displayNextItem(results, resultCount, searchTerms), 5 ); } // search finished, update title and status message else _finishSearch(resultCount); }; -// Helper function used by query() to order search results. -// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. -// Order the results by score (in opposite order of appearance, since the -// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. -const _orderResultsByScoreThenName = (a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; -}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -183,26 +152,13 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString, anchor) => { + htmlToText: (htmlString) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - for (const removalQuery of [".headerlink", "script", "style"]) { - htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); - } - if (anchor) { - const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); - if (anchorContent) return anchorContent.textContent; - - console.warn( - `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` - ); - } - - // if anchor not specified or not found, fall back to main content + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent) return docContent.textContent; - + if (docContent !== undefined) return docContent.textContent; console.warn( - "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." ); return ""; }, @@ -255,7 +211,6 @@ const Search = { searchSummary.classList.add("search-summary"); searchSummary.innerText = ""; const searchList = document.createElement("ul"); - searchList.setAttribute("role", "list"); searchList.classList.add("search"); const out = document.getElementById("search-results"); @@ -276,7 +231,16 @@ const Search = { else Search.deferQuery(query); }, - _parseQuery: (query) => { + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -312,40 +276,22 @@ const Search = { // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; - }, - - /** - * execute search (requires search index to be loaded) - */ - _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - - // Collect multiple result groups to be sorted separately and then ordered. - // Each is an array of [docname, title, anchor, descr, score, filename, kind]. - const normalResults = []; - const nonMainIndexResults = []; - + // array of [docname, title, anchor, descr, score, filename] + let results = []; _removeChildren(document.getElementById("search-progress")); - const queryLower = query.toLowerCase().trim(); + const queryLower = query.toLowerCase(); for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - const score = Math.round(Scorer.title * queryLower.length / title.length); - const boost = titles[file] === title ? 1 : 0; // add a boost for document titles - normalResults.push([ + let score = Math.round(100 * queryLower.length / title.length) + results.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score + boost, + score, filenames[file], - SearchResultKind.title, ]); } } @@ -354,48 +300,46 @@ const Search = { // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id, isMain] of foundEntries) { - const score = Math.round(100 * queryLower.length / entry.length); - const result = [ + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], - SearchResultKind.index, - ]; - if (isMain) { - normalResults.push(result); - } else { - nonMainIndexResults.push(result); - } + ]); } } } // lookup as object objectTerms.forEach((term) => - normalResults.push(...Search.performObjectSearch(term, objectTerms)) + results.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) { - normalResults.forEach((item) => (item[4] = Scorer.score(item))); - nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); - } + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - // Sort each group of results by score and then alphabetically by name. - normalResults.sort(_orderResultsByScoreThenName); - nonMainIndexResults.sort(_orderResultsByScoreThenName); - - // Combine the result groups in (reverse) order. - // Non-main index entries are typically arbitrary cross-references, - // so display them after other results. - let results = [...nonMainIndexResults, ...normalResults]; + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -409,19 +353,14 @@ const Search = { return acc; }, []); - return results.reverse(); - }, - - query: (query) => { - const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); - const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + results = results.reverse(); // for debugging //Search.lastresults = results.slice(); // a copy // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, searchTerms, highlightTerms); + _displayNextItem(results, results.length, searchTerms); }, /** @@ -485,7 +424,6 @@ const Search = { descr, score, filenames[match[0]], - SearchResultKind.object, ]); }; Object.keys(objects).forEach((prefix) => @@ -520,18 +458,14 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - if (!terms.hasOwnProperty(word)) { - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord)) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - } - if (!titleTerms.hasOwnProperty(word)) { - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord)) - arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); - }); - } + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); } // no match but word was a required one @@ -554,8 +488,9 @@ const Search = { // create the mapping files.forEach((file) => { - if (!fileMap.has(file)) fileMap.set(file, [word]); - else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); }); }); @@ -596,7 +531,6 @@ const Search = { null, score, filenames[file], - SearchResultKind.text, ]); } return results; @@ -607,8 +541,8 @@ const Search = { * search summary for a given text. keywords is a list * of stemmed words. */ - makeSearchSummary: (htmlText, keywords, anchor) => { - const text = Search.htmlToText(htmlText, anchor); + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); if (text === "") return null; const textLower = text.toLowerCase(); diff --git a/master/html/_static/sphinx_highlight.js b/master/html/_static/sphinx_highlight.js index 8a96c69a..aae669d7 100644 --- a/master/html/_static/sphinx_highlight.js +++ b/master/html/_static/sphinx_highlight.js @@ -29,19 +29,14 @@ const _highlight = (node, addItems, text, className) => { } span.appendChild(document.createTextNode(val.substr(pos, text.length))); - const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( - rest, + document.createTextNode(val.substr(pos + text.length)), node.nextSibling ) ); node.nodeValue = val.substr(0, pos); - /* There may be more occurrences of search term in this node. So call this - * function recursively on the remaining fragment. - */ - _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( @@ -145,10 +140,5 @@ const SphinxHighlight = { }, }; -_ready(() => { - /* Do not call highlightSearchWords() when we are on the search page. - * It will highlight words from the *previous* search query. - */ - if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); - SphinxHighlight.initEscapeListener(); -}); +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/master/html/appdevelop/ai_dsp/gray_cnn.html b/master/html/appdevelop/ai_dsp/gray_cnn.html index 8c580f51..f81ffe5a 100644 --- a/master/html/appdevelop/ai_dsp/gray_cnn.html +++ b/master/html/appdevelop/ai_dsp/gray_cnn.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -95,9 +95,9 @@
-

GRAY_CNN(图片ç°åº¦åŒ–处ç†+图片识别)ïƒ

+

GRAY_CNN(图片ç°åº¦åŒ–处ç†+图片识别)ïƒ

-

应用概述ïƒ

+

应用概述ïƒ

这里将以图片ç°åº¦åŒ–加图片识别æ¥ä»‹ç»AI+DSP应用开å‘çš„å¼€å‘æµç¨‹ã€‚ 其中图片ç°åº¦åŒ–å¯ä»¥ä½¿ç”¨DSPæ¥å®Œæˆï¼Œå›¾ç‰‡è¯†åˆ«åˆ™ä½¿ç”¨AIæ¥å®Œæˆã€‚ @@ -105,9 +105,9 @@

-

开呿µç¨‹ïƒ

+

开呿µç¨‹ïƒ

-

1. 定义模型ïƒ

+

1. 定义模型ïƒ

  • 图片ç°åº¦åŒ–处ç†è¿‡ç¨‹ã€‚

  • @@ -266,7 +266,7 @@ CNN模型架构如下表所示:

-

2. 模型训练ïƒ

+

2. 模型训练ïƒ

CNN模型需è¦è¿›è¡Œè®­ç»ƒæ‰èƒ½æ­£ç¡®è¯†åˆ«ï¼Œè®­ç»ƒéœ€è¦æ•°æ®é›†ï¼Œè¿™é‡Œå·²ç»æå‰å‡†å¤‡å¥½æ•°æ®é›†ï¼Œæ”¾åœ¨Target文件夹下, 使用MindSpore框架进行模型训练,需è¦å¯¼å…¥ç›¸å…³åº“和模å—,定义数æ®é¢„处ç†ã€æ¨¡åž‹ç»“æž„ã€æŸå¤±å‡½æ•°å’Œä¼˜åŒ–器等。 @@ -335,7 +335,7 @@ CNN模型架构如下表所示:

-

3. 釿–°ç»„网ïƒ

+

3. 釿–°ç»„网ïƒ

在å‰é¢ç« èŠ‚ä¸­ï¼Œæˆ‘ä»¬å·²ç»å®Œæˆäº†AI的模型的训练和导出。 需è¦é‡æ–°æž„建æˆä¸€ä¸ªæ–°çš„网络结构,å¯ä»¥ä½¿ç”¨MindSpore框架的 nn.GraphCell() æŽ¥å£æ¥å®žçŽ°ã€‚ @@ -420,7 +420,7 @@ CNN模型架构如下表所示:

-

4. è½¬æ¢æ¨¡åž‹ïƒ

+

4. è½¬æ¢æ¨¡åž‹ïƒ

在å‰é¢çš„代ç ä¸­ï¼Œæˆ‘们已ç»ä½¿ç”¨äº† export 方法导出了gray_cnn.mindir模型。 è¦å°†è¯¥æ¨¡åž‹éƒ¨ç½²åˆ°FT78NEå¹³å°ï¼Œéœ€è¦å°†MINDIRæ ¼å¼è½¬æ¢æˆmindspore liteçš„msæ ¼å¼æ¨¡åž‹ã€‚ @@ -433,19 +433,17 @@ CNN模型架构如下表所示:

转æ¢å®ŒæˆåŽï¼Œä¼šåœ¨å½“å‰ç›®å½•下生æˆgray_cnn.ms模型文件。该模型å¯ä»¥ä½¿ç”¨å¯è§†åŒ–工具(netron)å¯ä»¥æ‰“开该文件,查看模型结构。 该工具å¯ä»¥ç›´æŽ¥åœ¨ YHFT-IDE 中使用,å¯ä»¥ä»Žå®˜ç½‘下载使用,也å¯ä»¥åœ¨çº¿ä½¿ç”¨ã€‚在线地å€ä¸ºï¼šhttps://netron.app/。

该模型文件å¯è§†åŒ–如图所示:

-gray_cnn模型结构图 - +gray_cnn模型结构图
-

5. 部署和è¿è¡Œç¨‹åºïƒ

+

5. 部署和è¿è¡Œç¨‹åºïƒ

  • 在IDE中新建一个Python项目,将下é¢çš„ python完整代ç ç¤ºä¾‹ ä»£ç æ‹·è´åˆ°é¡¹ç›®ä¸­ï¼Œå¹¶è¿è¡Œã€‚ è¿è¡ŒæˆåŠŸåŽï¼Œä¼šåœ¨å½“å‰ç›®å½•下生æˆä¸€ä¸ªå为 gray_cnn.midir 的模型文件,以åŠè¾“出图片的预测结果。 结果如图所示:

    -pythonè¿è¡Œç»“æžœ - +pythonè¿è¡Œç»“æžœ

    将该文件转æ¢ä¸ºmsæ ¼å¼ï¼Œå¹¶å°†msæ ¼å¼æ¨¡åž‹å’Œæµ‹è¯•图片拷è´åˆ°FT78NEå¹³å°ä¸­ã€‚

  • 打开 YHFT-IDE ,新建工程。输入工程åã€è·¯å¾„,工程类型选择 Heterogeneous , @@ -566,13 +564,12 @@ CNN模型架构如下表所示:

执行结果如下图:

-FT78NEè¿è¡Œç»“æžœ - +FT78NEè¿è¡Œç»“æžœ
-

python完整代ç ç¤ºä¾‹ïƒ

+

python完整代ç ç¤ºä¾‹ïƒ

 1# CNN.py
  2import mindspore as ms
diff --git a/master/html/appdevelop/ai_dsp/index.html b/master/html/appdevelop/ai_dsp/index.html
index 990dd2b1..a80f5513 100644
--- a/master/html/appdevelop/ai_dsp/index.html
+++ b/master/html/appdevelop/ai_dsp/index.html
@@ -1,7 +1,7 @@
 
 
 
-
+
 
   
 
@@ -15,11 +15,10 @@
   
       
       
-      
-      
-      
+      
+      
+      
       
-      
       
     
     
@@ -89,7 +88,7 @@
            
-

AI+DSP应用示例ïƒ

+

AI+DSP应用示例ïƒ

  • GRAY_CNN(图片ç°åº¦åŒ–处ç†+图片识别)
  • diff --git a/master/html/appdevelop/autocodegen/index.html b/master/html/appdevelop/autocodegen/index.html index ba2cf8d8..dd85220d 100644 --- a/master/html/appdevelop/autocodegen/index.html +++ b/master/html/appdevelop/autocodegen/index.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -87,7 +87,7 @@
    -

    AI辅助开å‘示例ïƒ

    +

    AI辅助开å‘示例ïƒ

    diff --git a/master/html/appdevelop/dsp/hrrp.html b/master/html/appdevelop/dsp/hrrp.html index 969dd774..5b8db019 100644 --- a/master/html/appdevelop/dsp/hrrp.html +++ b/master/html/appdevelop/dsp/hrrp.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -97,9 +97,9 @@
    -

    HRRP(高分辨率è·ç¦»åƒç®—法)ïƒ

    +

    HRRP(高分辨率è·ç¦»åƒç®—法)ïƒ

    -

    算法概述ïƒ

    +

    算法概述ïƒ

    高分辨率è·ç¦»åƒï¼ˆHigh Resolution Range Profile, HRRP)是雷达信å·å¤„ç†ä¸­çš„æ ¸å¿ƒæŠ€æœ¯ï¼Œé€šè¿‡å¯¹é›·è¾¾å›žæ³¢ä¿¡å·è¿›è¡Œè„‰å†²åŽ‹ç¼©å’Œå¤šæ™®å‹’å¤„ç†ï¼ŒèŽ·å–目标在è·ç¦»ç»´ä¸Šçš„æ•£å°„点分布特å¾ã€‚HRRP具有以下特点:

    • è·ç¦»é«˜åˆ†è¾¨ï¼šèƒ½å¤ŸåŒºåˆ†ç›®æ ‡ä¸Šç›¸é‚»è¾ƒè¿‘的散射中心

    • @@ -109,16 +109,16 @@
    -

    ä»£ç æ¥æºïƒ

    +

    ä»£ç æ¥æºïƒ

    -

    MindSpore Signal+ 实现ïƒ

    +

    MindSpore Signal+ 实现ïƒ

    将原有代ç é‡æž„为基于计算图的MindSpore Cell,实现雷达信å·å¤„ç†æµç¨‹æ¨¡å—化。

    -

    1 æ•°æ®è¯»å–ïƒ

    +

    1 æ•°æ®è¯»å–ïƒ

    在Python中使用MindSpore Signal+时,我们å¯ä»¥ä½¿ç”¨NumPyçš„fromfile接å£è¯»äºŒè¿›åˆ¶æ ¼å¼æ–‡ä»¶ï¼Œå› æ­¤åœ¨Python代ç å¼€å¤´éœ€è¦å¯¼å…¥NumPy库。

    示例代ç ï¼š

    def read_hrrp_data(filename, maichongshu, jln, rfftn):
    @@ -149,7 +149,7 @@
     
    -

    2 æ•°æ®é¢„处ç†ïƒ

    +

    2 æ•°æ®é¢„处ç†ïƒ

    从算法整体分æžï¼Œæ•°æ®è¯»å–åŽåˆ°æ ¸å¿ƒè®¡ç®—之å‰çš„æ­¥éª¤ï¼Œä¸»è¦æ˜¯å¯¹ç›¸ä½è¡¥å¿å› å­è®¡ç®—,Keystoneå˜æ¢å‚数预计算,泰勒窗函数预计算,循环移ä½ç´¢å¼•é¢„è®¡ç®—ã€‚è¿™éƒ¨åˆ†éƒ½æ˜¯æ ¸å¿ƒè®¡ç®—çš„å‰æœŸå‡†å¤‡ï¼Œå»ºè®®å°†è¿™éƒ¨åˆ†ä»£ç å°è£…在__init__函数中完æˆï¼Œä¸æ”¾åœ¨construct函数中å¯ä»¥é¿å…é¢å¤–的开销,当实例化一个类时自动触å‘一次__init__函数。 示例代ç ï¼š

    class Hrrp(nn.Cell):
    @@ -212,7 +212,7 @@
     
    -

    2.1 相ä½è¡¥å¿å› å­è®¡ç®—ïƒ

    +

    2.1 相ä½è¡¥å¿å› å­è®¡ç®—ïƒ

    wl = LC / self.f0  # 计算波长
     Ka = 2.0 * self.vdengxiao**2 / (wl * self.mubiaojuli)  # 调频斜率
     mctime = (np.arange(self.hangmc) - self.hangmc * 0.5) / self.PRF  # æ—¶é—´è½´
    @@ -228,7 +228,7 @@
     
-

2.2 Keystoneå˜æ¢å‚数预计算ïƒ

+

2.2 Keystoneå˜æ¢å‚数预计算ïƒ

# 关键傿•°è®¡ç®—
 fwn = self.hangmc
 self.fwn = fwn
@@ -273,7 +273,7 @@
 
 
-

2.3 泰勒窗函数预计算ïƒ

+

2.3 泰勒窗函数预计算ïƒ

self.mchtr = self.TaiLeWindow(self.hangmc, 50)
 window_2d = self.mchtr[:, np.newaxis]
 self.window_2d = ms.Tensor(window_2d, dtype=ms.float32)
@@ -327,7 +327,7 @@
 
 
-

2.4 循环移ä½ç´¢å¼•预计算ïƒ

+

2.4 循环移ä½ç´¢å¼•预计算ïƒ

def _precompute_cirshift_indices(self):
     rnfft = self.rnfft
     shift = self.rnfft // 2  # 中心频率点索引
@@ -345,7 +345,7 @@
 
-

3 核心计算ïƒ

+

3 核心计算ïƒ

步骤分解:

  1. 相ä½è¡¥å¿ï¼šé¦–先对输入数æ®ï¼ˆå¤æ•°å½¢å¼ï¼‰è¿›è¡Œç›¸ä½è¡¥å¿ï¼Œä¹˜ä»¥é¢„计算好的相ä½è¡¥å¿å› å­ï¼ˆç”¨äºŽæ ¡æ­£äºŒæ¬¡ç›¸ä½è¯¯å·®ï¼‰ã€‚

  2. @@ -403,7 +403,7 @@
-

3.1 相ä½è¡¥å¿ïƒ

+

3.1 相ä½è¡¥å¿ïƒ

out = input_data * self.phase_comp
 
@@ -415,7 +415,7 @@
-

3.2 多模糊数处ç†å¾ªçޝïƒ

+

3.2 多模糊数处ç†å¾ªçޝïƒ

  1. 模糊数范围确定:

@@ -466,7 +466,7 @@
-

3.3 Keystoneå˜æ¢è¯¦è§£ïƒ

+

3.3 Keystoneå˜æ¢è¯¦è§£ïƒ

  1. å˜æ¢åŽŸç† Keystoneå˜æ¢æ˜¯ä¸€ç§è·ç¦»å¾™åŠ¨æ ¡æ­£ç®—æ³•ï¼Œç”¨äºŽè§£å†³ä»¥ä¸‹é—®é¢˜ï¼š

  2. @@ -476,7 +476,7 @@ Keystoneå˜æ¢æ˜¯ä¸€ç§è·ç¦»å¾™åŠ¨æ ¡æ­£ç®—æ³•ï¼Œç”¨äºŽè§£å†³ä»¥ä¸‹é—®é¢˜ï¼š

    å˜æ¢å…¬å¼ï¼š åŽŸå§‹åæ ‡ï¼št (æ–¹ä½æ—¶é—´), f (è·ç¦»é¢‘率) -å˜æ¢åŽï¼št' = t × (fâ‚€/(fâ‚€+f))

    +å˜æ¢åŽï¼št’ = t × (fâ‚€/(fâ‚€+f))

    1. 代ç å®žçް

    @@ -529,7 +529,7 @@ Keystoneå˜æ¢æ˜¯ä¸€ç§è·ç¦»å¾™åŠ¨æ ¡æ­£ç®—æ³•ï¼Œç”¨äºŽè§£å†³ä»¥ä¸‹é—®é¢˜ï¼š

-

3.4 HRRP生æˆïƒ

+

3.4 HRRP生æˆïƒ

# 1. æ–¹ä½å‘加窗(泰勒窗)
 # 2. æ–¹ä½å‘FFT(转到多普勒域)
 # 3. 峰值æå–(æ¯ä¸ªè·ç¦»å•元的幅度)
@@ -561,11 +561,11 @@ Keystoneå˜æ¢æ˜¯ä¸€ç§è·ç¦»å¾™åŠ¨æ ¡æ­£ç®—æ³•ï¼Œç”¨äºŽè§£å†³ä»¥ä¸‹é—®é¢˜ï¼š

HRRP定义:

  • 高分辨率è·ç¦»åƒ = 目标在è·ç¦»ç»´çš„æ•£å°„点分布

  • -
  • ç‰©ç†æ„义:目标的"ç”µç£æŒ‡çº¹",用于目标识别

  • +
  • ç‰©ç†æ„义:目标的â€ç”µç£æŒ‡çº¹â€ï¼Œç”¨äºŽç›®æ ‡è¯†åˆ«

-

3.5 熵值评估ïƒ

+

3.5 熵值评估ïƒ

def Gethrrp_v2shang(self, x):
     sum_sq = self.reduce_sum(x**2)  # 总能é‡
     is_nan = sum_sq != sum_sq
@@ -608,7 +608,7 @@ Keystoneå˜æ¢æ˜¯ä¸€ç§è·ç¦»å¾™åŠ¨æ ¡æ­£ç®—æ³•ï¼Œç”¨äºŽè§£å†³ä»¥ä¸‹é—®é¢˜ï¼š

ç†µå€¼é€‰æ‹©å‡†åˆ™ï¼šç†µå€¼è¶Šå° â†’ 能é‡è¶Šé›†ä¸­ → æˆåƒè´¨é‡è¶Šå¥½ → 模糊数越准确

-

3.6 最优结果选择ïƒ

+

3.6 最优结果选择ïƒ

# åˆå¹¶æ‰€æœ‰ç»“æžœ
 results = ops.cat(results, axis=0)  # [mohushu, hangmc, liejl]
 shang = ops.cat(shang)              # [mohushu]
@@ -622,12 +622,12 @@ Keystoneå˜æ¢æ˜¯ä¸€ç§è·ç¦»å¾™åŠ¨æ ¡æ­£ç®—æ³•ï¼Œç”¨äºŽè§£å†³ä»¥ä¸‹é—®é¢˜ï¼š

-

4 æ•°æ®åŽå¤„ç†ïƒ

+

4 æ•°æ®åŽå¤„ç†ïƒ

这里将结果导出æˆäºŒè¿›åˆ¶æ•°æ®çš„dat文件,用于和正确结果比较。确认结果无误åŽï¼Œå¯é€šè¿‡ mindspore.export 导出 MINDIR 模型,便于在 MindSpore Lite 端部署(æ¿å¡ä¾§è¿è¡Œï¼‰ã€‚

-

æ¿å¡éƒ¨ç½²ïƒ

+

æ¿å¡éƒ¨ç½²ïƒ

模型部署建议使用 YHFT-IDE,它集æˆäº†æ¨¡åž‹è½¬æ¢ã€æ¨¡åž‹å¯è§†åŒ–与 MindSpore Lite 端部署模æ¿ã€‚具体使用方法å¯å‚考 HelloDSP MindSpore Lite端。

以下是完整的MindSpore Signal+实现的代ç ï¼š

import mindspore as ms
diff --git a/master/html/appdevelop/dsp/index.html b/master/html/appdevelop/dsp/index.html
index 6750668a..40db630a 100644
--- a/master/html/appdevelop/dsp/index.html
+++ b/master/html/appdevelop/dsp/index.html
@@ -1,7 +1,7 @@
 
 
 
-
+
 
   
 
@@ -15,9 +15,9 @@
   
       
       
-      
-      
-      
+      
+      
+      
       
       
     
@@ -90,7 +90,7 @@
            
-

DSP应用示例ïƒ

+

DSP应用示例ïƒ

  • RDSAR(è·ç¦»-多普勒SARæˆåƒç®—法)
  • diff --git a/master/html/appdevelop/dsp/rdsar.html b/master/html/appdevelop/dsp/rdsar.html index 0c07de53..82c5ddba 100644 --- a/master/html/appdevelop/dsp/rdsar.html +++ b/master/html/appdevelop/dsp/rdsar.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -98,13 +98,13 @@
    -

    RDSAR(è·ç¦»-多普勒SARæˆåƒç®—法)ïƒ

    +

    RDSAR(è·ç¦»-多普勒SARæˆåƒç®—法)ïƒ

    -

    算法概述ïƒ

    +

    算法概述ïƒ

    RDSAR(Range-Doppler SAR)是一ç§ç»å…¸çš„åˆæˆå­”径雷达(SAR)æˆåƒç®—法,通过è·ç¦»-多普勒域处ç†å®žçŽ°é«˜åˆ†è¾¨çŽ‡é›·è¾¾å›¾åƒé‡å»ºã€‚该算法是SARæˆåƒçš„åŸºç¡€æ–¹æ³•ä¹‹ä¸€ï¼Œå¹¿æ³›åº”ç”¨äºŽé¥æ„Ÿã€å†›äº‹ä¾¦å¯Ÿã€åœ°å½¢æµ‹ç»˜ç­‰é¢†åŸŸã€‚

    -

    MATLAB 实现ïƒ

    +

    MATLAB 实现ïƒ

    %{
         本代ç ç”¨äºŽå¯¹é›·è¾¾çš„回波数æ®ï¼Œåˆ©ç”¨RD算法~普通版本进行æˆåƒã€‚
         2023/11/18 20:47
    @@ -211,7 +211,7 @@
     
    -

    MindSpore Signal+ 实现ïƒ

    +

    MindSpore Signal+ 实现ïƒ

    在开始编写 MindSpore Signal+ 实现之å‰ï¼Œå»ºè®®å…ˆå¯¹åŽŸå§‹ MATLAB 代ç åšæµç¨‹æ¢³ç†ã€‚å¯ä»¥å°†æ•´ä½“算法分为以下几个部分:

    • 1.æ•°æ®è¯»å–

    • @@ -220,7 +220,7 @@
    • 4.æ•°æ®åŽå¤„ç†

    -

    1. æ•°æ®è¯»å–ïƒ

    +

    1. æ•°æ®è¯»å–ïƒ

    在matlab中,数æ®è¯»å–是通过importdata函数实现的。在Python中使用MindSpore Signal+时,我们å¯ä»¥ä½¿ç”¨NumPyçš„loadmat或SciPyçš„io.loadmatæ¥åŠ è½½MATLAB文件中的å˜é‡ï¼Œå› æ­¤åœ¨Python代ç å¼€å¤´éœ€è¦å¯¼å…¥NumPyå’ŒSciPy。

    示例代ç ï¼š

    # step 0 : 准备åˆå§‹æ•°æ®
    @@ -239,7 +239,7 @@
     
    -

    2. æ•°æ®é¢„处ç†ïƒ

    +

    2. æ•°æ®é¢„处ç†ïƒ

    从算法整体分æžï¼Œæ•°æ®è¯»å–åŽåˆ°æ ¸å¿ƒè®¡ç®—之å‰çš„æ­¥éª¤ï¼Œä¸»è¦æ˜¯å¯¹æ•°æ®è¿›è¡Œå¡«å……和轴的生æˆï¼Œè¿™éƒ¨åˆ†éƒ½æ˜¯æ ¸å¿ƒè®¡ç®—çš„å‰æœŸå‡†å¤‡ï¼Œå»ºè®®å°†è¿™éƒ¨åˆ†ä»£ç å°è£…在__init__函数中完æˆï¼Œä¸æ”¾åœ¨construct函数中å¯ä»¥é¿å…é¢å¤–的开销,当实例化一个类时自动触å‘一次__init__函数。

    示例代ç ï¼š

    class rdsar(nn.Cell):
    @@ -267,7 +267,7 @@
     
    -

    3. 核心计算ïƒ

    +

    3. 核心计算ïƒ

    æ ¸å¿ƒè®¡ç®—éƒ¨åˆ†æ˜¯ç®—æ³•çš„æ ¸å¿ƒï¼Œä¹Ÿæ˜¯è®¡ç®—å¤æ‚度最高的部分,建议将这部分代ç å°è£…在construct函数中,这样å¯ä»¥æ–¹ä¾¿åŽç»­çš„调用。核心计算的è¿ç§»ä¸»è¦æ˜¯å°†matlab的计算逻辑转æ¢ä¸ºMindSpore Signal+çš„API调用,例如:matlab中的fft(echo,[],2)å¯ä»¥è½¬æ¢ä¸ºmr.FFT(dim=1),dim=1 表示按行计算(沿ç€åˆ—移动,计算æ¯è¡Œçš„FFT)。MindSpore Signal+ API列表å¯ä»¥æŸ¥é˜…MindSpore官方文档和自定义算å­åˆ—表。

    示例代ç ï¼š

    class rdsar(nn.Cell):
    @@ -333,7 +333,7 @@
     
    -

    4. æ•°æ®åŽå¤„ç†ïƒ

    +

    4. æ•°æ®åŽå¤„ç†ïƒ

    需è¦å¯¹è®¡ç®—结果进行æˆåƒï¼Œè¿™éƒ¨åˆ†ä¸»è¦æ˜¯å°†è®¡ç®—结果转æ¢ä¸ºå›¾åƒï¼Œå¯ä»¥ä½¿ç”¨matplotlib库进行绘制。

    示例代ç ï¼š

    import matplotlib.pyplot as plt
    @@ -490,7 +490,7 @@
     
    -

    æ¿å¡éƒ¨ç½²ïƒ

    +

    æ¿å¡éƒ¨ç½²ïƒ

    模型部署建议使用 YHFT-IDE,它集æˆäº†æ¨¡åž‹è½¬æ¢ã€æ¨¡åž‹å¯è§†åŒ–与 MindSpore Lite 端部署模æ¿ã€‚具体使用方法å¯å‚考 HelloDSP MindSpore Lite端。

    尿Ѐ巧

    @@ -498,7 +498,7 @@
    -

    å‚考与æºç ïƒ

    +

    å‚考与æºç ïƒ

    • 基于RDã€CS和ωkç®—æ³•çš„åˆæˆå­”径雷达æˆåƒç®—法原ç†ä¸Žå®žçŽ°ï¼šSAR_imaging_with_RD_CS_wk

    • Python 示例:RDSAR

    • diff --git a/master/html/appdevelop/dsp/rpc.html b/master/html/appdevelop/dsp/rpc.html index e707b195..ab55d96a 100644 --- a/master/html/appdevelop/dsp/rpc.html +++ b/master/html/appdevelop/dsp/rpc.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -99,15 +99,15 @@
      -

      RPC(大点数脉冲压缩算法)ïƒ

      +

      RPC(大点数脉冲压缩算法)ïƒ

      -

      1. 概述ïƒ

      +

      1. 概述ïƒ

      本文将以基于 FT04-DSP çš„ rpc 算法的移æ¤ä¸ºä¾‹ï¼Œä»‹ç» AI+DSP 应用开å‘çš„å¼€å‘æµç¨‹ã€‚

      算法简介:

      大点数脉冲压缩(Pulse Compression)是雷达信å·å¤„ç†ä¸­çš„å…³é”®æŠ€æœ¯ï¼Œè¯¥ç®—æ³•é€šè¿‡åŒ¹é…æ»¤æ³¢å°†å®½è„‰å†²ä¿¡å·åŽ‹ç¼©æˆçª„脉冲,能够æé«˜é›·è¾¾çš„è·ç¦»åˆ†è¾¨çŽ‡å’Œæ£€æµ‹èƒ½åŠ›ï¼Œå¹¿æ³›ç”¨äºŽæ°”è±¡é›·è¾¾ã€åˆæˆå­”径雷达ã€åŒ»å­¦æˆåƒã€åœ°éœ‡å‹˜æŽ¢ç­‰éœ€è¦å¤„ç†è¶…大点数信å·çš„领域。

      -

      2. FT04 c实现ïƒ

      +

      2. FT04 c实现ïƒ

      主è¦ä»£ç å¦‚下

      void main(void)
       {
      @@ -302,9 +302,9 @@
       
    -

    3. 开呿µç¨‹ïƒ

    +

    3. 开呿µç¨‹ïƒ

    -

    3.1 æ•°æ®å¯¼å…¥ïƒ

    +

    3.1 æ•°æ®å¯¼å…¥ïƒ

    c实现中,数æ®è¯»å–是通过IDE导入的。在python中使用 open 函数打开并读å–åŽŸå§‹çš„äºŒè¿›åˆ¶æ•°æ®æ–‡ä»¶ï¼Œå¹¶æŠŠå…¶è½¬æˆcomplex64ç±»åž‹çš„å¤æ•°tensor。

    示例代ç ï¼š

    with open("data_43456_17_rpcdata_chnum5_RPCDataIn.bin", 'rb') as f:
    @@ -315,7 +315,7 @@
     
    -

    3.2 常é‡å¤„ç†ïƒ

    +

    3.2 常é‡å¤„ç†ïƒ

    ç§»æ¤æ—¶çš„主è¦å·¥ä½œæ˜¯ï¼šå°† c ç®—å­çš„计算逻辑转æ¢ä¸º MindSpore Signal+ çš„ API 调用。

    整体分æžå¯çŸ¥ï¼Œä»Žæ•°æ®å¯¼å…¥åˆ°å†…层循环的fft之å‰çš„æ­¥éª¤ï¼Œä¸»è¦æ˜¯æ¨¡åž‹å¸¸é‡çš„生æˆï¼Œå¦å¤–乘法算å­

    gk_cvmulcv_f_core(pcGSMData1, pcGSMRcRef, iRpcLength, pcGSMData1, mask); /**乘è¿åŠ¨è¡¥å¿*/
    @@ -339,7 +339,7 @@
     
    -

    3.3 核心计算ïƒ

    +

    3.3 核心计算ïƒ

    å¾ªçŽ¯éƒ¨åˆ†æ˜¯ç®—æ³•çš„æ ¸å¿ƒï¼Œå…¶ä¸»è¦æµç¨‹æ˜¯åœ¨å¾ªçŽ¯ä¸­å¯¹ä¸€ç»´çš„æ•°æ®åšfftã€ä¹˜æ³•å’Œifftè¿ç®—。

    å¯ä½¿ç”¨ä¸‹åˆ—ä¼˜åŒ–æ–¹æ³•æ¥æå‡æ€§èƒ½ï¼š

      @@ -373,7 +373,7 @@
-

python完整代ç ç¤ºä¾‹ï¼šïƒ

+

python完整代ç ç¤ºä¾‹ï¼šïƒ

import numpy as np
 import mindspore as ms
 import mindradar as mr
@@ -471,7 +471,7 @@
 
-

4. è½¬æ¢æ¨¡åž‹ïƒ

+

4. è½¬æ¢æ¨¡åž‹ïƒ

在上述代ç ä¸­ï¼Œæˆ‘们已ç»ä½¿ç”¨äº† export 方法导出了rpc.mindir模型。 è¦å°†è¯¥æ¨¡åž‹éƒ¨ç½²åˆ° FT04 å¹³å°ï¼Œéœ€è¦å°† mindir æ ¼å¼è½¬æ¢æˆ mindspore lite çš„ ms æ ¼å¼ã€‚ 现使用 MindSpore 的转æ¢å·¥å…·ï¼šconverter_lite 进行转æ¢ã€‚

转æ¢å‘½ä»¤å¦‚下:

@@ -485,7 +485,7 @@
-

5. 端侧部署ã€è¿è¡Œïƒ

+

5. 端侧部署ã€è¿è¡Œïƒ

打开 YHFT-IDE ,新建工程。输入工程åã€è·¯å¾„,工程类型选择 Heterogeneous , 输入交å‰ç¼–译工具路径,然åŽç‚¹ç¡®å®šã€‚会生æˆä¸€ä¸ªå¼‚构模æ¿å·¥ç¨‹ã€‚

通过修改 data_handler.cc 文件中的函数æ¥è°ƒæ•´æ¨¡åž‹çš„输入数æ®ï¼Œè¾“入改æˆåŽŸå§‹æ•°æ®æ–‡ä»¶è·¯å¾„。 在 main 函数设置è¿è¡ŒåŽç«¯ï¼›ä¿®æ”¹ CMakeLists.txt 文件, 最åŽç¼–译该工程,编译æˆåŠŸåŽå°† build æ–‡ä»¶å¤¹ä¸‹çš„å¯æ‰§è¡Œæ–‡ä»¶å’Œæ¨¡åž‹ rpc.ms 一起拷è´åˆ° FT04 中。

@@ -498,7 +498,7 @@ 。实测该模型的è¿è¡Œæ—¶é—´ä¸º 70 ms。

-

6. 测试ïƒ

+

6. 测试ïƒ

æµ‹è¯•éªŒè¯æ¨¡åž‹è¾“出结果。

å°†æ•°æ®æ–‡ä»¶rpc_model_out.bin 拷出æ¥, åŒæ ‡å‡†ç»“æžœout_43456_5_17.bin 进行比较。 è¿è¡Œç»“果比较的 python 代ç ã€‚

diff --git a/master/html/appdevelop/index.html b/master/html/appdevelop/index.html index aece04a1..9c329fe9 100644 --- a/master/html/appdevelop/index.html +++ b/master/html/appdevelop/index.html @@ -1,7 +1,7 @@ - + @@ -15,11 +15,10 @@ - - - + + + - @@ -85,7 +84,7 @@
-

应用开å‘示例ïƒ

+

应用开å‘示例ïƒ

  • AI+DSP应用示例
  • diff --git a/master/html/functionlib/custom_op/complex_abs.html b/master/html/functionlib/custom_op/complex_abs.html index 23ceeed7..d49fccaa 100644 --- a/master/html/functionlib/custom_op/complex_abs.html +++ b/master/html/functionlib/custom_op/complex_abs.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -95,10 +95,10 @@
    -

    ComplexAbsïƒ

    +

    ComplexAbsïƒ

    -class mindradar.ComplexAbsïƒ
    +class mindradar.ComplexAbsïƒ

    夿•°tensoré€å…ƒç´ æ±‚模。 计算表达å¼ä¸º:

    \[out_i = \sqrt{a_i^2 + b_i^2},\]
    diff --git a/master/html/functionlib/custom_op/fft.html b/master/html/functionlib/custom_op/fft.html index 3bf8138b..7af7eb5e 100644 --- a/master/html/functionlib/custom_op/fft.html +++ b/master/html/functionlib/custom_op/fft.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -95,10 +95,10 @@
    -

    FFTïƒ

    +

    FFTïƒ

    -class mindradar.FFT(n=-1, dim=-1, norm='backward')ïƒ
    +class mindradar.FFT(n=-1, dim=-1, norm='backward')ïƒ

    傅里å¶å˜æ¢FFT。计算表达å¼ä¸º:

    \[X[\omega_1, \dots, \omega_d] = @@ -111,9 +111,9 @@
  • dim (int,å¯é€‰) - 计算FFT的轴。如果没有给出,则使用最åŽä¸€ä¸ªè½´ã€‚默认值: -1 。

  • norm (str,å¯é€‰) - 表示该æ“作的规范化方å¼ï¼Œå¯é€‰å€¼ï¼š[ "backward" , "forward" , "ortho" ]。默认值: "backward" 。

      -
    • "backward",正å‘å˜æ¢ä¸ç¼©æ”¾ï¼Œé€†å˜æ¢æŒ‰ \(1/n\) 缩放,其中 n 表示输入 x 的元素数é‡ã€‚

    • -
    • "ortho",正å‘å˜æ¢ä¸Žé€†å˜æ¢å‡æŒ‰ \(1/\sqrt n\) 缩放。

    • -
    • "forward",正å‘å˜æ¢æŒ‰ \(1/n\) ç¼©æ”¾ï¼Œé€†å˜æ¢ä¸ç¼©æ”¾ã€‚

    • +
    • “backwardâ€ï¼Œæ­£å‘å˜æ¢ä¸ç¼©æ”¾ï¼Œé€†å˜æ¢æŒ‰ \(1/n\) 缩放,其中 n 表示输入 x 的元素数é‡ã€‚

    • +
    • “orthoâ€ï¼Œæ­£å‘å˜æ¢ä¸Žé€†å˜æ¢å‡æŒ‰ \(1/\sqrt n\) 缩放。

    • +
    • “forwardâ€ï¼Œæ­£å‘å˜æ¢æŒ‰ \(1/n\) ç¼©æ”¾ï¼Œé€†å˜æ¢ä¸ç¼©æ”¾ã€‚

diff --git a/master/html/functionlib/custom_op/ifft.html b/master/html/functionlib/custom_op/ifft.html index 7d50919d..4d25ef5c 100644 --- a/master/html/functionlib/custom_op/ifft.html +++ b/master/html/functionlib/custom_op/ifft.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -95,10 +95,10 @@
-

IFFTïƒ

+

IFFTïƒ

-class mindradar.IFFT(n=-1, dim=-1, norm='backward')ïƒ
+class mindradar.IFFT(n=-1, dim=-1, norm='backward')ïƒ

傅里å¶å˜æ¢IFFT。计算表达å¼ä¸º:

\[X[\omega_1, \dots, \omega_d] = @@ -111,9 +111,9 @@
  • dim (int,å¯é€‰) - 计算FFT的轴。如果没有给出,则使用最åŽä¸€ä¸ªè½´ã€‚默认值: -1 。

  • norm (str,å¯é€‰) - 表示该æ“作的规范化方å¼ï¼Œå¯é€‰å€¼ï¼š[ "backward" , "forward" , "ortho" ]。默认值: "backward" 。

      -
    • "backward",正å‘å˜æ¢ä¸ç¼©æ”¾ï¼Œé€†å˜æ¢æŒ‰ \(1/n\) 缩放,其中 n 表示输入 x 的元素数é‡ã€‚

    • -
    • "ortho",正å‘å˜æ¢ä¸Žé€†å˜æ¢å‡æŒ‰ \(1/\sqrt n\) 缩放。

    • -
    • "forward",正å‘å˜æ¢æŒ‰ \(1/n\) ç¼©æ”¾ï¼Œé€†å˜æ¢ä¸ç¼©æ”¾ã€‚

    • +
    • “backwardâ€ï¼Œæ­£å‘å˜æ¢ä¸ç¼©æ”¾ï¼Œé€†å˜æ¢æŒ‰ \(1/n\) 缩放,其中 n 表示输入 x 的元素数é‡ã€‚

    • +
    • “orthoâ€ï¼Œæ­£å‘å˜æ¢ä¸Žé€†å˜æ¢å‡æŒ‰ \(1/\sqrt n\) 缩放。

    • +
    • “forwardâ€ï¼Œæ­£å‘å˜æ¢æŒ‰ \(1/n\) ç¼©æ”¾ï¼Œé€†å˜æ¢ä¸ç¼©æ”¾ã€‚

  • diff --git a/master/html/functionlib/custom_op/index.html b/master/html/functionlib/custom_op/index.html index ab514f0c..0a0e7a31 100644 --- a/master/html/functionlib/custom_op/index.html +++ b/master/html/functionlib/custom_op/index.html @@ -1,7 +1,7 @@ - + @@ -15,11 +15,10 @@ - - - + + + - @@ -91,7 +90,7 @@
    -

    自定义算å­åˆ—表ïƒ

    +

    自定义算å­åˆ—表ïƒ

    • ComplexAbs
    • diff --git a/master/html/functionlib/dsplib/abs.html b/master/html/functionlib/dsplib/abs.html index 8fa4dee1..898b3194 100644 --- a/master/html/functionlib/dsplib/abs.html +++ b/master/html/functionlib/dsplib/abs.html @@ -1,7 +1,7 @@ - + @@ -15,9 +15,9 @@ - - - + + + @@ -47,233 +47,10 @@