cgotorch/torch.cc
const char *Argmin(Tensor a, int64_t *dim, int8_t keepdim, Tensor *result) {
  try {
    if (dim == nullptr) {
      *result = new at::Tensor(a->argmin());
    } else {
      *result = new at::Tensor(a->argmin(*dim, static_cast<bool>(keepdim)));
    }
    return nullptr;
  } catch (const std::exception &e) {
    return exception_str(e.what());
  }
}
// We use the pointer int64_t* to represent an optional int64_t parameter -- the
// value nullptr indicate not-specified.  Please be aware that we need only one
// "pointerized" parameter because C++ doesn't allow named parameters and the
// rest optional parameters don't need to be pointerized.
We use the pointer int64_t* to represent an optional int64_t parameter -- the
value nullptr indicate not-specified.  Please be aware that we need only one
"pointerized" parameter because C++ doesn't allow named parameters and the
rest optional parameters don't need to be pointerized.
We use the pointer int64_t * to represent an optional int64_t parameter -- the value nullptr indicate not - specified . Please be aware that we need only one " pointerized " parameter because C ++ doesn ' t allow named parameters and the rest optional parameters don ' t need to be pointerized .
const char *Argmin(Tensor a, int64_t *dim, int8_t keepdim, Tensor *result) {
  try {
    if (dim == nullptr) {
      *result = new at::Tensor(a->argmin());
    } else {
      *result = new at::Tensor(a->argmin(*dim, static_cast<bool>(keepdim)));
    }
    return nullptr;
  } catch (const std::exception &e) {
    return exception_str(e.what());
  }
}
const char * Argmin ( Tensor a , int64_t * dim , int8_t keepdim , Tensor * result ) { try { if ( dim == nullptr ) { * result = new at :: Tensor ( a -> argmin ( ) ) ; } else { * result = new at :: Tensor ( a -> argmin ( * dim , static_cast < bool > ( keepdim ) ) ) ; } return nullptr ; } catch ( const std :: exception & e ) { return exception_str ( e . what ( ) ) ; } }
We use the pointer int64_t* to represent an optional int64_t parameter -- the
value nullptr indicate not-specified.
We use the pointer int64_t * to represent an optional int64_t parameter -- the value nullptr indicate not - specified .