如何在C中简化以下代码(当然使用SIMD内在函数)?我无法理解SIMD内在函数,这会有很大帮助:
int sum_naive( int n, int *a )
{
int sum = 0;
for( int i = 0; i < n; i++ )
sum += a[i];
return sum;
}
Run Code Online (Sandbox Code Playgroud) 这是我的app.js文件的样子:
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
angular.module('starter', ['ionic', 'starter.controllers'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
ionic.Platform.fullScreen() …Run Code Online (Sandbox Code Playgroud)