// File: kernel.cpp
#include "loop_024.h"
#include <stdint.h>

extern "C" void inner_loop_024(struct loop_024_data * data) {
  uint8_t * a = data->a;
  uint8_t * b = data->b;
  int64_t n = data->n;

  uint32_t sum = 0;
  for (int i = 0; i < n; i++) {
    sum += __builtin_abs(a[i] - b[i]);
  }
  data->res = sum;
}