Пример #1
0
int main(int argc, char *argv[])
{
    // Stack variables
    int i;
    float test_out[out_size];
    int testOK = 1;

    // Run the test on Arm
    p_rgb2grayscale_f32(in, test_out, in_rows, in_cols);

    // Check data
    for ( i = 0; i < out_size; i++ ) {
      if (check_data(test_out[i],out[i], MAX_REL_DIFF) == NOK ) {
	testOK = 0;
	printf("Large diff for index %d, ref:%f   test: %f   rel:%f \n",i,out[i],test_out[i], test_out[i]/out[i]);
      }
    }

    if ( testOK ){
      printf("RGB2Grayscale ARM test OK\n");
    } else {
      printf("RGB2Grayscale ARM test FAILED!!\n");
    }

}
Пример #2
0
int tc_against_gold_e(struct ut_suite *suite, struct ut_tcase *tcase)
{
    p_rgb2grayscale_f32(in, test_out, in_rows, in_cols);

    return 0;
}