diff options
Diffstat (limited to 'orc-test')
-rw-r--r-- | orc-test/orcarray.c | 14 | ||||
-rw-r--r-- | orc-test/orcarray.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/orc-test/orcarray.c b/orc-test/orcarray.c index c84a2da..23c8bfa 100644 --- a/orc-test/orcarray.c +++ b/orc-test/orcarray.c @@ -150,6 +150,20 @@ orc_array_set_pattern_2 (OrcArray *array, OrcRandomContext *context, } } break; + case ORC_PATTERN_FLOAT_DENORMAL: + { + if (array->element_size != 4) return; + for(j=0;j<array->m;j++){ + orc_union32 *data; + + data = ORC_PTR_OFFSET(array->data, array->stride * j); + + for(i=0;i<array->n;i++){ + data[i].i = orc_random (context); + data[i].i &= ~0x7f800000; + } + } + } break; default: break; diff --git a/orc-test/orcarray.h b/orc-test/orcarray.h index 46281e9..eb57c57 100644 --- a/orc-test/orcarray.h +++ b/orc-test/orcarray.h @@ -24,6 +24,7 @@ enum { ORC_PATTERN_RANDOM = 0, ORC_PATTERN_FLOAT_SMALL, ORC_PATTERN_FLOAT_SPECIAL, + ORC_PATTERN_FLOAT_DENORMAL }; OrcArray *orc_array_new (int n, int m, int element_size, int misalignment); |