]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - apps/c55x-benchmarks.git/blobdiff - dsplib_benchmarks/dlms/t2.h
directory structure 3-29-16
[apps/c55x-benchmarks.git] / dsplib_benchmarks / dlms / t2.h
diff --git a/dsplib_benchmarks/dlms/t2.h b/dsplib_benchmarks/dlms/t2.h
new file mode 100644 (file)
index 0000000..04a9587
--- /dev/null
@@ -0,0 +1,204 @@
+/*\r
+ * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * \r
+ * \r
+ *  Redistribution and use in source and binary forms, with or without \r
+ *  modification, are permitted provided that the following conditions \r
+ *  are met:\r
+ *\r
+ *    Redistributions of source code must retain the above copyright \r
+ *    notice, this list of conditions and the following disclaimer.\r
+ *\r
+ *    Redistributions in binary form must reproduce the above copyright\r
+ *    notice, this list of conditions and the following disclaimer in the \r
+ *    documentation and/or other materials provided with the   \r
+ *    distribution.\r
+ *\r
+ *    Neither the name of Texas Instruments Incorporated nor the names of\r
+ *    its contributors may be used to endorse or promote products derived\r
+ *    from this software without specific prior written permission.\r
+ *\r
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+ *\r
+*/\r
+\r
+/* Test for dlms: sine */\r
+#define NX 40\r
+#define NH 21\r
+#define STEP 1638\r
+#define FNAME "t2"\r
+#define MAXERROR 20\r
+\r
+DATA x[NX] ={\r
+0,\r
+11585,\r
+16384,\r
+11585,\r
+0,\r
+-11586,\r
+-16384,\r
+-11586,\r
+-1,\r
+11585,\r
+16384,\r
+11585,\r
+0,\r
+-11586,\r
+-16384,\r
+-11586,\r
+-1,\r
+11585,\r
+16384,\r
+11585,\r
+0,\r
+-11586,\r
+-16384,\r
+-11586,\r
+-1,\r
+11585,\r
+16384,\r
+11585,\r
+0,\r
+-11586,\r
+-16384,\r
+-11586,\r
+-1,\r
+11585,\r
+16384,\r
+11585,\r
+0,\r
+-11586,\r
+-16384,\r
+-11586,\r
+};\r
+\r
+DATA des[NX] ={\r
+32767,\r
+23170,\r
+0,\r
+-23171,\r
+-32768,\r
+-23171,\r
+-1,\r
+23170,\r
+32767,\r
+23170,\r
+0,\r
+-23171,\r
+-32768,\r
+-23171,\r
+-1,\r
+23170,\r
+32767,\r
+23170,\r
+0,\r
+-23171,\r
+-32768,\r
+-23171,\r
+-1,\r
+23170,\r
+32767,\r
+23170,\r
+-1,\r
+-23171,\r
+-32768,\r
+-23171,\r
+-1,\r
+23170,\r
+32767,\r
+23170,\r
+-1,\r
+-23171,\r
+-32768,\r
+-23171,\r
+-1,\r
+23170,\r
+};\r
+\r
+DATA htest[NH] ={ /* C54x: hn-1 ... h0 (backward order) */\r
+-155,\r
+-1991,\r
+-2909,\r
+-2116,\r
+205,\r
+2827,\r
+4100,\r
+2963,\r
+-253,\r
+-3815,\r
+-5501,\r
+-3957,\r
+288,\r
+4915,\r
+7057,\r
+5061,\r
+-307,\r
+-6074,\r
+-8695,\r
+-6223,\r
+304,\r
+};\r
+\r
+DATA rtest[NX] ={\r
+0,\r
+0,\r
+0,\r
+145,\r
+0,\r
+-145,\r
+207,\r
+873,\r
+1637,\r
+1449,\r
+-376,\r
+-2946,\r
+-4748,\r
+-3788,\r
+463,\r
+5808,\r
+8947,\r
+6878,\r
+-448,\r
+-9094,\r
+-13706,\r
+-10329,\r
+343,\r
+12418,\r
+18468,\r
+13665,\r
+-93,\r
+-15001,\r
+-22046,\r
+-16135,\r
+-50,\r
+16968,\r
+24730,\r
+17962,\r
+124,\r
+-18465,\r
+-26743,\r
+-19315,\r
+-156,\r
+19603,\r
+};\r
+\r
+#pragma DATA_SECTION (dbuffer,".dbuffer")\r
+DATA dbuffer[NH+2];\r
+\r
+#pragma DATA_SECTION (h,".coeffs")\r
+DATA h[NH];\r
+\r
+DATA r[NX];\r
+\r
+DATA error;\r
+\r