Created
May 11, 2014 01:48
-
-
Save thoughtpolice/8b597b8f5f68153a7be4 to your computer and use it in GitHub Desktop.
Auto-parallelism and vectorization in the Intel compiler.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#define ARR_SIZE 500 //Define array | |
int main() { | |
int matrix[ARR_SIZE][ARR_SIZE]; | |
int arrA[ARR_SIZE]={10}; | |
int arrB[ARR_SIZE]={30}; | |
int i, j; | |
for(i=0;i<ARR_SIZE;i++) { | |
for(j=0;j<ARR_SIZE;j++) { matrix[i][j] = arrB[i]*(arrA[i]%2+10); } | |
} printf("%d\n",matrix[0][0]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment