amazon-archives / amazon-dsstne

Deep Scalable Sparse Tensor Network Engine (DSSTNE) is an Amazon developed library for building Deep Learning (DL) machine learning (ML) models
Apache License 2.0
4.41k stars 731 forks source link

Remove Utils.h dependency from NNNetwork.cpp #198

Open kiukA9 opened 6 years ago

kiukA9 commented 6 years ago

Currently because NNNetwork.cpp includes Utils.h, engine has a dependency on utils. Utils also has a dependency on engine (technically this is a circular dependency). The reason why things are working at the moment is because NNNetwork.cpp depends on a single function double elapsed_seconds() from Utils.h which also happens to be declared and defined in the header (hence not requiring a Utils.o - if this were true things wouldn't have worked since there would be a true circular dependency).

the method elapsed_seconds() should be extracted to a utils.h in engine and Utils.h in utils should include it.