pushData method

void pushData(
  1. List<double> values
)

Implementation

void pushData(List<double> values) {
  int count = values.length;
  Pointer<Float> ptr = calloc<Float>(count);
  Float32List view = ptr.asTypedList(count);

  for (int i = 0; i < count; i = i + 1) {
    view[i] = values[i];
  }

  CudaEngine.load(id, ptr, shape);
  calloc.free(ptr);
}