Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inference_engine_t): tensor_range_t getters #147

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/inference_engine/inference_engine_m_.f90
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ module inference_engine_m_
contains
procedure :: infer
procedure :: to_json
procedure :: input_range
procedure :: output_range
procedure :: num_inputs
procedure :: num_outputs
procedure :: nodes_per_layer
Expand Down Expand Up @@ -80,6 +82,18 @@ impure elemental module function construct_from_json(file_) result(inference_eng

interface

pure module function input_range(self) result(my_input_range)
implicit none
class(inference_engine_t), intent(in) :: self
type(tensor_range_t) my_input_range
end function

pure module function output_range(self) result(my_output_range)
implicit none
class(inference_engine_t), intent(in) :: self
type(tensor_range_t) my_output_range
end function

pure module function to_exchange(self) result(exchange)
implicit none
class(inference_engine_t), intent(in) :: self
Expand Down
8 changes: 8 additions & 0 deletions src/inference_engine/inference_engine_s.F90
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@

contains

module procedure input_range
my_input_range = self%input_range_
end procedure

module procedure output_range
my_output_range = self%output_range_
end procedure

module procedure to_exchange
exchange%input_range_ = self%input_range_
exchange%output_range_ = self%output_range_
Expand Down
Loading