[llvm-commits] [test-suite] r164893 - /test-suite/trunk/MultiSource/Benchmarks/TSVC/tsc.inc
Hal Finkel
hfinkel at anl.gov
Sat Sep 29 06:20:33 PDT 2012
Author: hfinkel
Date: Sat Sep 29 08:20:32 2012
New Revision: 164893
URL: http://llvm.org/viewvc/llvm-project?rev=164893&view=rev
Log:
Fixup TSVC for non-Linux systems.
Removed include of malloc.h and memalign -> posix_memalign.
Modified:
test-suite/trunk/MultiSource/Benchmarks/TSVC/tsc.inc
Modified: test-suite/trunk/MultiSource/Benchmarks/TSVC/tsc.inc
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/TSVC/tsc.inc?rev=164893&r1=164892&r2=164893&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/TSVC/tsc.inc (original)
+++ test-suite/trunk/MultiSource/Benchmarks/TSVC/tsc.inc Sat Sep 29 08:20:32 2012
@@ -32,7 +32,6 @@
#include <sys/times.h>
#include <sys/types.h>
#include <time.h>
-#include <malloc.h>
#include <string.h>
#include <assert.h>
@@ -5500,7 +5499,7 @@
#endif // TESTS & CONTROL_LOOPS
void set(int* ip, TYPE* s1, TYPE* s2){
- xx = (TYPE*) memalign(ALIGNMENT, LEN*sizeof(TYPE));
+ posix_memalign(&xx, ALIGNMENT, LEN*sizeof(TYPE));
printf("\n");
for (int i = 0; i < LEN; i = i+5){
ip[i] = (i+4);
@@ -5531,9 +5530,11 @@
int main(int argc, char *argv[]){
int n1 = 1;
int n3 = 1;
- int* ip = (int *) memalign(ALIGNMENT, LEN*sizeof(TYPE));
+ int* ip;
TYPE s1,s2;
+ posix_memalign(&ip, ALIGNMENT, LEN*sizeof(TYPE));
+
if (argc > 1)
ntimes = atoi(argv[1]);
printf("Running each loop %d times...\n", ntimes);
More information about the llvm-commits
mailing list