# Function:    timing
# Description: Measure the execution time of a command a put it in a file
# Argument $1: Command (in a string) to execute and time
# Argument $2: File where the timing should be stored
define timing
	@start=$$(date +%s); \
	eval $(1); \
	end=$$(date +%s); \
	T=$$(($$end-$$start)); \
	printf "$$T" > $(2);
endef

# Binary arguments
ITER=200000
# Function:    timing
# Description: Store the execution time and LUPS of a LBM simulation in a file
# Argument $1: LBM simulation command (in a string) to execute
# Argument $2: File where the timing and lups are stored
define timing
	@start=$$(date +%s); \
	echo $$(eval "$(1)" | sed -n 's/average lups: \(.*\).*/\1/p') > $(2); \
	end=$$(date +%s); \
	T=$$(($$end-$$start)); \
	printf "$$T" >> $(2);
endef

# Binary arguments
ITER=200000
Store LUPS computed by the LBM simulation side by side with the execution time
Store LUPS computed by the LBM simulation side by side with the execution time
