text stringlengths 81 112k |
|---|
Check if a given period is possibly an alias.
Parameters
----------
period : float
A period to test if it is a possible alias or not.
Returns
-------
is_alias : boolean
True if the given period is in a range of period alias.
def is_period_alias(period):
"""
Check if a ... |
Serialize `object` to a file denoted by `filepath`.
Parameters
----------
filepath : str
A filename. If the suffix is `.joblib` and joblib can be
imported, `joblib.dump` is used in place of the regular
pickling mechanisms; this results in much faster saves by
saving arrays a... |
Allow configuration of the pickle protocol on a per-machine basis.
This way, if you use multiple platforms with different versions of
pickle, you can configure each of them to use the highest protocol
supported by all of the machines that you want to be able to
communicate.
def get_pickle_protocol():
... |
Loads and parses a yaml file for a Train object.
Publishes the relevant training environment variables
def load_train_file(config_file_path):
"""Loads and parses a yaml file for a Train object.
Publishes the relevant training environment variables"""
from pylearn2.config import yaml_parse
suffix_t... |
Propagate forward through the layer
**Parameters:**
input_data : ``GPUArray``
Inpute data to perform dropout on.
prediction : bool, optional
Whether to use prediction model. If true, then the data is
scaled by ``1 - dropout_probability`` uses dropout.
... |
Backpropagate through the hidden layer
**Parameters:**
input_data : ``GPUArray``
Inpute data to perform dropout on.
df_output : ``GPUArray``
Gradients with respect to the output of this layer
(received from the layer above).
cache : list of ``GPUAr... |
Create ctypes pointer to object.
Notes
-----
This function converts None to a real NULL pointer because of bug
in how ctypes handles None on 64-bit platforms.
def POINTER(obj):
"""
Create ctypes pointer to object.
Notes
-----
This function converts None to a real NULL pointer beca... |
Return ctypes pointer to data in GPUAarray object.
def gpuarray_ptr(g):
"""
Return ctypes pointer to data in GPUAarray object.
"""
addr = int(g.gpudata)
if g.dtype == np.int8:
return ctypes.cast(addr, POINTER(ctypes.c_byte))
if g.dtype == np.uint8:
return ctypes.cast(addr, POI... |
Allocate device memory.
Allocate memory on the device associated with the current active
context.
Parameters
----------
count : int
Number of bytes of memory to allocate
ctype : _ctypes.SimpleType, optional
ctypes type to cast returned pointer.
Returns
-------
ptr ... |
Allocate pitched device memory.
Allocate pitched memory on the device associated with the current active
context.
Parameters
----------
pitch : int
Pitch for allocation.
rows : int
Requested pitched allocation height.
cols : int
Requested pitched allocation width.
... |
Copy memory from host to device.
Copy data from host memory to device memory.
Parameters
----------
dst : ctypes pointer
Device memory pointer.
src : ctypes pointer
Host memory pointer.
count : int
Number of bytes to copy.
def cudaMemcpy_htod(dst, src, count):
"""
... |
Copy memory from device to host.
Copy data from device memory to host memory.
Parameters
----------
dst : ctypes pointer
Host memory pointer.
src : ctypes pointer
Device memory pointer.
count : int
Number of bytes to copy.
def cudaMemcpy_dtoh(dst, src, count):
"""
... |
Return the amount of free and total device memory.
Returns
-------
free : long
Free memory in bytes.
total : long
Total memory in bytes.
def cudaMemGetInfo():
"""
Return the amount of free and total device memory.
Returns
-------
free : long
Free memory in ... |
Get current CUDA device.
Return the identifying number of the device currently used to
process CUDA operations.
Returns
-------
dev : int
Device number.
def cudaGetDevice():
"""
Get current CUDA device.
Return the identifying number of the device currently used to
process... |
Get installed CUDA driver version.
Return the version of the installed CUDA driver as an integer. If
no driver is detected, 0 is returned.
Returns
-------
version : int
Driver version.
def cudaDriverGetVersion():
"""
Get installed CUDA driver version.
Return the version of th... |
Get memory pointer attributes.
Returns attributes of the specified pointer.
Parameters
----------
ptr : ctypes pointer
Memory pointer to examine.
Returns
-------
memory_type : int
Memory type; 1 indicates host memory, 2 indicates device
memory.
device : int
... |
Evaluate a thunk in an environment.
Will defer the actual evaluation to the thunk itself, but adds two things:
caching and recursion detection.
Since we have to use a global evaluation stack (because there is a variety of functions that may
be invoked, not just eval() but also __getitem__, and not all of them... |
Delegate to our current "value provider" for the node belonging to this key.
def get_node(self, key):
"""Delegate to our current "value provider" for the node belonging to this key."""
if key in self.names:
return self.values.get_member_node(key) if hasattr(self.values, 'get_member_node') else None
r... |
create_table
Manually create a temporary table for model in test data base.
:return:
def create_table(cls):
"""
create_table
Manually create a temporary table for model in test data base.
:return:
"""
schema_editor = getattr(connection, 'schema_editor',... |
delete_table
Manually delete a temporary table for model in test data base.
:return:
def delete_table(cls):
"""
delete_table
Manually delete a temporary table for model in test data base.
:return:
"""
schema_editor = getattr(connection, 'schema_editor',... |
fake_me
Class or method decorator
Class decorator: create temporary table for all tests in SimpleTestCase.
Method decorator: create temporary model only for given test method.
:param source: SimpleTestCase or test function
:return:
def fake_me(cls, source):
"""
... |
Decorator for capturing and simulating network communication
``debug`` : bool, optional
Enables debug mode.
``overwrite`` : bool, optional
Will run vcr in recording mode - overwrites any existing vcrtapes.
``playback_only`` : bool, optional
Will run vcr in playback mode - will not c... |
Reset to default settings
def reset(cls):
"""
Reset to default settings
"""
cls.debug = False
cls.disabled = False
cls.overwrite = False
cls.playback_only = False
cls.recv_timeout = 5
cls.recv_endmarkers = []
cls.recv_size = None |
Reify values to their Python equivalents.
Does recursion detection, failing when that happens.
def to_python(value, seen=None):
"""Reify values to their Python equivalents.
Does recursion detection, failing when that happens.
"""
seen = seen or set()
if isinstance(value, framework.TupleLike):
if valu... |
Walks the _evaluated_ tree of the given GCL tuple.
The appropriate methods of walker will be invoked for every element in the
tree.
def walk(value, walker, path=None, seen=None):
"""Walks the _evaluated_ tree of the given GCL tuple.
The appropriate methods of walker will be invoked for every element in the
... |
Return a hash value that uniquely identifies the GCL value.
def fingerprint(value):
"""Return a hash value that uniquely identifies the GCL value."""
h = hashlib.sha256()
_digest(value, h)
return h.digest().encode('hex') |
Return the the last 2 error messages from an error stack.
These error messages turns out to be the most descriptive.
def compact_error(err):
"""Return the the last 2 error messages from an error stack.
These error messages turns out to be the most descriptive.
"""
def err2(e):
if isinstance(e, exceptio... |
Backpropagate through the logistic layer.
**Parameters:**
input_data : ``GPUArray``
Inpute data to compute activations for.
targets : ``GPUArray``
The target values of the units.
cache : list of ``GPUArray``
Cache obtained from forward pass. If the... |
Return the cross entropy error
def cross_entropy_error(self, input_data, targets, average=True,
cache=None, prediction=False):
""" Return the cross entropy error
"""
if cache is not None:
activations = cache
else:
activations = \
... |
Parse comment lines and make subsequent indented lines into a code block
block.
def stylize_comment_block(lines):
"""Parse comment lines and make subsequent indented lines into a code block
block.
"""
normal, sep, in_code = range(3)
state = normal
for line in lines:
indented = line.startswith(' ')... |
Return two pairs of members, scalar and tuple members.
The scalars will be sorted s.t. the unbound members are at the top.
def sort_members(tup, names):
"""Return two pairs of members, scalar and tuple members.
The scalars will be sorted s.t. the unbound members are at the top.
"""
scalars, tuples = partit... |
Resolve filename relatively against one of the given paths, if possible.
def resolve_file(fname, paths):
"""Resolve filename relatively against one of the given paths, if possible."""
fpath = path.abspath(fname)
for p in paths:
spath = path.abspath(p)
if fpath.startswith(spath):
return fpath[len(sp... |
Generate a list of strings representing the table in RST format.
def generate(self):
"""Generate a list of strings representing the table in RST format."""
header = ' '.join('=' * self.width[i] for i in range(self.w))
lines = [
' '.join(row[i].ljust(self.width[i]) for i in range(self.w))
fo... |
Use a predicate to partition entries into false entries and true entries
def partition(pred, iterable):
'Use a predicate to partition entries into false entries and true entries'
# partition(is_odd, range(10)) --> 0 2 4 6 8 and 1 3 5 7 9
t1, t2 = itertools.tee(iterable)
return list(filter(negate(pre... |
Select nodes according to the input selector.
This can ALWAYS return multiple root elements.
def select(self, model):
"""Select nodes according to the input selector.
This can ALWAYS return multiple root elements.
"""
res = []
def doSelect(value, pre, remaining):
if not remaining:
... |
Return a deep dict of the values selected.
The leaf values may still be gcl Tuples. Use util.to_python() if you want
to reify everything to real Python values.
def deep(self):
"""Return a deep dict of the values selected.
The leaf values may still be gcl Tuples. Use util.to_python() if you want
t... |
List/dictionary-aware set.
def ldSet(self, what, key, value):
"""List/dictionary-aware set."""
if isListKey(key):
# Make sure we keep the indexes consistent, insert missing_values
# as necessary. We do remember the lists, so that we can remove
# missing values after inserting all values from ... |
List-aware get.
def ldGet(self, what, key):
"""List-aware get."""
if isListKey(key):
return what[listKeyIndex(key)]
else:
return what[key] |
List/dictinary/missing-aware contains.
If the value is a "missing_value", we'll treat it as non-existent
so it will be overwritten by an empty list/dict when necessary to
assign child keys.
def ldContains(self, what, key):
"""List/dictinary/missing-aware contains.
If the value is a "missing_value... |
Return a list of nodes that have a recursive dependency.
def find_recursive_dependency(self):
"""Return a list of nodes that have a recursive dependency."""
nodes_on_path = []
def helper(nodes):
for node in nodes:
cycle = node in nodes_on_path
nodes_on_path.append(node)
if cy... |
Called for every tuple.
If this returns False, the elements of the tuple will not be recursed over
and leaveTuple() will not be called.
def enterTuple(self, tuple, path):
"""Called for every tuple.
If this returns False, the elements of the tuple will not be recursed over
and leaveTuple() will no... |
Convert with location.
def convertAndMake(converter, handler):
"""Convert with location."""
def convertAction(loc, value):
return handler(loc, converter(value))
return convertAction |
Make a sequence of applications from a list of tokens.
atoms is a list of atoms, which will be handled left-associatively. E.g:
['foo', [], []] == foo()() ==> Application(Application('foo', []), [])
def mkApplications(location, *atoms):
"""Make a sequence of applications from a list of tokens.
atoms is ... |
Call a function, respecting all the various types of functions that exist.
def call_fn(fn, arglist, env):
"""Call a function, respecting all the various types of functions that exist."""
if isinstance(fn, framework.LazyFunction):
# The following looks complicated, but this is necessary because you can't
# ... |
Return the schema spec from a run-time tuple.
def schema_spec_from_tuple(tup):
"""Return the schema spec from a run-time tuple."""
if hasattr(tup, 'get_schema_spec'):
# Tuples have a TupleSchema field that contains a model of the schema
return schema.from_spec({
'fields': TupleSchemaAccess(tup),
... |
Make a Schema object from the given spec.
The input and output types of this function are super unclear, and are held together by ponies,
wishes, duct tape, and a load of tests. See the comments for horrific entertainment.
def make_schema_from(value, env):
"""Make a Schema object from the given spec.
The inp... |
Parse bracketed list.
Empty list is possible, as is a trailing separator.
def bracketedList(l, r, sep, expr, allow_missing_close=False):
"""Parse bracketed list.
Empty list is possible, as is a trailing separator.
"""
# We may need to backtrack for lists, because of list comprehension, but not for
# any ... |
Unquote the indicated string.
def unquote(s):
"""Unquote the indicated string."""
# Ignore the left- and rightmost chars (which should be quotes).
# Use the Python engine to decode the escape sequence
i, N = 1, len(s) - 1
ret = []
while i < N:
if s[i] == '\\' and i < N - 1:
ret.append(UNQUOTE_MAP... |
Function to put a name on a pyparsing pattern.
Just for ease of debugging/tracing parse errors.
def pattern(name, pattern):
"""Function to put a name on a pyparsing pattern.
Just for ease of debugging/tracing parse errors.
"""
pattern.setName(name)
astracing.maybe_trace(pattern)
return pattern |
Make the part of the grammar that depends on whether we swallow errors or not.
def make_grammar(allow_errors):
"""Make the part of the grammar that depends on whether we swallow errors or not."""
if allow_errors in GRAMMAR_CACHE:
return GRAMMAR_CACHE[allow_errors]
tuple = p.Forward()
catch_errors = p.Forw... |
Load but don't evaluate a GCL expression from a string.
def reads(s, filename, loader, implicit_tuple, allow_errors):
"""Load but don't evaluate a GCL expression from a string."""
try:
the_context.filename = filename
the_context.loader = loader
grammar = make_grammar(allow_errors=allow_errors)
roo... |
Find all AST nodes at the given filename, line and column.
def find_tokens(self, q):
"""Find all AST nodes at the given filename, line and column."""
found_me = []
if hasattr(self, 'location'):
if self.location.contains(q):
found_me = [self]
elif self._found_by(q):
found_me = [self]... |
Instantiate the Tuple based on this TupleNode.
def _make_tuple(self, env):
"""Instantiate the Tuple based on this TupleNode."""
t = runtime.Tuple(self, env, dict2tuple)
# A tuple also provides its own schema spec
schema = schema_spec_from_tuple(t)
t.attach_schema(schema)
return t |
Apply a tuple to something else.
def applyTuple(self, tuple, right, env):
"""Apply a tuple to something else."""
if len(right) != 1:
raise exceptions.EvaluationError('Tuple (%r) can only be applied to one argument, got %r' % (self.left, self.right))
right = right[0]
return tuple(right) |
Apply a list to something else.
def applyIndex(self, lst, right):
"""Apply a list to something else."""
if len(right) != 1:
raise exceptions.EvaluationError('%r can only be applied to one argument, got %r' % (self.left, self.right))
right = right[0]
if isinstance(right, int):
return lst[ri... |
First step of Nesterov momentum method:
take step in direction of accumulated gradient
def pre_gradient_update(self):
""" First step of Nesterov momentum method:
take step in direction of accumulated gradient
"""
updates = zip(self.velocity, self.model.n_parameters * [1.])
... |
Return the classification error rate
def class_error(self, input_data, targets, average=True,
cache=None, prediction=False):
""" Return the classification error rate
"""
if cache is not None:
activations = cache
else:
activations = \
... |
The KL divergence error
def kl_error(self, input_data, targets, average=True,
cache=None, prediction=True):
""" The KL divergence error
"""
if cache is not None:
activations = cache
else:
activations = \
self.feed_forward(input_dat... |
Dot product of two arrays.
For 1D arrays, this function computes the inner product. For 2D
arrays of shapes `(m, k)` and `(k, n)`, it computes the matrix
product; the result has shape `(m, n)`.
Parameters
----------
x_gpu : pycuda.gpuarray.GPUArray
Input array.
y_gpu : pycuda.gpuar... |
Create a temp file, write our PID into it.
def make_tempfile(data=None):
"Create a temp file, write our PID into it."
with tempfile.NamedTemporaryFile(mode='w', delete=False) as temp:
temp.write(six.text_type(data if data is not None else os.getpid()))
return temp.name |
Return a list where each element contains the parameters for a task.
def parameters(self):
"""Return a list where each element contains the parameters for a task.
"""
parameters = []
for task in self.tasks:
parameters.extend(task.parameters)
return parameters |
Update the parameters.
``value`` must be a list/tuple of length
``MultitaskTopLayer.n_tasks``, each element of which must have
the correct number of parameters for the task.
def parameters(self, value):
"""Update the parameters.
``value`` must be a list/tuple of length
... |
Call ``feed_forward`` for each task and combine the activations.
Passes ``input_data`` to all tasks and returns the activations
as a list.
**Parameters:**
input_data : ``GPUArray``
Inpute data to compute activations for.
prediction : bool, optional
... |
Compute gradients for each task and combine the results.
**Parameters:**
input_data : ``GPUArray``
Inpute data to compute activations for.
targets : ``GPUArray``
The target values of the units.
cache : list of ``GPUArray``
Cache obtained from forwa... |
Computes the cross-entropy error for all tasks.
def cross_entropy_error(self, input_data, targets, average=True,
cache=None, prediction=False,
sum_errors=True):
""" Computes the cross-entropy error for all tasks.
"""
loss = []
if ... |
Update the parameters. ``value`` must have the shape
``(weights, biases)``
def parameters(self, value):
"""Update the parameters. ``value`` must have the shape
``(weights, biases)``"""
self.W = value[0] if isinstance(value[0], GPUArray) else \
gpuarray.to_gpu(value[0])
... |
Returns a dictionary describing the architecture of the layer.
def architecture(self):
"""Returns a dictionary describing the architecture of the layer."""
arch = {'class': self.__class__,
'n_in': self.n_in,
'n_units': self.n_units,
'activation_function':... |
Propagate forward through the layer
**Parameters:**
input_data : ``GPUArray``
Input data to compute activations for.
prediction : bool, optional
Whether to use prediction model. Only relevant when using
dropout. If true, then weights are multiplied by
... |
Backpropagate through the hidden layer
**Parameters:**
input_data : ``GPUArray``
Input data to compute activations for.
df_output : ``GPUArray``
Gradients with respect to the activations of this layer
(received from the layer above).
cache : list o... |
Initialize CUBLAS.
Initializes CUBLAS and creates a handle to a structure holding
the CUBLAS library context.
Returns
-------
handle : void_p
CUBLAS context.
def cublasCreate():
"""
Initialize CUBLAS.
Initializes CUBLAS and creates a handle to a structure holding
the CUBL... |
Release CUBLAS resources.
Releases hardware resources used by CUBLAS.
Parameters
----------
handle : void_p
CUBLAS context.
def cublasDestroy(handle):
"""
Release CUBLAS resources.
Releases hardware resources used by CUBLAS.
Parameters
----------
handle : void_p
... |
Get CUBLAS version.
Returns version number of installed CUBLAS libraries.
Parameters
----------
handle : void_p
CUBLAS context.
Returns
-------
version : int
CUBLAS version.
def cublasGetVersion(handle):
"""
Get CUBLAS version.
Returns version number of insta... |
Set current CUBLAS library stream.
Parameters
----------
handle : id
CUBLAS context.
id : int
Stream ID.
def cublasSetStream(handle, id):
"""
Set current CUBLAS library stream.
Parameters
----------
handle : id
CUBLAS context.
id : int
S... |
Set current CUBLAS library stream.
Parameters
----------
handle : void_p
CUBLAS context.
Returns
-------
id : int
Stream ID.
def cublasGetStream(handle):
"""
Set current CUBLAS library stream.
Parameters
----------
handle : void_p
CUBLAS context.... |
Matrix-vector product for real general banded matrix.
def cublasSgbmv(handle, trans, m, n, kl, ku, alpha, A, lda,
x, incx, beta, y, incy):
"""
Matrix-vector product for real general banded matrix.
"""
status = _libcublas.cublasSgbmv_v2(handle,
tr... |
Matrix-vector product for complex general banded matrix.
def cublasCgbmv(handle, trans, m, n, kl, ku, alpha, A, lda,
x, incx, beta, y, incy):
"""
Matrix-vector product for complex general banded matrix.
"""
status = _libcublas.cublasCgbmv_v2(handle,
... |
Matrix-vector product for complex general banded matrix.
def cublasZgbmv(handle, trans, m, n, kl, ku, alpha, A, lda,
x, incx, beta, y, incy):
"""
Matrix-vector product for complex general banded matrix.
"""
status = _libcublas.cublasZgbmv_v2(handle,
... |
Matrix-vector product for real general matrix.
def cublasSgemv(handle, trans, m, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for real general matrix.
"""
status = _libcublas.cublasSgemv_v2(handle,
_CUBLAS_OP[trans], m, n,
... |
Matrix-vector product for real general matrix.
def cublasDgemv(handle, trans, m, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for real general matrix.
"""
status = _libcublas.cublasDgemv_v2(handle,
_CUBLAS_OP[trans], m, n,
... |
Matrix-vector product for complex general matrix.
def cublasCgemv(handle, trans, m, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for complex general matrix.
"""
status = _libcublas.cublasCgemv_v2(handle,
_CUBLAS_OP[trans], m, n,
... |
Matrix-vector product for complex general matrix.
def cublasZgemv(handle, trans, m, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for complex general matrix.
"""
status = _libcublas.cublasZgemv_v2(handle,
_CUBLAS_OP[trans], m, n,
... |
Rank-1 operation on real general matrix.
def cublasSger(handle, m, n, alpha, x, incx, y, incy, A, lda):
"""
Rank-1 operation on real general matrix.
"""
status = _libcublas.cublasSger_v2(handle,
m, n,
ctypes.byref(ctypes.... |
Rank-1 operation on real general matrix.
def cublasDger(handle, m, n, alpha, x, incx, y, incy, A, lda):
"""
Rank-1 operation on real general matrix.
"""
status = _libcublas.cublasDger_v2(handle,
m, n,
ctypes.byref(ctypes.... |
Rank-1 operation on complex general matrix.
def cublasCgeru(handle, m, n, alpha, x, incx, y, incy, A, lda):
"""
Rank-1 operation on complex general matrix.
"""
status = _libcublas.cublasCgeru_v2(handle,
m, n, ctypes.byref(cuda.cuFloatComplex(alpha.real,
... |
Rank-1 operation on complex general matrix.
def cublasZgerc(handle, m, n, alpha, x, incx, y, incy, A, lda):
"""
Rank-1 operation on complex general matrix.
"""
status = _libcublas.cublasZgerc_v2(handle,
m, n, ctypes.byref(cuda.cuDoubleComplex(alpha.real,
... |
Matrix-vector product for real symmetric-banded matrix.
def cublasSsbmv(handle, uplo, n, k, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for real symmetric-banded matrix.
"""
status = _libcublas.cublasSsbmv_v2(handle,
_CUBLAS_FILL_MODE[uplo]... |
Matrix-vector product for real symmetric-banded matrix.
def cublasDsbmv(handle, uplo, n, k, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for real symmetric-banded matrix.
"""
status = _libcublas.cublasDsbmv_v2(handle,
_CUBLAS_FILL_MODE[uplo]... |
Matrix-vector product for real symmetric-packed matrix.
def cublasSspmv(handle, uplo, n, alpha, AP, x, incx, beta, y, incy):
"""
Matrix-vector product for real symmetric-packed matrix.
"""
status = _libcublas.cublasSspmv_v2(handle,
_CUBLAS_FILL_MODE[uplo],
... |
Matrix-vector product for real symmetric-packed matrix.
def cublasDspmv(handle, uplo, n, alpha, AP, x, incx, beta, y, incy):
"""
Matrix-vector product for real symmetric-packed matrix.
"""
status = _libcublas.cublasDspmv_v2(handle,
_CUBLAS_FILL_MODE[uplo],
... |
Rank-1 operation on real symmetric-packed matrix.
def cublasSspr(handle, uplo, n, alpha, x, incx, AP):
"""
Rank-1 operation on real symmetric-packed matrix.
"""
status = _libcublas.cublasSspr_v2(handle,
_CUBLAS_FILL_MODE[uplo], n, ... |
Rank-1 operation on real symmetric-packed matrix.
def cublasDspr(handle, uplo, n, alpha, x, incx, AP):
"""
Rank-1 operation on real symmetric-packed matrix.
"""
status = _libcublas.cublasDspr_v2(handle,
_CUBLAS_FILL_MODE[uplo], n, ... |
Rank-2 operation on real symmetric-packed matrix.
def cublasSspr2(handle, uplo, n, alpha, x, incx, y, incy, AP):
"""
Rank-2 operation on real symmetric-packed matrix.
"""
status = _libcublas.cublasSspr2_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Rank-2 operation on real symmetric-packed matrix.
def cublasDspr2(handle, uplo, n, alpha, x, incx, y, incy, AP):
"""
Rank-2 operation on real symmetric-packed matrix.
"""
status = _libcublas.cublasDspr2_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Matrix-vector product for real symmetric matrix.
def cublasSsymv(handle, uplo, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for real symmetric matrix.
"""
status = _libcublas.cublasSsymv_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Matrix-vector product for real symmetric matrix.
def cublasDsymv(handle, uplo, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for real symmetric matrix.
"""
status = _libcublas.cublasDsymv_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Matrix-vector product for complex symmetric matrix.
def cublasCsymv(handle, uplo, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for complex symmetric matrix.
"""
status = _libcublas.cublasCsymv_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Matrix-vector product for complex symmetric matrix.
def cublasZsymv(handle, uplo, n, alpha, A, lda, x, incx, beta, y, incy):
"""
Matrix-vector product for complex symmetric matrix.
"""
status = _libcublas.cublasZsymv_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Rank-1 operation on real symmetric matrix.
def cublasSsyr(handle, uplo, n, alpha, x, incx, A, lda):
"""
Rank-1 operation on real symmetric matrix.
"""
status = _libcublas.cublasSsyr_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Rank-1 operation on real symmetric matrix.
def cublasDsyr(handle, uplo, n, alpha, x, incx, A, lda):
"""
Rank-1 operation on real symmetric matrix.
"""
status = _libcublas.cublasDsyr_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
cty... |
Rank-1 operation on complex symmetric matrix.
def cublasCsyr(handle, uplo, n, alpha, x, incx, A, lda):
"""
Rank-1 operation on complex symmetric matrix.
"""
status = _libcublas.cublasCsyr_v2(handle,
_CUBLAS_FILL_MODE[uplo], n,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.