Mercurial > hg > Members > yutaka > manager
diff task/Run.cc @ 4:c2ce9efe2a52
fix
author | yutaka@localhost.localdomain |
---|---|
date | Wed, 07 Apr 2010 17:47:12 +0900 |
parents | |
children | 39d405bc46b7 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/task/Run.cc Wed Apr 07 17:47:12 2010 +0900 @@ -0,0 +1,30 @@ +#include <stdio.h> +#include "Run.h" + +void +run(void *in, void *out, int size_in, int size_out) +{ + + //printf("size_in %d\n",size_in); + + for (int i = 0; i < size_in / 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++) { + + if ( in_spe[i] % j == 0) { + out_spe[i] = 0; + break; + } + + } + + } + +}