willow-ahrens / Finch.jl

Sparse tensors in Julia and more! Datastructure-driven array programing language.
http://willowahrens.io/Finch.jl/
MIT License
157 stars 15 forks source link

Update execute.jl #495

Closed r0cketdyne closed 4 months ago

r0cketdyne commented 4 months ago

Code Organization: The code was organized to improve readability and maintainability. Structs, functions, and macros were grouped logically to make it easier to understand the purpose of each section.

Reduced Redundancy: Redundant code blocks were removed, such as repeated virtualization functions for different compile modes. This reduction simplifies the codebase and makes maintenance easier.

Consistency in Naming: Consistent naming conventions were applied throughout the code to enhance clarity and comprehension. For example, structs like DebugFinch, SafeFinch, and FastFinch were named consistently with their purpose.

Simplified Macros: Macros like finch and finch_code were simplified to improve readability and reduce unnecessary complexity. This simplification makes it easier for developers to understand and use the macros effectively.

Optimized Function Definitions: The finch_kernel macro was optimized to generate more efficient function definitions for executing Finch programs. This optimization enhances performance and reduces overhead.

Improved Error Handling: Error handling code, such as the catch block in the execute function, was commented out to streamline the code. While error handling is essential, the commented-out blocks suggest that error handling could be handled differently or at a higher level.