This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void blasL1(Matrix1D *A, Matrix1D *B, Matrix1D *C, int n) { | |
double *Cmat = C->matrix; | |
double *Amat = A->matrix; | |
double *Bmat = B->matrix; | |
double *Arv, *Crv; | |
omp_set_num_threads(4); | |
#pragma omp parallel for | |
for (int i = 0; i < n; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void multiply1DMatrixIKJ(Matrix1D *A, Matrix1D *B, Matrix1D *C, int n) { | |
for (int i = 0; i < n; ++i) { | |
double *Arow = &A->matrix[i * n]; | |
double *Crow = &C->matrix[i * n]; | |
for (int k = 0; k < n; ++k) { | |
double temp = *(Arow + k); | |
double *Brow = &B->matrix[k * n]; | |
for (int j = 0; j < n; ++j) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void parallelMultiply1D(Matrix1D *A, Matrix1D *B, Matrix1D *C, int n) { | |
omp_set_num_threads(4); | |
#pragma omp parallel for | |
for (int i = 0; i < n; ++i) { | |
double *Arow = &A->matrix[i * n]; | |
double *Crow = &C->matrix[i * n]; | |
for (int j = 0; j < n; ++j) { | |
double sum = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void multiply1D(Matrix1D *A, Matrix1D *B, Matrix1D *C, int n) { | |
for (int i = 0; i < n; ++i) { | |
double *Arow = &A->matrix[i * n]; | |
double *Crow = &C->matrix[i * n]; | |
for (int j = 0; j < n; ++j) { | |
double sum = 0; | |
for (int k = 0; k < n; ++k) | |
sum += *(Arow + k) * B->matrix[k * n + j]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 0; i < n; i++) | |
for (int j = 0; j < n; j++) | |
for (int k = 0; k < n; k++) | |
C[i][j] += A[i][k] * B[k][j]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Q4 { | |
public final static int PIZZA_SLICE = 1; // One piece of pizza | |
public final static int PIZZA_REORDER = 0; // Pizza finished. Signals to reorder | |
public final static int PIZZA_FINISHED = -1; // Pizza finished | |
public static void main(String[] args) { | |
Plate pizzaPlate = new Plate(new Pizza()); // Create a plate to hold the pizza | |
Runnable[] students = new Runnable[15]; | |
// Runnable implementation for a pizza order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: '2.0' | |
info: | |
version: "1.6" | |
title: "Docker Registry HTTP API" | |
# Describe your paths here | |
paths: | |
# This is a path endpoint. | |
/v2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
#Defining my integration flow | |
myIntegrationFlow as IntegrationFlow | |
//This is a sample inbound endpoint | |
sampleHTTPinbound as InboundEndpoint(protocol("http"),port(8290),context("/sample/request")) | |
samplePipeline as Pipeline("message_flow_1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################################ | |
# Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream publisherhttp{ | |
ip_hash; | |
server <ip-address-publisher1>:9763; | |
server <ip-address-publisher2>:9763; | |
} | |
upstream publisherhttps{ | |
ip_hash; | |
server <ip-address-publisher1>:9443; |