Fix problem that the thread number must be squre. Now the number of thread can be any value.
added StaticTreeBarrier interfaces
added StaticTreeBarrier interface