如何在riscv-test中编译exp bechmark

时间:2018-05-24 15:05:15

标签: gcc riscv

我已经构建了简单的程序来计算值的exp。我收到了错误;

#include <stdint.h>
#include "util.h"
#include <math.h>
#include <stdio.h>

int main() {               
 double value = -150;
    Start_Timer();
    for(int i=0; i<500 ;i++){
    result = exp(value);    
    value++;
}
    Stop_Timer();
  User_Time=End_Time-Begin_Time;
  printf("User_Time: %ld  - %ld =  %ld - \n", End_Time,Begin_Time,User_Time);
   printf("The Exponential of %ld is %ld\n", value, result);
    return 0;

}

任何想法如何在Benchmark中使用exp进行测试。 我已经发现exp函数需要-x和-lm进行编译。我怎样才能在测试中使用它们 C Failing to compile: Can't find math.h functions

我尝试在riscv-test / benchmark中编辑makefile,但我想,这对我来说有点棘手。

错误讯息:https://github.com/riscv/riscv-tests/issues/142

0 个答案:

没有答案