Skip to content

Commit

Permalink
fixed syntax warnings for OpenCL
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsivaramanneo committed Dec 2, 2024
1 parent 54c49e5 commit 59fed11
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
28 changes: 14 additions & 14 deletions Files/OpenCL.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ def getDeviceNames(value):
oclPlatformslocal.append("BLANK")

for i in range(len(oclPlatformslocal)):
oclPlatformslocal[i] = [j.replace("(", "\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace("(", "\\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = ''.join(oclPlatformslocal[i])

fetch_device_names_command = "cat %s | awk '/%s.*/{flag=1;next}/Platform.*/{flag=0}flag'| grep -o :.* | grep -o ' .*' | awk /./"%(Filenames.opencl_plaform_and_device_names_file,oclPlatforms[value])
Expand All @@ -69,8 +69,8 @@ def getPlatfromDetails(value):
oclPlatformslocal.append("BLANK")

for i in range(len(oclPlatformslocal)):
oclPlatformslocal[i] = [j.replace("(", "\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace("(", "\\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = ''.join(oclPlatformslocal[i])

fetch_platform_details_file_command = "cat %s | awk '/Number of platforms.*/{flag=1;next}/Number of devices/{flag=0}flag' | awk '/%s/{flag=1;next}/Platform Name/{flag=0}flag' | awk /./ " %(Filenames.opencl_output_file,oclPlatformslocal[value])
Expand Down Expand Up @@ -105,12 +105,12 @@ def getDeviceDetails(value):
oclPlatformslocal.append("BLANK")

for i in range(len(oclPlatformslocal)):
oclPlatformslocal[i] = [j.replace("(", "\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace("(", "\\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = ''.join(oclPlatformslocal[i])


fetch_device_details_file_command = "cat %s | awk '/%s/&& ++n == 2,/%s*/' | awk '/Device Name.*/&& ++n == %d,/Preferred \/.*/' | grep -v Preferred | grep -v Available" % (Filenames.opencl_output_file,oclPlatformslocal[value2], oclPlatformslocal[value2 + 1], value + 1)
fetch_device_details_file_command = "cat %s | awk '/%s/&& ++n == 2,/%s*/' | awk '/Device Name.*/&& ++n == %d,/Preferred \\/.*/' | grep -v Preferred | grep -v Available" % (Filenames.opencl_output_file,oclPlatformslocal[value2], oclPlatformslocal[value2 + 1], value + 1)
fetch_device_extensions_command = "cat %s | awk '/%s/&& ++n == 2,/%s/' | awk '/Device Name.*/&& ++n == %d,/Extensions.*/'| awk '/Extensions|Available/'" % (Filenames.opencl_output_file, oclPlatformslocal[value2], oclPlatformslocal[value2 + 1], value + 1)

with open(Filenames.opencl_device_details_file,"w") as file:
Expand Down Expand Up @@ -187,8 +187,8 @@ def getDeviceMemoryImageDetails(value):
oclPlatformslocal.append("BLANK")

for i in range(len(oclPlatformslocal)):
oclPlatformslocal[i] = [j.replace("(", "\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace("(", "\\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = ''.join(oclPlatformslocal[i])

fetch_device_memory_and_image_file_command = "cat %s | awk '/%s/&& ++n == 2,/%s/' | awk '/Device Name.*/&& ++n == %d,/Extensions.*/'| awk '/Address.*/{flag=1;print}/Queue.*/{flag=0}flag' | uniq" % (Filenames.opencl_output_file,oclPlatformslocal[value2], oclPlatformslocal[value2 + 1], value + 1)
Expand Down Expand Up @@ -241,11 +241,11 @@ def getDeviceVectorDetails(value):
oclPlatformslocal.append("BLANK")

for i in range(len(oclPlatformslocal)):
oclPlatformslocal[i] = [j.replace("(", "\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace("(", "\\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = ''.join(oclPlatformslocal[i])

fetch_device_vector_details_file_command = "cat %s | awk '/%s/&& ++n == 2,/%s/' | awk '/Device Name.*/&& ++n == %d,/Extensions.*/'| awk '/Preferred \/.*/{flag=1;print}/Address.*/{flag=0}flag' | uniq" % (Filenames.opencl_output_file, oclPlatformslocal[value2], oclPlatformslocal[value2 + 1], value + 1)
fetch_device_vector_details_file_command = "cat %s | awk '/%s/&& ++n == 2,/%s/' | awk '/Device Name.*/&& ++n == %d,/Extensions.*/'| awk '/Preferred \\/.*/{flag=1;print}/Address.*/{flag=0}flag' | uniq" % (Filenames.opencl_output_file, oclPlatformslocal[value2], oclPlatformslocal[value2 + 1], value + 1)
createMainFile(Filenames.opencl_device_vector_file,fetch_device_vector_details_file_command)

oclDeviceVectorDetailsLHS = fetchContentsFromCommand(Filenames.fetch_device_vector_details_lhs_command)
Expand Down Expand Up @@ -295,8 +295,8 @@ def getDeviceQueueExecutionCapabilities(value):
oclPlatformslocal.append("BLANK")

for i in range(len(oclPlatformslocal)):
oclPlatformslocal[i] = [j.replace("(", "\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace("(", "\\(") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = [j.replace(")", "\\)") for j in oclPlatformslocal[i]]
oclPlatformslocal[i] = ''.join(oclPlatformslocal[i])

fetch_device_queue_execution_file_command = "cat %s | awk '/%s/&& ++n == 2,/%s/' | awk '/Device Name.*/&& ++n == %d,/Extensions.*/' | awk '/Queue.*/{flag=1;print}/Extensions.*/{flag=0}flag' | grep -v Available | uniq" % (Filenames.opencl_output_file,oclPlatformslocal[value2], oclPlatformslocal[value2 + 1], value + 1)
Expand Down
1 change: 0 additions & 1 deletion Files/gtk_test.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ font-weight: 500;
}
headerbar {
background-image: linear-gradient(#2B2B2B,#2B2B2B);
background-image: none;
background-color: #2B2B2B;
font-size: medium;
border-style: none none none none;
Expand Down

0 comments on commit 59fed11

Please sign in to comment.