提交 07cfe028 编写于 作者: Z ZhangZifei

test(bpu): add two simple bpu test to src/test/testcase

上级 f36655eb
include $(AM_HOME)/Makefile.check
.PHONY: all run clean latest $(ALL)
ALL = $(basename $(notdir $(shell find tests/. -name "*.c")))
all: $(addprefix Makefile., $(ALL))
@echo "" $(ALL)
$(ALL): %: Makefile.%
Makefile.%: tests/%.c latest
@/bin/echo -e "NAME = $*\nSRCS = $<\nLIBS += klib\ninclude $${AM_HOME}/Makefile.app" > $@
-@make -s -f $@ ARCH=$(ARCH) $(MAKECMDGOALS)
-@rm -f Makefile.$*
#cancel rules included by $(AM_HOME)/Makefile.check
image: ;
default $(MAKECMDGOALS): all ;
clean:
rm -rf Makefile.* build/
latest:
\ No newline at end of file
// #include <am.h>
// #include <klib.h>
# define OutLoopNum 20
# define InnerLoopNum 20
int array[OutLoopNum][InnerLoopNum];
void double_loop() {
for (int i = 0; i < OutLoopNum; i++) {
for (int j = 1; j < InnerLoopNum; j++) {
array[i][j] = i + j;
}
}
}
int main () {
double_loop();
return 0;
}
// #include <am.h>
// #include <klib.h>
# define DEPTH 100
int nest(int depth) {
if (depth == 0) return depth;
nest(depth - 1);
return depth;
}
int main () {
nest(DEPTH);
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册