- unsigned char result[nb_images_per_sequence * depth * width * height];
- unsigned char *r = result;
- fl_generate_sequences(1, nb_images_per_sequence, width, height, result);
- for(k = 0; k < nb_images_per_sequence; k++) {
- for(c = 0; c < depth; c++) {
- for(i = 0; i < height; i++) {
- b = a
- + s * st0 + k * st1 + c * st2 + i * st3;
- for(j = 0; j < width; j++) {
+ a = THByteTensor_storage(result)->data + THByteTensor_storageOffset(result) + s * st0;
+ fl_generate_sequence(nb_images, image_width, image_height, nb_shapes,
+ random_shape_size, random_colors,
+ pulling,
+ tmp_buffer);
+ unsigned char *r = tmp_buffer;
+ for(k = 0; k < nb_images; k++) {
+ for(c = 0; c < nb_channels; c++) {
+ for(i = 0; i < image_height; i++) {
+ b = a + k * st1 + c * st2 + i * st3;
+ for(j = 0; j < image_width; j++) {