cloudFPGA (cF) API  1.0
The documentation of the source code of cloudFPGA (cF)
ray_play Namespace Reference

Functions

def consumer (i, queue, frame)
 

Variables

 dashboard_port
 
 num_cpus
 
string image_file = os.environ['cFpRootDir'] + "ROLE/vision/hls/harris/test/512x512.png"
 
 frame = cv.imread(image_file, cv.IMREAD_COLOR)
 
 queue = Queue(maxsize=100)
 
list consumers = [consumer.remote(i, queue, frame) for i in range(5)]
 
 results = ray.get(consumers)
 
string file_out = "/tmp/img_"+str(t)+".png"
 

Function Documentation

◆ consumer()

def ray_play.consumer (   i,
  queue,
  frame 
)

Definition at line 18 of file ray_play.py.

18 def consumer(i, queue, frame):
19  next_item = queue.get(block=True, timeout=100)
20  print(f"will work on {next_item} and then put in back in the queue")
21  for l in range(10000000):
22  k = i + l
23  frame_ret = cv.medianBlur(frame, 9)
24  queue.put(next_item)
25  return frame_ret
26 
27 
def consumer(i, queue, frame)
Definition: ray_play.py:18

Variable Documentation

◆ consumers

list ray_play.consumers = [consumer.remote(i, queue, frame) for i in range(5)]

Definition at line 28 of file ray_play.py.

◆ dashboard_port

ray_play.dashboard_port

Definition at line 9 of file ray_play.py.

◆ file_out

string ray_play.file_out = "/tmp/img_"+str(t)+".png"

Definition at line 41 of file ray_play.py.

◆ frame

ray_play.frame = cv.imread(image_file, cv.IMREAD_COLOR)

Definition at line 12 of file ray_play.py.

◆ image_file

string ray_play.image_file = os.environ['cFpRootDir'] + "ROLE/vision/hls/harris/test/512x512.png"

Definition at line 11 of file ray_play.py.

◆ num_cpus

ray_play.num_cpus

Definition at line 9 of file ray_play.py.

◆ queue

ray_play.queue = Queue(maxsize=100)

Definition at line 15 of file ray_play.py.

◆ results

ray_play.results = ray.get(consumers)

Definition at line 37 of file ray_play.py.