/gem5/ext/pybind11/tests/ |
H A D | test_numpy_vectorize.py | 7 import numpy as np 11 assert np.isclose(m.vectorized_func3(np.array(3 + 7j)), [6 + 14j]) 15 assert np.isclose(f(1, 2, 3), 6) 18 assert np.isclose(f(np.array(1), np.array(2), 3), 6) 21 assert np.allclose(f(np.array([1, 3]), np [all...] |
H A D | test_eigen.py | 8 import numpy as np 10 ref = np.array([[ 0., 3, 0, 0, 0, 11], 18 np.testing.assert_array_equal(mat, ref) 44 ref2 = np.array([[0., 1, 2, 3], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15]]) 45 np.testing.assert_array_equal(m.partial_copy_four_rm_r(ref2), ref2) 46 np.testing.assert_array_equal(m.partial_copy_four_rm_c(ref2), ref2) 47 np.testing.assert_array_equal(m.partial_copy_four_rm_r(ref2[:, 1]), ref2[:, [1]]) 48 np.testing.assert_array_equal(m.partial_copy_four_rm_c(ref2[0, :]), ref2[[0], :]) 49 np.testing.assert_array_equal(m.partial_copy_four_rm_r(ref2[:, (0, 2)]), ref2[:, (0, 2)]) 50 np [all...] |
H A D | test_numpy_array.py | 7 import numpy as np 27 return np.array([[1, 2, 3], [4, 5, 6]], '=u2') 31 a = np.array(0, 'f8') 47 a = np.array([[1, 2, 3], [4, 5, 6]], 'u2').view() 175 if LooseVersion(np.__version__) >= LooseVersion("1.14.0"): 179 assert np.all(a == b) 186 a1 = np.array([1, 2], dtype=np.int16) 191 a1 = np.array([[1, 2], [3, 4]], dtype=np [all...] |
H A D | test_numpy_dtypes.py | 8 import numpy as np 13 ld = np.dtype('longdouble') 14 return np.dtype({'names': ['bool_', 'uint_', 'float_', 'ldbl_'], 21 return np.dtype([('bool_', '?'), ('uint_', 'u4'), ('float_', 'f4'), ('ldbl_', 'g')]) 33 ld = np.dtype('longdouble') 41 np.dtype('longdouble').itemsize, e='<' if byteorder == 'little' else '>') 45 return 12 + 4 * (np.dtype('uint64').alignment > 4) + 8 + 8 * ( 46 np.dtype('longdouble').alignment > 8) 50 ld = np.dtype('longdouble') 56 ld = np [all...] |
H A D | test_buffers.py | 9 import numpy as np 14 m.Matrix(np.array([1, 2, 3])) # trying to assign a 1D array 17 m3 = np.array([[1, 2, 3], [4, 5, 6]]).astype(np.float32) 35 # PyPy: Memory leak in the "np.array(m, copy=False)" call 50 mat2 = np.array(mat, copy=False) 78 assert np.asarray(matrix).shape == (5, 5)
|
H A D | test_stl_binders.py | 6 import numpy as np 91 a = np.array([1, 2, 3, 4], dtype=np.int32) 95 a = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]], dtype=np.uintc) 99 ma = np.asarray(v) 109 ma = np.asarray(v) 113 v = m.VectorStruct(np.zeros(3, dtype=np.dtype([('w', 'bool'), ('x', 'I'),
|
H A D | conftest.py | 196 import numpy as np 198 np = None 211 pytest.requires_numpy = skipif(not np, reason="numpy is not installed") 212 pytest.requires_scipy = skipif(not np, reason="scipy is not installed") 213 pytest.requires_eigen_and_numpy = skipif(not have_eigen or not np,
|
H A D | test_builtin_casters.py | 318 import numpy as np 321 # np.bool_ is not considered implicit 322 assert convert(np.bool_(True)) is True 323 assert convert(np.bool_(False)) is False 324 assert noconvert(np.bool_(True)) is True 325 assert noconvert(np.bool_(False)) is False
|
H A D | test_smart_ptr.py | 238 np = m.TypeForHolderWithAddressOf.make() 242 del np
|
H A D | test_numpy_array.cpp | 25 py::module np = py::module::import("numpy"); local 27 check.numpy = np.attr("dtype")(np.attr(name));
|
/gem5/src/sim/ |
H A D | process.cc | 145 Process *np, RegVal flags) 162 delete np->pTable; 163 np->pTable = pTable; 166 proxy.setPageTable(np->pTable); 168 np->memState = memState; 180 bool alloc_page = !(np->pTable->translate(vaddr, paddr)); 181 np->replicatePage(vaddr, paddr, otc, ntc, alloc_page); 184 *np->memState = *memState; 193 np->fds = fds; 202 std::shared_ptr<FDArray> nfds = np 144 clone(ThreadContext *otc, ThreadContext *ntc, Process *np, RegVal flags) argument [all...] |
/gem5/util/plot_dram/ |
H A D | dram_sweep_plot.py | 44 import numpy as np 162 X = np.arange(burst_size, max_size + 1, burst_size) 163 Y = np.arange(1, banks + 1, 1) 164 X, Y = np.meshgrid(X, Y) 168 Z = np.array(zs) 175 ax.xaxis.set_ticks(np.arange(start, end + 1, 64))
|
H A D | dram_lat_mem_rd_plot.py | 43 import numpy as np
|
H A D | PlotPowerStates.py | 42 import numpy as np 215 ind = np.arange(len(States)) 246 ind = np.arange(N)
|
/gem5/configs/example/ |
H A D | fs.py | 82 def build_test_system(np): 92 test_sys = makeLinuxX86System(test_mem_mode, np, bm[0], options.ruby, 95 test_sys = makeArmSystem(test_mem_mode, options.machine_type, np, 145 for i in range(np)] 198 if np > 1: 201 for i in range(np): 233 def build_drive_system(np): 249 drive_sys = makeLinuxX86System(drive_mem_mode, np, bm[1], 252 drive_sys = makeArmSystem(drive_mem_mode, options.machine_type, np, 338 np variable [all...] |
H A D | se.py | 175 np = options.num_cpus variable 176 system = System(cpu = [CPUClass(cpu_id=i) for i in range(np)], 222 if np > 1: 225 for i in range(np): 255 for i in range(np):
|
/gem5/src/systemc/tests/systemc/misc/sim_tests/new_prop/new_prop1/ |
H A D | new_prop1.cpp | 134 new_prop np("np"); 137 np.i[j]( i[j] );
|
/gem5/src/systemc/tests/systemc/misc/sim_tests/new_prop/new_prop2/ |
H A D | new_prop2.cpp | 135 new_prop np("np"); 138 np.i[j]( i[j] );
|
/gem5/configs/common/ |
H A D | Simulation.py | 453 np = options.num_cpus 457 for i in range(np): 461 for i in range(np): 466 for i in range(np)] 468 for i in range(np): 498 switch_cpu_list = [(testsys.cpu[i], switch_cpus[i]) for i in range(np)] 511 cpu_id=(i)) for i in range(np)] 513 for i in range(np): 529 for i in range(np)] 532 for i in range(np)] [all...] |
/gem5/ext/systemc/src/sysc/qt/ |
H A D | meas.c | 421 test07_aux3 (void *np, void *mep, void *nxtp, qt_userf_t *null) argument 425 n = *(int *)np; 479 test08_aux3 (void *np, void *mep, void *nxtp, qt_userf_t *null) argument 483 n = *(int *)np;
|