#define EXTEND_ROWS 16
#define EXTEND_STRIDE 256
-#define OOB_VALUE 0xa5
-
#ifdef _MSC_VER
#define isnan(x) _isnan(x)
#endif
data = array->alloc_data;
for(i=0;i<array->stride * EXTEND_ROWS;i++){
- if (data[i] != OOB_VALUE) {
+ if (data[i] != ORC_OOB_VALUE) {
printf("OOB check failed at start-%d\n", array->stride * EXTEND_ROWS - i);
return FALSE;
}
for(j=0;j<array->m;j++){
data = ORC_PTR_OFFSET(array->data, array->stride * j);
for(i=array->element_size * array->n;i<array->stride;i++){
- if (data[i] != OOB_VALUE) {
+ if (data[i] != ORC_OOB_VALUE) {
printf("OOB check failed on row %d, end+%d\n", j,
i - array->element_size * array->n);
return FALSE;
data = ORC_PTR_OFFSET (array->data, array->stride * array->m);
for(i=0;i<array->stride * EXTEND_ROWS;i++){
- if (data[i] != OOB_VALUE) {
+ if (data[i] != ORC_OOB_VALUE) {
printf("OOB check failed at end+%d\n", i);
return FALSE;
}
orc_array_set_random (src[i-ORC_VAR_S1], &rand_context);
} else if (program->vars[i].vartype == ORC_VAR_TYPE_DEST) {
dest_exec[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size);
- orc_array_set_pattern (dest_exec[i], 0xa5);
+ orc_array_set_pattern (dest_exec[i], ORC_OOB_VALUE);
dest_emul[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size);
- orc_array_set_pattern (dest_emul[i], 0xa5);
+ orc_array_set_pattern (dest_emul[i], ORC_OOB_VALUE);
} else if (program->vars[i].vartype == ORC_VAR_TYPE_PARAM) {
orc_executor_set_param (ex, i, 2);
}
orc_array_set_random (src[i-ORC_VAR_S1], &rand_context);
} else if (program->vars[i].vartype == ORC_VAR_TYPE_DEST) {
dest_exec[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size);
- orc_array_set_pattern (dest_exec[i], 0xa5);
+ orc_array_set_pattern (dest_exec[i], ORC_OOB_VALUE);
dest_emul[i-ORC_VAR_D1] = orc_array_new (n, m, program->vars[i].size);
- orc_array_set_pattern (dest_emul[i], 0xa5);
+ orc_array_set_pattern (dest_emul[i], ORC_OOB_VALUE);
} else if (program->vars[i].vartype == ORC_VAR_TYPE_PARAM) {
orc_executor_set_param (ex, i, 2);
}