blob: 20274601036576d4f1f8a9aa2647e93a384b33cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* Created on Tuesday, May 03 2011
*/
package com.jogamp.opencl;
import org.junit.Rule;
import org.junit.rules.MethodRule;
import org.junit.rules.Timeout;
import com.jogamp.opencl.util.CLMultiContext;
import java.util.List;
import org.junit.Test;
import static org.junit.Assert.*;
import static java.lang.System.*;
/**
*
* @author Michael Bien
*/
public class CLMultiContextTest {
@Rule
public MethodRule methodTimeout= new Timeout(10000);
@Test
public void createMultiContextTest() {
CLMultiContext mc = CLMultiContext.create(CLPlatform.listCLPlatforms());
try{
List<CLContext> contexts = mc.getContexts();
List<CLDevice> devices = mc.getDevices();
assertFalse(contexts.isEmpty());
assertFalse(devices.isEmpty());
for (CLContext context : contexts) {
out.println(context);
}
for (CLDevice device : devices) {
out.println(device);
}
}finally{
mc.release();
}
}
}
|