Impose more discipline on uses of ModelArgumentInfo

Change ModelArgumentInfo from a struct to a class.  Fields are no
longer public, and initialization uses a factory method (e.g.,
createFromPointer) rather than a setter (e.g.,
setFromPointer). Accessor methods are guarded by a check against the
(already existing) state (POINTER, MEMORY, or both).

Calling ANeuralNetworksExecution_setInput*() or
ANeuralNetworksExecution_setOutput*() multiple times on the same
operand of the same execution is now an error.

Bug: 147850002
Test: NeuralNetworksTest_static
Change-Id: Idebe6b4df79bff5c62e56860e42463d610d91085
7 files changed
tree: 0aae7906085e79494d16c4ade04c7cc95e2f4d6e
  1. nn/
  2. .clang-format
  3. CleanSpec.mk
  4. CPPLINT.cfg
  5. OWNERS
  6. PREUPLOAD.cfg