]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blobdiff - blasblisacc/src/ti_cblas_cblas_srot.c
LINALG 1.2.0 iteration 1.
[dense-linear-algebra-libraries/linalg.git] / blasblisacc / src / ti_cblas_cblas_srot.c
index 160d339654a3410f68da607b429c7abaf498597e..cafda115a4d0d08b9352f6f0864a0812bb416330 100644 (file)
@@ -26,7 +26,8 @@
  *   THE POSSIBILITY OF SUCH DAMAGE.
  *****************************************************************************/
        
-#include "ti_cblas.h"
+#include "ti_cblas_acc.h"
+#include "../../ticblas/ticblas.h"
 
 #ifdef __cplusplus
 extern "C" { 
@@ -44,20 +45,19 @@ void cblas_srot(const int N, float *X, const int incX, float *Y, const int incY,
        if (!ti_cblas_init_done) ti_cblas_init();
        TI_CBLAS_DEBUG_PRINT("Intercepted call to %s\n", "cblas_srot");
 
-        TI_CBLAS_PROFILE_START();
-
+    TI_CBLAS_PROFILE_START();
        /* Dynamic condtional offload to ARM */
-        if ((TI_CBLAS_L1_OFFLOAD == TI_CBLAS_OFFLOAD_NONE)) { 
-               TI_CBLAS_DEBUG_PRINT("Executing ARM %s\n", "cblas_srot"); 
-               __real_cblas_srot(N,X,incX,Y,incY,c,s); 
-               TI_CBLAS_PROFILE_REPORT("  Entire %s call (ARM) took %8.2f us\n","cblas_srot", (float) clock_diff);
-               return ;
-        }
-        /* End ARM offload */
+    if ((TI_CBLAS_L1_OFFLOAD == TI_CBLAS_OFFLOAD_NONE)) { 
+       TI_CBLAS_DEBUG_PRINT("Executing ARM %s\n", "cblas_srot"); 
+       __real_cblas_srot(N,X,incX,Y,incY,c,s); 
+    TI_CBLAS_PROFILE_REPORT("  Entire %s call (ARM) took %8.2f us\n","cblas_srot", (float) clock_diff);
+       return ;
+    }
+    /* End ARM offload */
 
        /******************************************************************/
        /* DSP offload WILL be done if control reaches here */
-               TI_CBLAS_DEBUG_PRINT("Offloading to DSP %s\n", "cblas_srot"); 
+       TI_CBLAS_DEBUG_PRINT("Offloading to DSP %s\n", "cblas_srot"); 
 
        /* Lookup kernel pointer from global table */
 #ifdef __cplusplus
@@ -66,7 +66,8 @@ void cblas_srot(const int N, float *X, const int incX, float *Y, const int incY,
 #else
        cl_kernel __K;
 #endif
-       __K =  ti_cblas_get_kernel(TI_CBLAS_CBLAS_SROT_IDX, "ocl_cblas_srot");
+    __K =  ti_cblas_get_kernel(TI_CBLAS_CBLAS_SROT_IDX, "ocl_cblas_srot");
+
 #ifdef __cplusplus
        try 
 #else
@@ -74,7 +75,6 @@ void cblas_srot(const int N, float *X, const int incX, float *Y, const int incY,
 #endif
        {
 
-
 #ifdef __cplusplus
                __K->setArg(0, N);
 #else
@@ -144,8 +144,8 @@ void cblas_srot(const int N, float *X, const int incX, float *Y, const int incY,
                TI_CBLAS_OCL_CHKERROR("clWaitForEvents",err);
                err |= clReleaseEvent(e);
                TI_CBLAS_OCL_CHKERROR("clReleaseEvent",err);
-
 #endif
+
                ti_cblas_delete_kernel(__K);
 
                TI_CBLAS_DEBUG_PRINT("Finished executing %s\n", "cblas_srot");