編集:問題は解決しました!rzymek の回答は役に立ちました。
質問: JOCL の場合、デバイスの分裂を伴う opencl の計算から CPU の一部のコアを除外するにはどうすればよいですか? (cl_device_partition_property の Java ポートが 0.1.9 バージョンで破損しているようです)
編集:私はこれを見つけました:
clCreateSubDevices(devices[0][1],core , 1, cpuCores, coreIDs);
しかし、java/jocl はこれを受け入れません:
cl_device_partition_property core=CL.CL_DEVICE_PARTITION_BY_COUNTS;
エラーは次のとおりです。
Type mismatch: cannot convert from int to cl_device_partition_property
null の初期化を試してから、変数独自のメソッドを使用してプロパティを設定しました。
cl_device_partition_property core = null;
core.addProperty(CL_DEVICE_PARTITION_BY_COUNTS, platforms[0]);
編集:今それは与える
java.lang.NullPointerException,
エラー。
IT は unsigned int (cl_device_partition_property ではない) である必要がありますが、Java にはありません。
コンストラクターでの新しい試み:
cl_device_partition_property core = new cl_device_partition_property();
エラー:
A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007fedb6500bf, pid=4952, tid=4852
#
# JRE version: 7.0_21-b11
# Java VM: Java HotSpot(TM) 64-Bit Server VM (23.21-b01 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [amdocl64.dll+0x1800bf] clGetSamplerInfo+0x1972f
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\javalar\buraya\paralelProje\hs_err_pid4952.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[error occurred during error reporting , id 0xc0000005]
別の試み:
cl_device_partition_property core = (CL_UNSIGNED_INT32)CL_DEVICE_PARTITION_BY_COUNTS;
エラー:
CL_UNSIGNED_INT32 cannot be resolved to a type
これもうまくいきませんでした:
Pointer xyz=Pointer.to(core); // jocl's pointer type.
clCreateSubDevices(device,xyz, 1, cpuCores, coreIDs);
編集:問題が解決しました!ありがとう。CPUを今すぐパーティション分割できます: