load_size Subroutine

private impure elemental subroutine load_size(this)

Uses

    • json_module
  • proc~~load_size~~UsesGraph proc~load_size foropenai_ImageGeneration::ImageGeneration%load_size json_module json_module proc~load_size->json_module

Type Bound

ImageGeneration

Arguments

Type IntentOptional Attributes Name
class(ImageGeneration), intent(inout) :: this

Calls

proc~~load_size~~CallsGraph proc~load_size foropenai_ImageGeneration::ImageGeneration%load_size destroy destroy proc~load_size->destroy get get proc~load_size->get initialize initialize proc~load_size->initialize load_file load_file proc~load_size->load_file

Called by

proc~~load_size~~CalledByGraph proc~load_size foropenai_ImageGeneration::ImageGeneration%load_size proc~load_imagegeneration_data foropenai_ImageGeneration::ImageGeneration%load_ImageGeneration_data proc~load_imagegeneration_data->proc~load_size proc~set_imagegeneration_data foropenai_ImageGeneration::ImageGeneration%set_ImageGeneration_data proc~set_imagegeneration_data->proc~load_imagegeneration_data program~test_imagegeneration test_ImageGeneration program~test_imagegeneration->proc~set_imagegeneration_data

Source Code

   elemental impure subroutine load_size(this)
      use json_module, only: json_file
      class(ImageGeneration), intent(inout) :: this
      type(json_file)                      :: json
      character(len=:), allocatable        :: tmp
      logical                              :: found
      call json%initialize()
      call json%load_file(trim(this%file_name))
      call json%get("ImageGeneration.size", tmp, found=found)
      if (found) this%size = trim(tmp)
      call json%destroy()
   end subroutine load_size