view ppe/Run.cc @ 1:dcd83cefb980

check , ppe_only, show time , function add.
author yutaka@localhost.localdomain
date Tue, 06 Apr 2010 22:52:33 +0900
parents
children
line wrap: on
line source

#include <stdio.h>
#include "Run.h"

void
run(void *in, void *out, int data_length)
{

  for (int i = 0; i < data_length / sizeof(int); i++) {

    int *in_spe  = (int*)in;
    int *out_spe = (int*)out;

    //printf("in_spe %d\n",in_spe[i]);

    out_spe[i] = 1;

    for (int j = 2; j < in_spe[i]; j++) {

      //printf("hogehoge\n");

      if ( in_spe[i] % j == 0) {
	out_spe[i] = 0;
	break;
      }

    }

    //if (out_spe[i] == 1) {
    //  printf("in_spe[%d] %d\n",i,in_spe[i]);
    //}

    /*
    out_spe[i] = in_spe[i] + 1;

    out_spe[i] = out_spe[i] + 1;
    out_spe[i] = out_spe[i]*out_spe[i];
    out_spe[i] = out_spe[i] + 1;
    */
    //printf("[SPE]int_spe %f\n",in_spe[i]);

    //printf("[SPE]outt_spe %f\n",out_spe[i]);



  }

}