allow the NE10 to be used in cplusplus programs
authoryang <yang.zhang@arm.com>
Thu, 21 Jun 2012 06:22:49 +0000 (14:22 +0800)
committeryang <yang.zhang@arm.com>
Thu, 21 Jun 2012 06:22:49 +0000 (14:22 +0800)
NE10_init.h
ReleaseNote.txt
inc/NE10.h
inc/NE10_asm.h
inc/NE10_c.h
inc/NE10_neon.h

index 80263ce..33b9700 100644 (file)
 #ifndef NE10_init_H
 #define NE10_init_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*!
     This routine returns NE10_OK if the running platform supports NEON, otherwise it returns NE10_ERR
  */
@@ -29,4 +33,8 @@ extern arm_result_t NE10_HasNEON();
  */
 extern arm_result_t NE10_init();
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 71ac0f7..b992feb 100644 (file)
@@ -217,4 +217,4 @@ Details of how to do this are too project specific to detail here.
         Each function is implemented in C, ARM Assembly and NEON code as a
         basis for comparison. Assembly versions, while efficient, are not
         intended as best-practice examples.
-
+    * Added support for C++
index a654aec..4e0666f 100644 (file)
@@ -24,7 +24,7 @@
     The routines that are provided by this library are all declared in this header file.
  */
 
-#include "../headers/versionheader.h"
+//#include "../headers/versionheader.h"
 #include <NE10_types.h>
 #include <NE10_c.h>
 #include <NE10_asm.h>
 #ifndef NE10_H
 #define NE10_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 ///////////////////////////
 // function prototypes:
 ///////////////////////////
@@ -649,4 +653,8 @@ extern arm_result_t (*multrans_mat4x4f)(arm_mat4x4f_t * dst, arm_mat4x4f_t * src
 extern arm_result_t (*multrans_mat3x3f)(arm_mat3x3f_t * dst, arm_mat3x3f_t * src1, arm_mat3x3f_t * src2, unsigned int count);
 extern arm_result_t (*multrans_mat2x2f)(arm_mat2x2f_t * dst, arm_mat2x2f_t * src1, arm_mat2x2f_t * src2, unsigned int count);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 225eca8..b2e3c49 100644 (file)
  * NE10 Library : inc/NE10_asm.h
  */
 
-#include "../headers/versionheader.h"
+//#include "../headers/versionheader.h"
 
 #ifndef NE10_ASM_H
 #define NE10_ASM_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 ///////////////////////////
 // function prototypes:
@@ -147,7 +150,6 @@ extern arm_result_t dot_vec4f_asm(arm_float_t * dst, arm_vec4f_t * src1, arm_vec
 extern arm_result_t cross_vec3f_asm(arm_vec3f_t * dst, arm_vec3f_t * src1, arm_vec3f_t * src2, unsigned int count);
 
 
-
 // ## Matrix-Constant Arithmetic ##
 
 // arm_mat4x4f_t
@@ -205,4 +207,8 @@ extern arm_result_t multrans_mat4x4f_asm(arm_mat4x4f_t * dst, arm_mat4x4f_t * sr
 extern arm_result_t multrans_mat3x3f_asm(arm_mat3x3f_t * dst, arm_mat3x3f_t * src1, arm_mat3x3f_t * src2, unsigned int count);
 extern arm_result_t multrans_mat2x2f_asm(arm_mat2x2f_t * dst, arm_mat2x2f_t * src1, arm_mat2x2f_t * src2, unsigned int count);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index 96bd1da..4da875e 100644 (file)
  * NE10 Library : inc/NE10_c.h
  */
 
-#include "../headers/versionheader.h"
+//#include "../headers/versionheader.h"
 #include <NE10_types.h>
 
 #ifndef NE10_C_H
 #define NE10_C_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 ///////////////////////////
 // function prototypes:
 ///////////////////////////
@@ -201,4 +206,8 @@ extern arm_result_t multrans_mat4x4f_c(arm_mat4x4f_t * dst, arm_mat4x4f_t * src1
 extern arm_result_t multrans_mat3x3f_c(arm_mat3x3f_t * dst, arm_mat3x3f_t * src1, arm_mat3x3f_t * src2, unsigned int count);
 extern arm_result_t multrans_mat2x2f_c(arm_mat2x2f_t * dst, arm_mat2x2f_t * src1, arm_mat2x2f_t * src2, unsigned int count);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
index f86b5fc..f8a38af 100644 (file)
  * NE10 Library : inc/NE10_neon.h
  */
 
-#include "../headers/versionheader.h"
+//#include "../headers/versionheader.h"
 
 #ifndef NE10_NEON_H
 #define NE10_NEON_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 ///////////////////////////
 // function prototypes:
 ///////////////////////////
@@ -206,4 +210,8 @@ extern arm_result_t multrans_mat4x4f_neon(arm_mat4x4f_t * dst, arm_mat4x4f_t * s
 extern arm_result_t multrans_mat3x3f_neon(arm_mat3x3f_t * dst, arm_mat3x3f_t * src1, arm_mat3x3f_t * src2, unsigned int count);
 extern arm_result_t multrans_mat2x2f_neon(arm_mat2x2f_t * dst, arm_mat2x2f_t * src1, arm_mat2x2f_t * src2, unsigned int count);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif